[Geoserver-devel] How to get Bounding Box Values for a layer

Hi All
I need a help. I am developing an application with GeoServer and OpenLayers. When I am making a WMS request and displaying a map using OpenLayers I need to specify the bounds that is present in GeoServer (Bounding box for the layer). Currently I have hardcoded teh smae value present in GeoServer in my page. But is there a way to get it dynamically at the server side or from OL. Please let me know…

Thanks
ganesh


Now you can chat without downloading messenger. Click here to know how.

Ganesh Jothikumar ha scritto:

Hi All
         I need a help. I am developing an application with GeoServer and OpenLayers. When I am making a WMS request and displaying a map using OpenLayers I need to specify the bounds that is present in GeoServer (Bounding box for the layer). Currently I have hardcoded teh smae value present in GeoServer in my page. But is there a way to get it dynamically at the server side or from OL. Please let me know...

The way is to call WMS GetCapabilities, parse the output and find
your layer... not a very efficient way in fact, since GeoServer
capabilities document is very long... but I'm not aware of any
other way.

Cheers
Andrea