I have a known feature with latitude and longitude.
I have as second point defined by x and y offsets in meters from the known position. This second point is within a few KM of the known position.
I found algorithm - Calculating new longitude, latitude from old + n meters - Stack Overflow to calculate the lat/long of the second point.
Is there a better way to do this in ArcGIS Javascript?
Solved! Go to Solution.
Glenn,
absolutely. The JS API Point class has an offset method.
https://developers.arcgis.com/javascript/3/jsapi/point-amd.html#offset
to convert between lat long and meters you can use webMercatorUtils geographictowebmercator method
esri/geometry/webMercatorUtils | API Reference | ArcGIS API for JavaScript 3.27
Glenn,
absolutely. The JS API Point class has an offset method.
https://developers.arcgis.com/javascript/3/jsapi/point-amd.html#offset
to convert between lat long and meters you can use webMercatorUtils geographictowebmercator method
esri/geometry/webMercatorUtils | API Reference | ArcGIS API for JavaScript 3.27
Where did this move to in 4.X?
Awesome! Thanks!
Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.