I have an OpenLayers Map. On this map, I have three overlay layers. The first 2 layers come from one GeoServer Layer/data source, with two alternate styles. The 3rd layer is a separate GeoServer Layer / data source.

For example, I have a GeoSever Layer called 'Roads'. For my 'Roads' Layer, I have a 'Highway' style to show features with a highway attribute, and a 'Street' style to show features with a street attribute, but both are from my 'Roads' layer. The third layer is a called 'Lights', and is a separate set of features.

The issue is that in OpenLayers, If I have only the 'Roads/Highway' Layer visible, I can successfully do a WMSGetFeatureInfo for my popup. If I only have the 'Roads/Street' Layer visible, I can do a WMSGetFeatureInfo for my popup. But, when I have both the 'Roads/Highway' and the 'Roads/Street' layers simultaneously visible, I can only get a response from the top most drawn layer (painters model). The other layer beneath the resonsive layer, doesn't give me featureInfo.

Note: when I have either the 'Roads/Highway' or the 'Roads/Street' layer visible with 'Lights' layer, then I can get a featureInfo response from both the 'Lights' layer and whichever 'Roads' layer I have on.

One further note which I am not sure is relevant, is that I have my GeoServer styles connected to a Workspace.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.