how to compute a geopoint

2296
2
Jump to solution
11-14-2015 02:39 PM
DaveSouthern
New Contributor II

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?

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

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).

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

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).

DaveSouthern
New Contributor II

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.

0 Kudos