ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping.DeviceLocation Namespace / MapDeviceLocationOptions Class / DeviceLocationVisibility Property
Example Version

DeviceLocationVisibility Property
Gets and sets the the device location visibility on the map view.
Syntax
public bool DeviceLocationVisibility {get; set;}
Remarks

By default DeviceLocationVisibility is set to True.

The location is represented on the map view as a blue circle. This symbol cannot be changed. When location accuracy is poor i.e. the value is higher than the ArcGIS.Desktop.Core.DeviceLocation.DeviceLocationProperties.AccuracyThreshold, the location symbology will switch to a red circle.

When direction/heading is available from the open device location source, a white arrow representing the direction/heading of the location will be shown in the middle of the (blue or red) circle.

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);
});
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also