Thanks again for the advice. I am following the code and Im obviously not
understanding the "click" part of things. My feature works fine when it is
hovered and I get the alert message, except I am getting nothing happening
when actually clicking on the feature, not sure what I am doing wrong.
var report = function(e) {
alert(e.type);
alert(e.feature.id);
};
var highlightCtrl = new
OpenLayers.Control.SelectFeature(test_hydrants, {
hover: true,
highlightOnly: true,
renderIntent: "temporary",
eventListeners: {
beforefeaturehighlighted: report,
featurehighlighted: report,
featureunhighlighted: report
}
});
var selectCtrl = new
OpenLayers.Control.SelectFeature(test_hydrants,
{clickout: true,
click: true,
eventListeners: {
featureselected: report
}
}
);
map.addControl(highlightCtrl);
map.addControl(selectCtrl);
highlightCtrl.activate();
selectCtrl.activate();
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Limit-features-returned-by-hover-event-on-Vector-Layer-tp6085625p6085977.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users