new module:LayerGroupClient(url, auth)
Creates a GeoServer REST LayerGroupClient instance.
Parameters:
Name | Type | Description |
---|---|---|
url |
String | The URL of the GeoServer REST API endpoint |
auth |
String | The Basic Authentication string |
- Source:
Methods
(async) create(workspace, layerGroupName, layers) → {string}
Create a GeoServer layergroup by the given workspace, layerGroupName, layers and options
Parameters:
Name | Type | Description |
---|---|---|
workspace |
String | The name of the workspace |
layerGroupName |
String | The name of the layer group |
layers |
Array.<String> | List of layers to be added to the group. Must be in same workspace as layergroup |
options.mode |
String | The mode of the layergroup. Default to SINGLE |
options.layerGroupTitle |
String | The title of the layergroup. |
options.bounds |
bounds | The bounds of the layer group. |
- Source:
Throws:
Error if request fails
Returns:
A string with layer group location or undefined if not found
- Type
- string
(async) get(workspace, layerGroupName) → {Object}
Returns a GeoServer layergroup by the given workspace and layergroup name,
e.g. "myWs:myLayergroup".
Parameters:
Name | Type | Description |
---|---|---|
workspace |
String | The name of the workspace |
layerGroupName |
String | The name of the layer group to query |
- Source:
Throws:
Error if request fails
Returns:
An object with layer group information or undefined if it cannot be found
- Type
- Object
(async) update(workspace, layerName, layerGroupDefinition)
Updates an existing GeoServer layergroup
Parameters:
Name | Type | Description |
---|---|---|
workspace |
String | The name of the workspace |
layerName |
String | The name of the layergroup to update |
layerGroupDefinition |
Object | The updated definiton of the layergroup |
- Source:
Throws:
Error if request fails
Type Definitions
bounds
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
minx |
number | The minimum x coordinates. Default: -180 |
miny |
number | The minimum y coordinates. Default: -90 |
maxx |
number | The maximum x coordinates. Default: 180 |
maxy |
number | The maximum y coordinates. Default: 90 |
crs |
String | The crs of the bounds. Default: 'EPSG:4326' |
- Source: