[OpenLayers-Users] Help dealing with popup clicks verse click
handlers
Stephen Woodbridge
woodbri at swoodbridge.com
Mon May 26 20:58:45 EDT 2008
Christopher Schmidt 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.)
>
> Regards,
Thanks,
I was already calling OpenLayers.Event.stop(evt); and added return false
for good measure, but without success.
I just found another symptom that might be relevant, which is that this
behavior only happens UNTIL I do a click drag on the map, then it
behaves as expected. Opening a popup that causes a pan does not fix the
problem.
Sorry I meant to post the url in the last message:
http://imaptools.com/maps2/tiger.html
To reproduce:
enter an address like: 11 radcliffe rd, n chelmsford, ma 01863
click Go
Click on the Red Marker you will get an aqua marker where you click,
click on the close button and you will get another aqua marker.
Now, reload the page and repeat, BUT after you click Go, do a click drag
first and then will not get the extra markers.
-Steve
More information about the Users
mailing list