better fix for default icon
This commit is contained in:
parent
88040dc80e
commit
d750237f97
@ -1,6 +1,6 @@
|
|||||||
### Change Log for Node-RED Worldmap
|
### 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.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.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.
|
- 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
|
### 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.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.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.
|
- v2.0.7-beta - Switch Ruler control to be independent of Draw library.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-contrib-web-worldmap",
|
"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.",
|
"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",
|
||||||
|
@ -1054,6 +1054,7 @@ function setMarker(data) {
|
|||||||
|
|
||||||
if (data.draggable === true) { drag = true; }
|
if (data.draggable === true) { drag = true; }
|
||||||
//console.log("ICON",data.icon);
|
//console.log("ICON",data.icon);
|
||||||
|
console.log("DATA",data);
|
||||||
if (data.hasOwnProperty("icon")) {
|
if (data.hasOwnProperty("icon")) {
|
||||||
if (data.icon === "ship") {
|
if (data.icon === "ship") {
|
||||||
marker = L.boatMarker(ll, {
|
marker = L.boatMarker(ll, {
|
||||||
@ -1263,6 +1264,16 @@ function setMarker(data) {
|
|||||||
marker = L.marker(ll, {title:data.name, icon:myMarker, draggable:drag});
|
marker = L.marker(ll, {title:data.name, icon:myMarker, draggable:drag});
|
||||||
labelOffset = [16,-16];
|
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")) {
|
else if (data.hasOwnProperty("SIDC")) {
|
||||||
// "SIDC":"SFGPU------E***","name":"1.C2 komp","fullname":"1.C2 komp/FTS/INSS"
|
// "SIDC":"SFGPU------E***","name":"1.C2 komp","fullname":"1.C2 komp/FTS/INSS"
|
||||||
@ -1281,7 +1292,7 @@ function setMarker(data) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myMarker = L.VectorMarkers.icon({
|
myMarker = L.VectorMarkers.icon({
|
||||||
icon: data.icon || "circle",
|
icon: "circle",
|
||||||
markerColor: (data.iconColor || "#910000"),
|
markerColor: (data.iconColor || "#910000"),
|
||||||
prefix: 'fa',
|
prefix: 'fa',
|
||||||
iconColor: 'white'
|
iconColor: 'white'
|
||||||
|
Loading…
Reference in New Issue
Block a user