public IList<DisplayUnitFormat> GetAvailableLocationUnitFormats()
Public Function GetAvailableLocationUnitFormats() As IList(Of DisplayUnitFormat)
public IList<DisplayUnitFormat> GetAvailableLocationUnitFormats()
Public Function GetAvailableLocationUnitFormats() As IList(Of DisplayUnitFormat)
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
//var map = MapView.Active.Map; //Must be on the QueuedTask.Run() //Linear location unit formats are not included if the map sr //is geographic. var loc_units = map.GetAvailableLocationUnitFormats();
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