admin管理员组文章数量:1356371
We'd like to have two different styles for a given layer group and to be able to select styles using styles=STYLE_NAME
in the URL.
We found that it's doable by adding alternative layer group styles using Geoserver's UI like so:
First hit "Add new", then "Add Layer", then click on each layer and assign its alternative style and you're good.
Everything works when we pass styles
param in the group's URL.
Fine, now how to do that via API?
If I GET
such a layer group I can see info about `layerGroupsStyles":
However, if I send a POST request with the following XML
<layerGroup>
<name>my new group</name>
<layers><layer><name>a new layer</name></layer></layers>
<styles>
<style>line</style>
</styles>
<layerGroupStyles>
<LayerGroupStyle>
<name>cockpit</name>
<layers><layer><name>a new layer</name></layer></layers>
<styles>
<style>my_line_style</style>
</styles>
</LayerGroupStyle>
</layerGroupStyles>
</layerGroup>
then I get this error:
Unexpected item null whose type is not among: [interface .geoserver.catalog.LayerInfo, interface .geoserver.catalog.LayerGroupInfo]
Swagger does not help as there is no mention of layerGroupsStyles
at all.
Any help is much appreciated as I can't, for the life of me, understand how and where to read about Geoserver's API.
Thanks!
本文标签: geoserverHow can I add a second layerGroup style using rest APIStack Overflow
版权声明:本文标题:geoserver - How can I add a second layerGroup style using rest API? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744040349a2580545.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论