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.
{
//Gets the current device location options used by the MapDeviceLocationService
var options = MapDeviceLocationService.Instance.GetDeviceLocationOptions();
//Device location visibility on the map
var visibility = options.DeviceLocationVisibility;
//MappingDeviceLocationNavigationMode
var navMode = options.NavigationMode;
//Heading of the location from the device points to the top of the screen
var trackUp = options.TrackUpNavigation;
//Show accuracy buffer on the map
var showBuffer = options.ShowAccuracyBuffer;
}
{
// Get the MapDeviceLocationOptions currently used by the MapDeviceLocationService
var currentOptions = MapDeviceLocationService.Instance.GetDeviceLocationOptions();
if (currentOptions == null)
return;
// Set the device location visibility on the map to true
currentOptions.DeviceLocationVisibility = true;
//Set the navigation mode to keep the device location at the center of the map
currentOptions.NavigationMode = MappingDeviceLocationNavigationMode.KeepAtCenter;
//Note: Run within a QueuedTask
//Sets the MapDeviceLocationOptions to be updates with these values
MapDeviceLocationService.Instance.SetDeviceLocationOptions(currentOptions);
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)