Assigned
Status Update
Comments
la...@google.com <la...@google.com>
la...@google.com <la...@google.com> #2
Thanks for your suggestion!
We'll be reviewing this for further consideration. Please star this issue to get updates and leave comments for additional information. Please note that starring the issue also provides our product team with valuable feedback on the importance of the issue to our customers.
Description
It would be awesome if we had a way to get the world coordinates from the pointer (other than just doing a click on certain elements).
This would open up the possibilities of dragging and dropping markers or other 3d elements in the map and would allow us to make much more interactive experiences with the 3D map.
# Please describe how the feature should work:
map.getWorldCoordinates(x, y, options); // returns a LatLng | undefined (if nothing was hit)
options could contain a max distance we want the ray to travel for.
Actually a built in RayCast system would be amazing.
# Please give a use case or explain where and why you need this feature:
Trying to implement a drag and drop feature. For example, I have a some coordinates that are used to render a polyline. I would like to move one of these coordinates with my mouse. I can listen for the gmp-click event, but I can't get the underlying position of the mouse during the drag, so I don't know how to move the marker.