层组

RESTAPI允许您在地理服务器中创建和修改图层组。

备注

下面的示例指定全局层组,但这些示例也将在特定于工作区的构造中工作。

创建图层组

Create a new layer group based on already-published layers

给定以下内容另存为 nycLayerGroup.xml

<layerGroup>
  <name>nyc</name>
  <layers>
    <layer>roads</layer>
    <layer>parks</layer>
    <layer>buildings</layer>
  </layers>
  <styles>
    <style>roads_style</style>
    <style>polygon</style>
    <style>polygon</style>
  </styles>
</layerGroup>

请求

卷曲

curl -v -u admin:geoserver -XPOST -d @nycLayerGroup.xml -H "Content-type: text/xml"
  http://localhost:8080/geoserver/rest/layergroups

响应

201 Created

备注

可以使用WMS GETMAP请求查看此层组::

http://localhost:8080/geoserver/wms/reflect?layers=nyc
Previous: 字体
Next: