Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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

share|improve this answer
    
The idea is good, but sadly the clickable attribute also disables the right-click - which I need... –  fgysin Feb 5 '13 at 10:37
    
Can you post your code for your right-click event listener? –  Taylor H. Apr 6 '13 at 15:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.