Fix default icon to exist correctly
This commit is contained in:
parent
58d6662bd8
commit
88040dc80e
@ -1,5 +1,6 @@
|
||||
### Change Log for Node-RED Worldmap
|
||||
|
||||
- v2.0.10 - Ensure default icon is in place if not specified (regression)
|
||||
- v2.0.9 - Only update maxage on screen once it exists
|
||||
- v2.0.8 - Drop beta flag, re-organise index, js and css files. Now using leaflet 1.4
|
||||
- v2.0.7-beta - Switch Ruler control to be independent of Draw library.
|
||||
|
@ -9,6 +9,7 @@ map web page for plotting "things" on.
|
||||
|
||||
### Updates
|
||||
|
||||
- v2.0.10 - Ensure default icon is in place if not specified (regression)
|
||||
- v2.0.9 - Only update maxage on screen once it exists
|
||||
- v2.0.8 - Drop beta flag, re-organise index, js and css files. Now using leaflet 1.4
|
||||
- v2.0.7-beta - Switch Ruler control to be independent of Draw library.
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-contrib-web-worldmap",
|
||||
"version": "2.0.9",
|
||||
"version": "2.0.10",
|
||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||
"dependencies": {
|
||||
"cgi": "0.3.1",
|
||||
|
@ -1263,18 +1263,8 @@ function setMarker(data) {
|
||||
marker = L.marker(ll, {title:data.name, icon:myMarker, draggable:drag});
|
||||
labelOffset = [16,-16];
|
||||
}
|
||||
else {
|
||||
myMarker = L.VectorMarkers.icon({
|
||||
icon: data.icon || "circle",
|
||||
markerColor: (data.iconColor || "#910000"),
|
||||
prefix: 'fa',
|
||||
iconColor: 'white'
|
||||
});
|
||||
marker = L.marker(ll, {title:data.name, icon:myMarker, draggable:drag});
|
||||
labelOffset = [6,-6];
|
||||
}
|
||||
}
|
||||
if (data.hasOwnProperty("SIDC")) {
|
||||
else if (data.hasOwnProperty("SIDC")) {
|
||||
// "SIDC":"SFGPU------E***","name":"1.C2 komp","fullname":"1.C2 komp/FTS/INSS"
|
||||
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
|
||||
@ -1289,6 +1279,16 @@ function setMarker(data) {
|
||||
});
|
||||
marker = L.marker(ll, { title:data.name, icon:myicon, draggable:drag });
|
||||
}
|
||||
else {
|
||||
myMarker = L.VectorMarkers.icon({
|
||||
icon: data.icon || "circle",
|
||||
markerColor: (data.iconColor || "#910000"),
|
||||
prefix: 'fa',
|
||||
iconColor: 'white'
|
||||
});
|
||||
marker = L.marker(ll, {title:data.name, icon:myMarker, draggable:drag});
|
||||
labelOffset = [6,-6];
|
||||
}
|
||||
marker.name = data.name;
|
||||
|
||||
// var createLabelIcon = function(labelText) {
|
||||
|
Loading…
Reference in New Issue
Block a user