[OpenLayers-Dev] Error in Marker.js
Ian Trotter
itr at pointcarbon.com
Tue Oct 27 09:39:58 EDT 2009
Hi,
The resolution of http://trac.openlayers.org/ticket/2258 seems to have introduced a bug with the event-handling for markers. It seems that the Marker.events property is no longer being set when a marker is initialised.
As an example, you can see that http://openlayers.org/dev/examples/georss-markers.html no longer shows the markers, with an error message that marker.events is null.
I worked around the error message by explicitly adding events property to the marker:
marker.events = new OpenLayers.Events(marker, marker.icon.imageDiv, null);
before trying to register events:
marker.events.register("mousedown", feature, markerClick);
It seems that the events property of Marker is no longer being defined in the constructor of the class.
Is that intentional?
- Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20091027/edffcaf8/attachment.html
More information about the Dev
mailing list