I am working on a map application which creates and binds popups on markers and polyline objects.
The popups are created and bound lazily, i.e. ad-hoc when a user clicks on a specific object. The reason for this is simply the performance, as we use handlebar templates to create quite extensive popups and doing this for hundreds of markers/polylines takes its toll on loading times...
What I am actually trying to do is to open all popups (on markers, lines, ...) on [right click]. I have proper right-click event listener, and if a user right-clicks on an object for the first time, the popup is created and bound to said object and then opened.
But from then on, i.e. when a popup is already bound on a marker/line even a simple left-click will open the bound popup. This is somwhat confusing for users (as they can then suddenly use left-click OR right-click to show popups, but only on certain, i.e. already right-clicked-on elements...). Furthermore this interferes with a selection mechanism I implemented to allow users to select markers by left-clicking on them.
Does anyone know how to disable opening bound popups on clicks?