public void SetLocationUnitFormat( DisplayUnitFormat unitFormat )
Public Sub SetLocationUnitFormat( _ ByVal unitFormat As DisplayUnitFormat _ )
Parameters
- unitFormat
- The location unit format to set
public void SetLocationUnitFormat( DisplayUnitFormat unitFormat )
Public Sub SetLocationUnitFormat( _ ByVal unitFormat As DisplayUnitFormat _ )
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
| System.ArgumentException | unit format is of the wrong type |
| System.ArgumentException | unit format is not in the list of available location unit formats |
var mv = MapView.Active; var map = mv.Map; QueuedTask.Run(() => { //Get the list of available location unit formats //for the current map var loc_units = map.GetAvailableLocationUnitFormats(); //arbitrarily use the last unit in the list map.SetLocationUnitFormat(loc_units.Last()); });
Target Platforms: Windows 11, Windows 10