IsDeviceLocationEnabled Property (MapDeviceLocationService)
Determines the enabled state of the current DeviceLocationSource.
Enable/Disable Current Device Location Source For the Map
bool enabled = MapDeviceLocationService.Instance.IsDeviceLocationEnabled;
await QueuedTask.Run(() =>
{
MapDeviceLocationService.Instance.SetDeviceLocationEnabled(!enabled);
});
Check if The Current Device Location Is Enabled On The Map
if (MapDeviceLocationService.Instance.IsDeviceLocationEnabled)
{
//The Device Location Source is Enabled
}
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.