Hello Karim,
the first idea you mentioned seems more reasonable to me. Maybe we can
use grouped elements in a canvans in other cases too.
Best regards
Astrid
Karim Malhas schrieb:
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
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapbender_dev
--
Mit freundlichen Grüßen
Astrid Emde
********************************************
AGIT 2010
7.-9. Juli 2010 in Salzburg
Treffen Sie die WhereGroup an Stand Nr. 30
http://www.agit.at
********************************************
----------------------------------
Aufwind durch Wissen!
Qualifizierte OpenSource-Schulungen
bei der www.foss-academy.eu
----------------------------------
Astrid Emde
WhereGroup GmbH & Co.KG
Siemensstraße 8
53121 Bonn
Germany
Fon: +49(0)228 90 90 38 - 19
Fax: +49(0)228 90 90 38 - 11
[email protected]
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
_______________________________________________
Mapbender_dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapbender_dev