Greetings,
I have been looking for a method or property that will give me the units (IE: meters, feet, degrees) of the map being displayed. I have looked at the map.spatialReference.toJson(), but it only returns the WKID and not the units. Any suggestions of how to get this property? It would certainly be ideal to have a property map.mapUnits or a method map.getMapUnits(). Thanks!
Regards,
Tom
Solved! Go to Solution.
Hi Tom - a very similar question was asked recently: Re: How to get linear distance units of a layer?
In short, the SpatialReference class does not contain a property for linear units.
Hi Tom - a very similar question was asked recently: Re: How to get linear distance units of a layer?
In short, the SpatialReference class does not contain a property for linear units.
Owen,
Thanks for the reply.
Regards,
Tom
Tom, Owen,
They have added getUnitValueForSR(sr) ability in 3.13
esri/geometry/scaleUtils | API Reference | ArcGIS API for JavaScript
Robert,
That is excellent news! I will have to change my settings interface after the next release, but it will be worth it! Thanks very much!
Regards,
Tom Sellsted
Supervising Senior Analyst
Tom.Sellsted@YakimaWA.gov<mailto:Tom.Sellsted@YakimaWA.gov>
129 North 2nd Street, Yakima, WA 98901<x-apple-data-detectors://2/1>
Phone (509) 576-6602<tel:(509)%20576-6602> | FAX (509) 249-6835<tel:(509)%20249-6835>
46° 36' 17.86"N 120° 30' 18.23"W
This is good news - the client side Geometry Engine looks great too:
Owen,
Ya, I have played with the geometryEngineAsync already and it is a nice addition.