ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping.DeviceLocation Namespace / MapDeviceLocationOptions Class
Members Example

In This Topic
    MapDeviceLocationOptions Class
    In This Topic
    Represents the settings available for configuring the MapDeviceLocationService.
    Syntax
    public class MapDeviceLocationOptions 
    Public Class MapDeviceLocationOptions 
    Remarks
    Use the MapDeviceLocationOptions to update the current device location source with new options
    Example
    Get Current Map Device Location Options
    var options = MapDeviceLocationService.Instance.GetDeviceLocationOptions();
    
    var visibility = options.DeviceLocationVisibility;
    var navMode = options.NavigationMode;
    var trackUp = options.TrackUpNavigation;
    var showBuffer = options.ShowAccuracyBuffer;
    
    Set map view to always be centered on the device location
    var currentOptions = MapDeviceLocationService.Instance.GetDeviceLocationOptions();
    if (currentOptions == null)
      return;
    
    currentOptions.DeviceLocationVisibility = true;
    currentOptions.NavigationMode = MappingDeviceLocationNavigationMode.KeepAtCenter;
    
    await QueuedTask.Run(() =>
    {
      MapDeviceLocationService.Instance.SetDeviceLocationOptions(currentOptions);
    });
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.DeviceLocation.MapDeviceLocationOptions

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also