[OpenLayers-Users] mouse events on vector and marker layers?
Wendell Turner
wendell at enflight.com
Tue Jun 2 18:17:43 EDT 2009
I would like to get mouse events on multiple kinds of
layers, or more specifically, on some Vector layers and a
Marker layer. I can get events on Vector layers, or a
Marker layer, but not both. I'm using svn from a few days
ago.
when I define two Vector layers, and call:
myselectControl = new OpenLayers.Control.SelectFeature(
[ aLayer, bLayer ], ...
it works fine. However, the markers on the Marker layer
are not mouse sensitive.
if I don't make that call, the markers on the Marker layer
work fine. The marker layer pop-up is enabled by:
adot.marker.events.register('mousedown', adot.marker,
function(evt) {
var popup = new OpenLayers.Popup.FramedCloud( ...
if I include the marker layer in the SelectFeature call like
this:
myselectControl = new OpenLayers.Control.SelectFeature(
[ aLayer, bLayer, markerLayer ], ...
it results in the firebug error:
layer.renderer is undefined
Q: how can mouse events be enabled on both Vector and Marker
layers?
Wendell
More information about the Users
mailing list