handle SIDC missing getProperties function
This commit is contained in:
parent
5a99aaf57d
commit
16b8ce050b
@ -1,5 +1,6 @@
|
|||||||
### Change Log for Node-RED Worldmap
|
### Change Log for Node-RED Worldmap
|
||||||
|
|
||||||
|
- v2.0.22 - fix SIDC missing property
|
||||||
- v2.0.21 - allow adding overlays without making them visible (visible:false) - Issue #108
|
- v2.0.21 - allow adding overlays without making them visible (visible:false) - Issue #108
|
||||||
- v2.0.20 - ensure `fit` option is boolean, Issue #109. Fix track layers, Issue #110.
|
- v2.0.20 - ensure `fit` option is boolean, Issue #109. Fix track layers, Issue #110.
|
||||||
- v2.0.18 - Stop map contextmenu bleedthrough to marker. Add compress middleware.
|
- v2.0.18 - Stop map contextmenu bleedthrough to marker. Add compress middleware.
|
||||||
|
@ -9,6 +9,7 @@ map web page for plotting "things" on.
|
|||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
|
|
||||||
|
- v2.0.22 - fix SIDC missing property
|
||||||
- v2.0.21 - allow adding overlays without making them visible (visible:false) - Issue #108
|
- v2.0.21 - allow adding overlays without making them visible (visible:false) - Issue #108
|
||||||
- v2.0.20 - ensure `fit` option is boolean, Issue #109. Fix track layers, Issue #110.
|
- v2.0.20 - ensure `fit` option is boolean, Issue #109. Fix track layers, Issue #110.
|
||||||
- v2.0.18 - Stop map contextmenu bleedthrough to marker. Add compress middleware.
|
- v2.0.18 - Stop map contextmenu bleedthrough to marker. Add compress middleware.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-contrib-web-worldmap",
|
"name": "node-red-contrib-web-worldmap",
|
||||||
"version": "2.0.21",
|
"version": "2.0.22",
|
||||||
"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": {
|
||||||
"cgi": "0.3.1",
|
"cgi": "0.3.1",
|
||||||
|
@ -1317,7 +1317,11 @@ function setMarker(data) {
|
|||||||
myMarker = new ms.Symbol( data.SIDC.toUpperCase(), { uniqueDesignation:data.name });
|
myMarker = new ms.Symbol( data.SIDC.toUpperCase(), { uniqueDesignation:data.name });
|
||||||
// Now that we have a symbol we can ask for the echelon and set the symbol size
|
// Now that we have a symbol we can ask for the echelon and set the symbol size
|
||||||
var opts = data.options || {};
|
var opts = data.options || {};
|
||||||
opts.size = opts.size || iconSz[myMarker.getProperties().echelon] || 30;
|
var sz = 30;
|
||||||
|
if (myMarker.hasOwnProperty("getProperties") && myMarker.getProperties().hasOwnProperty("echelon")) {
|
||||||
|
sz = iconSz[myMarker.getProperties().echelon];
|
||||||
|
}
|
||||||
|
opts.size = opts.size || sz;
|
||||||
opts.size = opts.size * (opts.scale || 1);
|
opts.size = opts.size * (opts.scale || 1);
|
||||||
myMarker = myMarker.setOptions(opts);
|
myMarker = myMarker.setOptions(opts);
|
||||||
var myicon = L.icon({
|
var myicon = L.icon({
|
||||||
|
Loading…
Reference in New Issue
Block a user