[OpenLayers-Users] select on markers and vectors?

Wendell Turner wendell at enflight.com
Wed Oct 14 16:58:14 EDT 2009


Can mouse events be registered & work on both Vector layers
and Marker layers?

I have several Vector layers, and they work fine for mouse
click events.  I tried to add a Marker layer with various
png images, and have those images clickable also.  It didn't
work.  Is this possible?  I've not been able to make this
work.  Only vector layers are allowed in
OpenLayers.Control.SelectFeature.

Does marker.events.register('onclick',...) not work if the
vector layers are clickable?

If it must be a Vector layer, the styleMap can be used to
change the marker image.  What if I want each marker image
to be different?  Is that done with lots of styleMaps or
some other way?

Wendell




More information about the Users mailing list