How to get screen XY from Google maps (V3) LatLng?
问题 I have polyline in my map. I want to know the pixel (screen) xy-coordinates, when user clicks the polyline. Click event only returns the LatLng object, so does anyone have a clue how to get the pixel coordinates from latLng? I would appreciate very much if someone could help me! 回答1: If you have the LatLng object, you can use the google map projection object to transform it into tile coordinates and then into pixel coordinates: For the docs on the projection class: https://developers.google