[OpenLayers-Users] Help dealing with popup clicks verse click handlers

Eric Lemoine eric.c2c at gmail.com
Tue May 27 01:42:27 EDT 2008


On Tue, May 27, 2008 at 1:17 AM, Christopher Schmidt
<crschmidt at metacarta.com> wrote:
> On Mon, May 26, 2008 at 07:11:24PM -0500, Stephen Woodbridge wrote:
>> Hi all,
>>
>> I have a marker layer that which is working great. I just added a click
>> handler that reverse geocodes on a click and adds a marker at the click
>> point and populates the popup with the XML  response. This is all
>> working great EXCEPT that when I click on the icons to open or close a
>> popup, that click is propagating to the click handler causing another
>> marker to be added.
>>
>> How to I control or stop this?
>
> Return false or OpenLayers.Event.stop(evt); inside your marker click
> handler. (I can't remember which it is; one of them should do it, I
> don't know which.)

Here the goal is stop propagation towards the parent DOM elements, so
it should be OpenLayers.Event.stop(evt).

--
Eric



More information about the Users mailing list