How to convert from (x, y) screen coordinates to LatLng (Google Maps)

前端 未结 6 778
不知归路
不知归路 2020-12-01 04:42

I am implementing an application using Google Maps and Leap Motion and what I want right now, and I am a bit stuck, is a way to convert (x, y) screen coordinates into a Goog

6条回答
  •  天涯浪人
    2020-12-01 05:16

    Check out the easy solution(v3):

    map.getProjection().fromLatLngToPoint(marker.position);
    

    https://developers.google.com/maps/documentation/javascript/3.exp/reference#Projection

提交回复
热议问题