Parameters
- location
Return Value
A formatted location string
| Exception | Description |
|---|---|
| System.ArgumentNullException | location |
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run |
{
//Get the current view camera location
var center_pt = new Coordinate2D(mapView.Camera.X, mapView.Camera.Y);
//Get the current location unit
//Note: Must be on the QueuedTask.Run()
var loc_unit = map.GetLocationUnitFormat();
//Format the camera location
var str = loc_unit.FormatLocation(center_pt, map.SpatialReference);
System.Diagnostics.Debug.WriteLine($"Formatted location: {str}");
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)