swisnl / jQuery-contextMenu

jQuery contextMenu plugin & polyfill
https://swisnl.github.io/jQuery-contextMenu/
MIT License
2.25k stars 744 forks source link

Using this library on Google Maps #726

Open glaukon-ariston opened 4 years ago

glaukon-ariston commented 4 years ago

I would like to be able to use this library on Google Maps. The Google Maps provides google.maps.event.addListener API to register rightclick event and then the callback receives and event object containing pixel (with (x,y) coordinates), latLng and possibly feature object if there is a geo feature under the mouse. I would like to use this data to provide context sensitive menu e.g. if right clicked on a geo feature object to list actions available on that specific object.

Any idea if that's possible out of the box without changing the library?

Here's an old Gmaps-Context-Menu library for Google Maps as an example of how it works.