0

I have two different layers which I call from Geoserver. The first one is a WMS layer with points and the second one is WFS layer with lines. I need to display the points above the lines and I also need to be able to select each line and get some data. I use the Openlayers2 library to display the layers on the map. I set the index of the WMS layer like this:

wms_layer.setZIndex( 1001 );

So I am sure it will appear on top when I display it from the layer switcher. But the problem is that when I make visible the WMS layer then the WFS layer is not clickable. Is there a way to fix this?

0

Afterall I decided to use a WFS layer instead of a WMS one. I still had the same problem but it was fixed when I added the layer in the following code:

clickControl = new OpenLayers.Control.SelectFeature(
                    [wfs_layer_network,wfs_layer_komvoi,wfs_layer_freatia], // wfs_layer_freatia -> added layer
                    {
                        clickout: true,
                        //hover: true,
                        //box: true
                    }
    );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.