Parameters
- zoom
- Set to true to zoom.
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
| System.InvalidOperationException | The active map view cannot be null |
{
//Note: Run within a QueuedTask
if (!MapDeviceLocationService.Instance.IsDeviceLocationEnabled)
//Calling ZoomOrPanToCurrentLocation w/ no Device Location Enabled
//Will throw an InvalidOperationException
return;
// true for zoom, false for pan
MapDeviceLocationService.Instance.ZoomOrPanToCurrentLocation(true);
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)