[Geoserver-users] LayerGroup creation from REST Configruation

Hi Ronak,

You have found yet another hole in the docs. I will try to update when i get a sec. But the quick answer is yes, only the name and the layers are necessary when posting a layer group. The bounding box is the spatial extent of the layer group. You can specify a bounding box, but it is not necessary, it will be calculated automatically if not specified. Usually the only reason to specify it would be if perhaps one of the layers in the group is quite big and you want the group to be constrained to a smaller spatial extent. Like the tiger-ny layer group that comes with vanilla geoserver configuration.

The styles are optional, if you don't specify them then the default style for each layer will be used. If you do specify them, then you specify a style for each layer specified.

Hope that helps.

-Justin

Patel, Ronak Avinash (US SSA) wrote:

Justin,

I was looking at the LayerGroup REST API Documentation and I see that it has a POST API Document:

http://docs.geoserver.org/1.7.4/user/extensions/rest/rest-config-api.html#id8

However, it does not list what are the required parameters for a POST for a LayerGroup.

I assume I have to pass the name and the list of Layers. Do I need to specify a bounding box? What is that the bounding box of? How can I compile that bounding box?

What are the Styles? Do I have to specify those as well?

Ronak

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.