[Mapbender_dev] Raphaeljs not bubbling

Armin Retterath armin.retterath at lvermgeo.rlp.de
Mon Jun 7 05:36:44 EDT 2010

maybe an alternative?


Am Montag 07 Juni 2010 10:57:57 schrieb Karim Malhas:
> Dear List,
> I am trying to modify the loadkmlgeorss module, which uses the Marker
> class, to respond to click events to display a balloon popup.
> If the Raphaeljs library is included this doesn't seem possible right
> now.
> The Problem as I understand it:
> Each marker instantiates it's own 'canvas' - in Raphael this means a new
> <svg> element is added to the DOM.
> So if multiple markers are present, multiple <svg> appear stacked above
> each other.
> The problem is, that events don't seem to come through the topmost
> svg element, meaning that only a click on the marker that was add last
> will bring the desired result.
> Possible solutions:
> - Create a global canvas element.
>   If all elements are in a single canvas, event propagation works
>   however because canvas.clear() is called a couple of times
>   in the code, a global canvas doesn't work without changes.
>   This could be modifyed to grouping elements using 'canvas.set()',
>   and set.remove().
>   I am not 100% sure how feasable that is, though.
> - Create a common canvas element for the markers only
>   drawback: the markers will work, but it can' t be used with any other
>   modules that need a canvas
> ideas?
> Regards,
> Karim
> _______________________________________________
> Mapbender_dev mailing list
> Mapbender_dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_dev

Im Auftrag
Armin Retterath

Kompetenz- und Geschäftsstelle Geodateninfrastruktur Rheinland-Pfalz
Landesamt für Vermessung und Geobasisinformation Rheinland-Pfalz

Ferdinand-Sauerbruch-Straße 15
56073 Koblenz
Telefon 0261/492-466
Telefax 0261/492-492
armin.retterath at lvermgeo.rlp.de

More information about the Mapbender_dev mailing list