I have multiple layers in OpenLayers: three vector layers, one google map layer, and a marker layer. I registered feature selected event to all three vector layers (which works fine, but btw is that a good practice to register events one by one?). When I registered the click event for marker layer, it doesn't respond.
var marker = new OpenLayers.Marker(position, icon);
marker.events.register('click', marker, function(e){
// Do something...
});
markerLayer.addMarker(marker);
I wondered if it was caused by the problem of layer order. I tried setting ZIndex for layers, but it didn't work.