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

前端 未结 6 768
不知归路
不知归路 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:20

    Apparently, Google has decided to make life easier.

    Here is the built-in solution:

    Point point = googleMap.getProjection.toScreenLocation(latLng)

    LatLng latlng = googleMap.getProjection.fromScreenLocation(point)

提交回复
热议问题