2

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?

1 Answer 1

1

Setting the clickable option to false on the marker/line should stop it responding to click events by opening the popup.

2
  • The idea is good, but sadly the clickable attribute also disables the right-click - which I need... Commented Feb 5, 2013 at 10:37
  • Can you post your code for your right-click event listener? Commented Apr 6, 2013 at 15:01

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.