[OpenLayers-Users] Selectfeature not firing
Chris Green
chris.green at ibstv.co.uk
Wed Feb 24 08:47:24 EST 2010
Hello all
Hope someone can help with what is probably a simple problem that I don't
seem to be able to solve. I have created a vector layer which has features
taken from a wms layer:
var wfs = new OpenLayers.Layer.Vector("Countries WFS", {
styleMap: styleMap2,
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url:
"http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/OLFurtherTest/htdocs/
wfsVectorGetFeature.map",
featureType: "France",
featureNS: "http://mapserver.gis.umn.edu/mapserver"
})
});
map.addLayer(wfs);
This works OK, but I want to be able to click to select an individual
feature so I added:
var selectCtrl = new OpenLayers.Control.SelectFeature(wfs,
{clickout: true}
);
map.addControl(selectCtrl);
selectCtrl.activate();
However the selectfeature control does not fire in response to any map
clicks. Can anyone suggest what I am missing?
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100224/635edc0f/attachment.html
More information about the Users
mailing list