I would like to hover over one of my layers and display the feature site_name
next to the feature like a label. I would also like to have this control
active all of the time - while pan, identify, zoomIn, ... are active.
Using the control below the "overFeature" code is never reached.
Help,
Joe
userHoverControl = new OpenLayers.Control.SelectFeature(
userLayer,
{
hover: true,
highlightOnly: false,
clickout: false,
toggle: false,
multiple: false,
overFeature: function(feature) {
alert(feature.attributes.site_name);
},
outFeature: function(feature) {
console.log('hover out: ' +
feature.attributes.site_name);
},
}
);
map.addControl(userHoverControl);
userHoverControl.activate();
--
View this message in context:
http://n2.nabble.com/Hover-over-point-Display-name-tp4897211p4897211.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.
_______________________________________________
Dev mailing list
[email protected]
http://openlayers.org/mailman/listinfo/dev