Coordinate conversion in SketchViewModel

196
2
Jump to solution
12-20-2021 11:54 AM
ararana
New Contributor

Looking at the Sketch in 3D example code, in the sketchViewModel.on("create" function a new line's point coordinates are coming across in a unusual format

ararana_0-1640030052515.png

Can anyone explain what this coordinate format is and how I could convert it to standard longitude/latitude?

 

0 Kudos
1 Solution

Accepted Solutions
ironmaskito
New Contributor III

I think default coordinate system for esri maps is in webmercator format. you should use webMercatorUtils' webMercatorToGeographic() to convert to geo coordinates: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils...

View solution in original post

0 Kudos
2 Replies
ironmaskito
New Contributor III

I think default coordinate system for esri maps is in webmercator format. you should use webMercatorUtils' webMercatorToGeographic() to convert to geo coordinates: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils...

0 Kudos
ararana
New Contributor

Was not aware of the webMercatorUtils class. Thanks for the help!

0 Kudos