Add geojson layer capability
This commit is contained in:
parent
8b07db78df
commit
4aea60ea32
18
README.md
18
README.md
@ -7,6 +7,7 @@ map web page for plotting "things" on.
|
|||||||
![Map Image](https://dceejay.github.io/pages/images/redmap.png)
|
![Map Image](https://dceejay.github.io/pages/images/redmap.png)
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
- v1.1.9 - add ability to add geoJSON layers
|
||||||
- v1.1.8 - add videoUrl property to allow mp4 insert in popup
|
- v1.1.8 - add videoUrl property to allow mp4 insert in popup
|
||||||
- v1.1.7 - extend path correctly - Issue #28
|
- v1.1.7 - extend path correctly - Issue #28
|
||||||
- v1.1.6 - cleanup/remove excess logging
|
- v1.1.6 - cleanup/remove excess logging
|
||||||
@ -56,21 +57,20 @@ The minimum **msg.payload** must contain `name`, `lat` and `lon` properties, e.g
|
|||||||
|
|
||||||
Optional properties include
|
Optional properties include
|
||||||
|
|
||||||
|
- **deleted** : set to <i>true</i> to remove the named marker. (default false)
|
||||||
- **layer** : specify a layer on the map to add marker to.
|
- **layer** : specify a layer on the map to add marker to.
|
||||||
- **speed** : combined with bearing, draws a vector.
|
- **speed** : combined with bearing, draws a vector.
|
||||||
- **bearing** : combined with speed, draws a vector.
|
- **bearing** : combined with speed, draws a vector.
|
||||||
- **accuracy** : combined with bearing, draws a polygon of possible direction.
|
- **accuracy** : combined with bearing, draws a polygon of possible direction.
|
||||||
- **icon** : <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_new">font awesome</a> icon name.
|
- **icon** : <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_new">font awesome</a> icon name.
|
||||||
- **iconColor** : Standard CSS color name or #rrggbb hex value.
|
- **iconColor** : Standard CSS colour name or #rrggbb hex value.
|
||||||
- **ttl** : time to live, how long an individual marker stays on map in seconds (overrides general maxage setting)
|
- **ttl** : time to live, how long an individual marker stays on map in seconds (overrides general maxage setting)
|
||||||
- **photoUrl** : adds an image pointed at by the url to the popup box.
|
- **photoUrl** : adds an image pointed at by the url to the popup box.
|
||||||
- **videoUrl** : adds an mp4 video pointed at by the url to the popup box. Ideally 320x240 in size.
|
- **videoUrl** : adds an mp4 video pointed at by the url to the popup box. Ideally 320x240 in size.
|
||||||
- **weblink** : adds a link to an external page for more information. Either set a url as a *string*, or an *object* like `{name:"BBC News", url:"news.bbc.co.uk"}`
|
- **weblink** : adds a link to an external page for more information. Either set a url as a *string*, or an *object* like `{name:"BBC News", url:"news.bbc.co.uk"}`
|
||||||
- **deleted** : set to <i>true</i> to remove the named marker. (default false)
|
- **addtoheatmap** : set to <i>false</i> to exclude point from contributing to heatmap layer. (default true)
|
||||||
- **addtoheatmap** : set to <i>false</i> to exlcude point from contributing to heatmap layer. (default true)
|
|
||||||
- **intensity** : set to a value of 0.1 - 1.0 to set the intensity of the point on heatmap layer. (default 1.0)
|
- **intensity** : set to a value of 0.1 - 1.0 to set the intensity of the point on heatmap layer. (default 1.0)
|
||||||
|
|
||||||
|
|
||||||
Any other `msg.payload` properties will be added to the icon popup text box.
|
Any other `msg.payload` properties will be added to the icon popup text box.
|
||||||
|
|
||||||
You may select any of the Font Awesome set of [icons](http://fortawesome.github.io/Font-Awesome/icons/).
|
You may select any of the Font Awesome set of [icons](http://fortawesome.github.io/Font-Awesome/icons/).
|
||||||
@ -189,6 +189,16 @@ To add a new base layer
|
|||||||
opt:{ maxZoom:19, attribution:"© OpenStreetMap" }
|
opt:{ maxZoom:19, attribution:"© OpenStreetMap" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
To add a new geoJSON overlay
|
||||||
|
|
||||||
|
msg.payload.command.map = {
|
||||||
|
overlay:"myGeoJSON",
|
||||||
|
geojson:{ geojson feature as an object },
|
||||||
|
(opt:{ optional geojson options, style, filter, onEach,Feature, etc })
|
||||||
|
};
|
||||||
|
|
||||||
|
see http://leafletjs.com/examples/geojson/ for more details about options
|
||||||
|
|
||||||
To add an Image Overlay
|
To add an Image Overlay
|
||||||
|
|
||||||
var imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
|
var imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
|
||||||
|
471
package-lock.json
generated
Normal file
471
package-lock.json
generated
Normal file
@ -0,0 +1,471 @@
|
|||||||
|
{
|
||||||
|
"name": "node-red-contrib-web-worldmap",
|
||||||
|
"version": "1.1.9",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"accepts": {
|
||||||
|
"version": "1.3.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz",
|
||||||
|
"integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=",
|
||||||
|
"requires": {
|
||||||
|
"mime-types": "2.1.17",
|
||||||
|
"negotiator": "0.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"array-flatten": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
|
||||||
|
},
|
||||||
|
"body-parser": {
|
||||||
|
"version": "1.18.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz",
|
||||||
|
"integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=",
|
||||||
|
"requires": {
|
||||||
|
"bytes": "3.0.0",
|
||||||
|
"content-type": "1.0.4",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "1.1.1",
|
||||||
|
"http-errors": "1.6.2",
|
||||||
|
"iconv-lite": "0.4.19",
|
||||||
|
"on-finished": "2.3.0",
|
||||||
|
"qs": "6.5.1",
|
||||||
|
"raw-body": "2.3.2",
|
||||||
|
"type-is": "1.6.15"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"requires": {
|
||||||
|
"ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bufferjs": {
|
||||||
|
"version": "https://registry.npmjs.org/bufferjs/-/bufferjs-3.0.1.tgz",
|
||||||
|
"integrity": "sha1-BpLoKcsQoQVQ5kc5CwNesGw46O8="
|
||||||
|
},
|
||||||
|
"bufferlist": {
|
||||||
|
"version": "https://registry.npmjs.org/bufferlist/-/bufferlist-0.1.0.tgz",
|
||||||
|
"integrity": "sha1-Qr7y2JVztA+hCGuzng9TEBcNHd0="
|
||||||
|
},
|
||||||
|
"bytes": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
|
||||||
|
},
|
||||||
|
"cgi": {
|
||||||
|
"version": "https://registry.npmjs.org/cgi/-/cgi-0.3.1.tgz",
|
||||||
|
"integrity": "sha1-h1HaZKHPGEnREFYxi3YNGs+6R9w=",
|
||||||
|
"requires": {
|
||||||
|
"debug": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
|
||||||
|
"extend": "https://registry.npmjs.org/extend/-/extend-2.0.1.tgz",
|
||||||
|
"header-stack": "https://registry.npmjs.org/header-stack/-/header-stack-0.0.2.tgz",
|
||||||
|
"stream-stack": "https://registry.npmjs.org/stream-stack/-/stream-stack-1.1.4.tgz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content-disposition": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
|
||||||
|
"integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
|
||||||
|
},
|
||||||
|
"content-type": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
|
||||||
|
},
|
||||||
|
"cookie": {
|
||||||
|
"version": "0.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
|
||||||
|
"integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
|
||||||
|
},
|
||||||
|
"cookie-signature": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
||||||
|
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
|
||||||
|
},
|
||||||
|
"debug": {
|
||||||
|
"version": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
|
||||||
|
"integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
|
||||||
|
"requires": {
|
||||||
|
"ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"depd": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k="
|
||||||
|
},
|
||||||
|
"destroy": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
|
||||||
|
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
|
||||||
|
},
|
||||||
|
"ee-first": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
|
||||||
|
},
|
||||||
|
"encodeurl": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA="
|
||||||
|
},
|
||||||
|
"escape-html": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
|
||||||
|
},
|
||||||
|
"etag": {
|
||||||
|
"version": "1.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
||||||
|
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
|
||||||
|
},
|
||||||
|
"express": {
|
||||||
|
"version": "4.16.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/express/-/express-4.16.2.tgz",
|
||||||
|
"integrity": "sha1-41xt/i1kt9ygpc1PIXgb4ymeB2w=",
|
||||||
|
"requires": {
|
||||||
|
"accepts": "1.3.4",
|
||||||
|
"array-flatten": "1.1.1",
|
||||||
|
"body-parser": "1.18.2",
|
||||||
|
"content-disposition": "0.5.2",
|
||||||
|
"content-type": "1.0.4",
|
||||||
|
"cookie": "0.3.1",
|
||||||
|
"cookie-signature": "1.0.6",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "1.1.1",
|
||||||
|
"encodeurl": "1.0.1",
|
||||||
|
"escape-html": "1.0.3",
|
||||||
|
"etag": "1.8.1",
|
||||||
|
"finalhandler": "1.1.0",
|
||||||
|
"fresh": "0.5.2",
|
||||||
|
"merge-descriptors": "1.0.1",
|
||||||
|
"methods": "1.1.2",
|
||||||
|
"on-finished": "2.3.0",
|
||||||
|
"parseurl": "1.3.2",
|
||||||
|
"path-to-regexp": "0.1.7",
|
||||||
|
"proxy-addr": "2.0.2",
|
||||||
|
"qs": "6.5.1",
|
||||||
|
"range-parser": "1.2.0",
|
||||||
|
"safe-buffer": "5.1.1",
|
||||||
|
"send": "0.16.1",
|
||||||
|
"serve-static": "1.13.1",
|
||||||
|
"setprototypeof": "1.1.0",
|
||||||
|
"statuses": "1.3.1",
|
||||||
|
"type-is": "1.6.15",
|
||||||
|
"utils-merge": "1.0.1",
|
||||||
|
"vary": "1.1.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"requires": {
|
||||||
|
"ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extend": {
|
||||||
|
"version": "https://registry.npmjs.org/extend/-/extend-2.0.1.tgz",
|
||||||
|
"integrity": "sha1-HugBBonnOV/5RIJByYZSvHWagmA="
|
||||||
|
},
|
||||||
|
"faye-websocket": {
|
||||||
|
"version": "0.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz",
|
||||||
|
"integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=",
|
||||||
|
"requires": {
|
||||||
|
"websocket-driver": "0.7.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"finalhandler": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=",
|
||||||
|
"requires": {
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"encodeurl": "1.0.1",
|
||||||
|
"escape-html": "1.0.3",
|
||||||
|
"on-finished": "2.3.0",
|
||||||
|
"parseurl": "1.3.2",
|
||||||
|
"statuses": "1.3.1",
|
||||||
|
"unpipe": "1.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"requires": {
|
||||||
|
"ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"forwarded": {
|
||||||
|
"version": "0.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
|
||||||
|
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
|
||||||
|
},
|
||||||
|
"fresh": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
||||||
|
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
|
||||||
|
},
|
||||||
|
"header-stack": {
|
||||||
|
"version": "https://registry.npmjs.org/header-stack/-/header-stack-0.0.2.tgz",
|
||||||
|
"integrity": "sha1-Rg1ysW04ZSzkUeIyU2lxsx6E1g8=",
|
||||||
|
"requires": {
|
||||||
|
"bufferjs": "https://registry.npmjs.org/bufferjs/-/bufferjs-3.0.1.tgz",
|
||||||
|
"bufferlist": "https://registry.npmjs.org/bufferlist/-/bufferlist-0.1.0.tgz",
|
||||||
|
"stream-stack": "https://registry.npmjs.org/stream-stack/-/stream-stack-1.1.4.tgz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"http-errors": {
|
||||||
|
"version": "1.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz",
|
||||||
|
"integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=",
|
||||||
|
"requires": {
|
||||||
|
"depd": "1.1.1",
|
||||||
|
"inherits": "2.0.3",
|
||||||
|
"setprototypeof": "1.0.3",
|
||||||
|
"statuses": "1.3.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"setprototypeof": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"http-parser-js": {
|
||||||
|
"version": "0.4.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.9.tgz",
|
||||||
|
"integrity": "sha1-6hoE+2St/wJC6ZdPKX3Uw8rSceE="
|
||||||
|
},
|
||||||
|
"iconv-lite": {
|
||||||
|
"version": "0.4.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
|
||||||
|
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="
|
||||||
|
},
|
||||||
|
"inherits": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||||
|
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
||||||
|
},
|
||||||
|
"ipaddr.js": {
|
||||||
|
"version": "1.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.5.2.tgz",
|
||||||
|
"integrity": "sha1-1LUFvemUaYfM8PxY2QEP+WB+P6A="
|
||||||
|
},
|
||||||
|
"media-typer": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||||
|
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
|
||||||
|
},
|
||||||
|
"merge-descriptors": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
|
||||||
|
},
|
||||||
|
"methods": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
|
||||||
|
},
|
||||||
|
"mime": {
|
||||||
|
"version": "1.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
|
||||||
|
"integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ=="
|
||||||
|
},
|
||||||
|
"mime-db": {
|
||||||
|
"version": "1.30.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
|
||||||
|
"integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE="
|
||||||
|
},
|
||||||
|
"mime-types": {
|
||||||
|
"version": "2.1.17",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
|
||||||
|
"integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=",
|
||||||
|
"requires": {
|
||||||
|
"mime-db": "1.30.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ms": {
|
||||||
|
"version": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||||
|
},
|
||||||
|
"negotiator": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
|
||||||
|
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
|
||||||
|
},
|
||||||
|
"on-finished": {
|
||||||
|
"version": "2.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
||||||
|
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
|
||||||
|
"requires": {
|
||||||
|
"ee-first": "1.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parseurl": {
|
||||||
|
"version": "1.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
|
||||||
|
"integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
|
||||||
|
},
|
||||||
|
"path-to-regexp": {
|
||||||
|
"version": "0.1.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
||||||
|
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
|
||||||
|
},
|
||||||
|
"proxy-addr": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.2.tgz",
|
||||||
|
"integrity": "sha1-ZXFQT0e7mI7IGAJT+F3X4UlSvew=",
|
||||||
|
"requires": {
|
||||||
|
"forwarded": "0.1.2",
|
||||||
|
"ipaddr.js": "1.5.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"qs": {
|
||||||
|
"version": "6.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
|
||||||
|
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="
|
||||||
|
},
|
||||||
|
"range-parser": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
|
||||||
|
"integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4="
|
||||||
|
},
|
||||||
|
"raw-body": {
|
||||||
|
"version": "2.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz",
|
||||||
|
"integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=",
|
||||||
|
"requires": {
|
||||||
|
"bytes": "3.0.0",
|
||||||
|
"http-errors": "1.6.2",
|
||||||
|
"iconv-lite": "0.4.19",
|
||||||
|
"unpipe": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"safe-buffer": {
|
||||||
|
"version": "5.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
|
||||||
|
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
|
||||||
|
},
|
||||||
|
"send": {
|
||||||
|
"version": "0.16.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz",
|
||||||
|
"integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==",
|
||||||
|
"requires": {
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "1.1.1",
|
||||||
|
"destroy": "1.0.4",
|
||||||
|
"encodeurl": "1.0.1",
|
||||||
|
"escape-html": "1.0.3",
|
||||||
|
"etag": "1.8.1",
|
||||||
|
"fresh": "0.5.2",
|
||||||
|
"http-errors": "1.6.2",
|
||||||
|
"mime": "1.4.1",
|
||||||
|
"ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
"on-finished": "2.3.0",
|
||||||
|
"range-parser": "1.2.0",
|
||||||
|
"statuses": "1.3.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"requires": {
|
||||||
|
"ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"serve-static": {
|
||||||
|
"version": "1.13.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz",
|
||||||
|
"integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==",
|
||||||
|
"requires": {
|
||||||
|
"encodeurl": "1.0.1",
|
||||||
|
"escape-html": "1.0.3",
|
||||||
|
"parseurl": "1.3.2",
|
||||||
|
"send": "0.16.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"setprototypeof": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
|
||||||
|
},
|
||||||
|
"sockjs": {
|
||||||
|
"version": "0.3.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz",
|
||||||
|
"integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==",
|
||||||
|
"requires": {
|
||||||
|
"faye-websocket": "0.10.0",
|
||||||
|
"uuid": "3.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"statuses": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
|
||||||
|
"integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4="
|
||||||
|
},
|
||||||
|
"stream-stack": {
|
||||||
|
"version": "https://registry.npmjs.org/stream-stack/-/stream-stack-1.1.4.tgz",
|
||||||
|
"integrity": "sha1-cIRgQrqwGFAI5Qnt/h93+TYcumk="
|
||||||
|
},
|
||||||
|
"type-is": {
|
||||||
|
"version": "1.6.15",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz",
|
||||||
|
"integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=",
|
||||||
|
"requires": {
|
||||||
|
"media-typer": "0.3.0",
|
||||||
|
"mime-types": "2.1.17"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"unpipe": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
|
||||||
|
},
|
||||||
|
"utils-merge": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
|
||||||
|
},
|
||||||
|
"uuid": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g=="
|
||||||
|
},
|
||||||
|
"vary": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
|
||||||
|
},
|
||||||
|
"websocket-driver": {
|
||||||
|
"version": "0.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz",
|
||||||
|
"integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=",
|
||||||
|
"requires": {
|
||||||
|
"http-parser-js": "0.4.9",
|
||||||
|
"websocket-extensions": "0.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"websocket-extensions": {
|
||||||
|
"version": "0.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz",
|
||||||
|
"integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
28
package.json
28
package.json
@ -1,20 +1,24 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-contrib-web-worldmap",
|
"name": "node-red-contrib-web-worldmap",
|
||||||
"version" : "1.1.8",
|
"version": "1.1.9",
|
||||||
"description" : "A Node-RED node to provide a web page of a world map for plotting things on.",
|
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||||
"dependencies" : {
|
"dependencies": {
|
||||||
"express": "^4.15.0",
|
"express": "^4.16.2",
|
||||||
"sockjs": "^0.3.18",
|
"sockjs": "^0.3.19",
|
||||||
"cgi": "0.3.1"
|
"cgi": "0.3.1"
|
||||||
},
|
},
|
||||||
"repository" : {
|
"repository": {
|
||||||
"type":"git",
|
"type": "git",
|
||||||
"url":"https://github.com/dceejay/RedMap"
|
"url": "https://github.com/dceejay/RedMap"
|
||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"keywords": [ "node-red", "map", "world" ],
|
"keywords": [
|
||||||
"node-red" : {
|
"node-red",
|
||||||
"nodes" : {
|
"map",
|
||||||
|
"world"
|
||||||
|
],
|
||||||
|
"node-red": {
|
||||||
|
"nodes": {
|
||||||
"worldmap": "worldmap.js"
|
"worldmap": "worldmap.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1149,6 +1149,14 @@ function doCommand(cmd) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Add a new overlay layer
|
// Add a new overlay layer
|
||||||
|
if (cmd.map && cmd.map.hasOwnProperty("overlay") && cmd.map.hasOwnProperty("geojson") ) {
|
||||||
|
if (overlays.hasOwnProperty(cmd.map.overlay)) { existsalready = true; }
|
||||||
|
overlays[cmd.map.overlay] = L.geoJson(cmd.map.geojson,cmd.map.opt);
|
||||||
|
if (!existsalready) {
|
||||||
|
layercontrol.addOverlay(overlays[cmd.map.overlay],cmd.map.overlay);
|
||||||
|
}
|
||||||
|
overlays[cmd.map.overlay].addTo(map);
|
||||||
|
}
|
||||||
if (cmd.map && cmd.map.hasOwnProperty("overlay") && cmd.map.hasOwnProperty("url") && cmd.map.hasOwnProperty("opt")) {
|
if (cmd.map && cmd.map.hasOwnProperty("overlay") && cmd.map.hasOwnProperty("url") && cmd.map.hasOwnProperty("opt")) {
|
||||||
console.log("New overlay:",cmd.map.overlay);
|
console.log("New overlay:",cmd.map.overlay);
|
||||||
if (overlays.hasOwnProperty(cmd.map.overlay)) { existsalready = true; }
|
if (overlays.hasOwnProperty(cmd.map.overlay)) { existsalready = true; }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
# date: Oct 10th 2017 - v1.1.8
|
# date: Oct 10th 2017 - v1.1.9
|
||||||
|
|
||||||
CACHE:
|
CACHE:
|
||||||
index.html
|
index.html
|
||||||
|
Loading…
Reference in New Issue
Block a user