Add remove base layers example

This commit is contained in:
Dave Conway-Jones 2019-03-19 14:25:04 +00:00
parent ea9b4afcb5
commit e877673ac0
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4

View File

@ -335,6 +335,15 @@ style server by adding a property `wms: true`. (see overlay example below)
"opt":{ "maxZoom":19, "attribution":"© OpenStreetMap" }
};
#### To remove base or overlay layers
To remove several layers, either base layers or overlays, you can pass an array of names as follows.
This can be useful tidy up the initial selections available to the user layer menu.
msg.payload.command.map = {
"delete":["Watercolor","Ship Nav","Heatmap"]
};
#### To add a WMS overlay layer - eg US weather radar
To add an overlay instead of a base layer - specify the `overlay` property instead of the `name`.