Did you try to modify the index of your wfs layer?
setLayerIndex or setLayerZIndex...not sure
I think setLayerIndex would be better
steve





Marc-André Trottier <[email protected]>@lists.osgeo.org 
Envoyé par : [email protected]
2013-12-18 09:13

A
[email protected]
cc

Objet
[OpenLayers-Users] SelectFeature on vector layer under WMS layer








I have a selectFeature define on my vector layer :
so, 'featureselected' event never start because my WMS layer is on top.
i looked for start manually the event but i was stopped when i saw on line 
#212 of Feature.js, the param 'evt' don't have the polygon who must be 
selected. 
How can i do this ?

P.S.: all that start with IE 8, because it can not support correctly 
labelling on layer vector. 
on IE 8, label is selected when you pass over and the polygon is 
unselected. 

some code : 

reg_admin = new OpenLayers.Layer.Vector("reg_admin", {
isBaseLayer:false,
rendererOptions: {zIndexing: true},
minResolution: 1200,
maxResolution: 5000,
clone:"",
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url:  "/cgi-wms/mapserv?map=dpop&service=wfs&version=1.1.0",
featureType: "dpop_criminalite_generale_v_s",
geometryName: "geom_s"
}),
filter:
new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.EQUAL_TO,
property: "year",
value: "2012"
                    })
});

reg_admin.events.on({
'featureselected': function(e) {
bla bla bla
},
'featureunselected': function(e) {
bla bla bla
}
});

var selecthover = new OpenLayers.Control.SelectFeature(
reg_admin,
{
 multiple: false,
 hover: true
}
);

numeroRegion = new OpenLayers.Layer.WMS( "numberOnly",
 '/cgi-wms/adnInternetV2?',
{layers: 'numberOnly',
  format: szFormat,
 transparent: true,
 NOCACHE: Math.random()
},
oWMSOverlayOptions
);
numeroRegion.setVisibility(true);
numeroRegion.displayInLayerSwitcher = false;

map.addControl(selecthover);
selecthover.activate();
map.addLayers([fondRelief, reg_admin, numeroRegion ]);


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to