I have some code that captures a geopoint when the user clicks on the map. I use the geopoint to place map objects when the user clicks the map. So far I've just placed the object precisely where the user clicks, but now I'd like to place the object a certain number of feet away - like 10 feet to the left or right. How would I add 10 feet to the X or Y coordinate, since those coordinates aren't in feet?
Solved! Go to Solution.
Dave,
If you are using the standard esri basemaps then the WKID is 102100 Web Mercator and thus a projection based on meters. So to add 10 feet just add 3.048006 (simple feet to meters math).
Dave,
If you are using the standard esri basemaps then the WKID is 102100 Web Mercator and thus a projection based on meters. So to add 10 feet just add 3.048006 (simple feet to meters math).
Our maps use a Lat/Lon coordinate system. When we capture the point the user clicks, we call
esri.geometry.webMercatorToGeographic to get the Lat/Lon to use for placing the graphic on the map. If I'm understanding you right, I can work with the original point I get from the user's click and do my math on it, and then convert the point to Lat/Lon for placing the graphic on the map.
Gonna take that for a spin.