2

Here is a part of my code:

var wms = new ol.layer.Tile({
            source: new ol.source.TileWMS({
                url: 'localhost:8080/geoserver/BEIS_WS/wms',
                params: {
                    'LAYERS':'BEIS_WS:mahalle_alan', 'cql_filter':'tmno=1453'
                },
                serverType: 'geoserver',
            }),
            opacity: 0.4
        });
        wms.setProperties({ attributes: {}, type: "exampleLayer" });
        map.addLayer(wms);

I googled but I did not find the answer, is there any way to get wms layer's extent in OpenLayers3? After I added layer, result on console is here:

1

If you mean minimum bounding box of your data that the WMS is rendering you need to make a separate call to geoserver (WPS) to get that given that your datasource is in a vector format. Or you could call the REST-API to get the configured bounding box of the layer.

  • Thank you for your response @koordo , I will try your suggestion. – OzkanCiftci Oct 26 '14 at 17:21

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.