0

I used to draw graphics on Google Map from decimal degrees (latlng), but recently I found a server that only provide Web Mercator meters (or feet perhaps). Then I found the function to draw decimal degrees does not apply to Web Mercator meters:

        //this works well
        var marker = new google.maps.Marker({
            position: new google.maps.LatLng(40, -100),
            map: MAP
        });
        //this does not work
        var marker = new google.maps.Marker({
            position: new google.maps.LatLng(-9076798, 3012626),
            map: MAP
        });

Please help me solve this problem. I know there is no simple equation to convert decimal degrees to state plane meters/feet. Thanks.

HQXU85
  • 153
  • 3
  • 14
  • Unfortunately there is no easy what to do this. You can use the formula in this link https://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM – Verma Feb 10 '15 at 19:18
  • Thanks, I found the service by ESRI which can solve the problem: https://developers.arcgis.com/javascript/jsapi/esri.geometry.webmercatorutils-amd.html – HQXU85 Feb 13 '15 at 23:28

1 Answers1

0

It is solved, just include ESRI API and use their functions: https://developers.arcgis.com/javascript/jsapi/esri.geometry.webmercatorutils-amd.html

HQXU85
  • 153
  • 3
  • 14