small readme update to include wms overlay

This commit is contained in:
Dave Conway-Jones 2018-10-02 18:54:09 +01:00
parent 98391b4b75
commit fb9b44e5be
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4

View File

@ -269,12 +269,31 @@ Optional properties include
#### To add a new base layer #### To add a new base layer
The layer will be called `name`. By default it expects a leaflet Tilelayer style url. You can also use a WMS
style server by adding a property `wms: true`. (see overlay example below)
msg.payload.command.map = { msg.payload.command.map = {
name:"OSMhot", name:"OSMhot",
url:'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', url:'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
opt:{ maxZoom:19, attribution:"© OpenStreetMap" } opt:{ maxZoom:19, attribution:"© OpenStreetMap" }
}; };
#### 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`.
msg.payload.command.map = {
overlay: "NowCoast",
url: 'https://nowcoast.noaa.gov/arcgis/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/WmsServer?',
opt: {
layers: '1',
format: 'image/png',
transparent: true,
attribution: "NOAA/NWS"
},
wms: true
}
#### To add a new geoJSON overlay #### To add a new geoJSON overlay
msg.payload.command.map = { msg.payload.command.map = {