better fix for default icon
This commit is contained in:
parent
88040dc80e
commit
d750237f97
@ -1,6 +1,6 @@
|
||||
### Change Log for Node-RED Worldmap
|
||||
|
||||
- v2.0.10 - Ensure default icon is in place if not specified (regression)
|
||||
- v2.0.11 - 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,7 +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.11 - 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.10",
|
||||
"version": "2.0.11",
|
||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||
"dependencies": {
|
||||
"cgi": "0.3.1",
|
||||
|
@ -1054,6 +1054,7 @@ function setMarker(data) {
|
||||
|
||||
if (data.draggable === true) { drag = true; }
|
||||
//console.log("ICON",data.icon);
|
||||
console.log("DATA",data);
|
||||
if (data.hasOwnProperty("icon")) {
|
||||
if (data.icon === "ship") {
|
||||
marker = L.boatMarker(ll, {
|
||||
@ -1263,6 +1264,16 @@ 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];
|
||||
}
|
||||
}
|
||||
else if (data.hasOwnProperty("SIDC")) {
|
||||
// "SIDC":"SFGPU------E***","name":"1.C2 komp","fullname":"1.C2 komp/FTS/INSS"
|
||||
@ -1281,7 +1292,7 @@ function setMarker(data) {
|
||||
}
|
||||
else {
|
||||
myMarker = L.VectorMarkers.icon({
|
||||
icon: data.icon || "circle",
|
||||
icon: "circle",
|
||||
markerColor: (data.iconColor || "#910000"),
|
||||
prefix: 'fa',
|
||||
iconColor: 'white'
|
||||
|
Loading…
Reference in New Issue
Block a user