show icon in circle if requested

to close #128
This commit is contained in:
Dave Conway-Jones 2020-04-19 21:51:51 +01:00
parent 8f51fa21ae
commit 99ed6f859b
No known key found for this signature in database
GPG Key ID: 302A6725C594817F
6 changed files with 29 additions and 26 deletions

View File

@ -1,5 +1,6 @@
### Change Log for Node-RED Worldmap ### Change Log for Node-RED Worldmap
- v2.3.7 - show icon within circle if icon present. Issue #128
- v2.3.6 - show ruler if grid is turned on. - v2.3.6 - show ruler if grid is turned on.
- v2.3.5 - Let tracks node handle array of points. Let http icons be rotated to hdg or bearing. - v2.3.5 - Let tracks node handle array of points. Let http icons be rotated to hdg or bearing.
- v2.3.4 - Add bus icon - v2.3.4 - Add bus icon
@ -8,7 +9,7 @@
- v2.3.1 - Stop adding point when you add a circle - v2.3.1 - Stop adding point when you add a circle
- v2.3.0 - Add colour options for drawing layer - v2.3.0 - Add colour options for drawing layer
- v2.2.1 - Better implementation of legend create/show/hide - v2.2.1 - Better implementation of legend create/show/hide
- v2.2.0 - Add rangering arcs function - v2.2.0 - Add range rings and arcs function
- v2.1.6 - Add legend command to allow inserting an html legend - v2.1.6 - Add legend command to allow inserting an html legend
- v2.1.5 - Fix squawk icon color handling - v2.1.5 - Fix squawk icon color handling
- v2.1.4 - Fix alt and speed as strings - v2.1.4 - Fix alt and speed as strings

View File

@ -10,6 +10,8 @@ map web page for plotting "things" on.
### Updates ### Updates
- v2.3.7 - show icon within circle if icon present. Issue #128
- v2.3.6 - show ruler if grid is turned on.
- v2.3.5 - Let tracks node handle array of points. Let http icons be rotated to hdg or bearing. - v2.3.5 - Let tracks node handle array of points. Let http icons be rotated to hdg or bearing.
- v2.3.4 - Add bus icon - v2.3.4 - Add bus icon
- v2.3.3 - Fix satellite view max zoom - v2.3.3 - Fix satellite view max zoom
@ -17,7 +19,7 @@ map web page for plotting "things" on.
- v2.3.1 - Stop adding point when you add a circle - v2.3.1 - Stop adding point when you add a circle
- v2.3.0 - Add colour options for drawing layer - v2.3.0 - Add colour options for drawing layer
- v2.2.1 - Better implementation of legend create/show/hide - v2.2.1 - Better implementation of legend create/show/hide
- v2.2.0 - Add rangerings arcs function - v2.2.0 - Add range rings and arcs function
- v2.1.6 - Add legend command to allow inserting an html legend - v2.1.6 - Add legend command to allow inserting an html legend
- v2.1.5 - Fix squawk icon color handling - v2.1.5 - Fix squawk icon color handling
- v2.1.4 - Fix alt and speed as strings - v2.1.4 - Fix alt and speed as strings

View File

@ -1,6 +1,6 @@
{ {
"name": "node-red-contrib-web-worldmap", "name": "node-red-contrib-web-worldmap",
"version": "2.3.6", "version": "2.3.7",
"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",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1097,10 +1097,12 @@ function setMarker(data) {
polycirc = L.circle(new L.LatLng((data.lat*1), (data.lon*1)), data.radius*1, opt); polycirc = L.circle(new L.LatLng((data.lat*1), (data.lon*1)), data.radius*1, opt);
} }
polygons[data.name] = polycirc; polygons[data.name] = polycirc;
if (!data.hasOwnProperty("icon")) {
delete (data.lat); delete (data.lat);
delete (data.lon); delete (data.lon);
} }
} }
}
else if (data.hasOwnProperty("arc")) { else if (data.hasOwnProperty("arc")) {
if (data.hasOwnProperty("lat") && data.hasOwnProperty("lon")) { if (data.hasOwnProperty("lat") && data.hasOwnProperty("lon")) {
polygons[data.name] = rangerings(new L.LatLng((data.lat*1), (data.lon*1)), data.arc); polygons[data.name] = rangerings(new L.LatLng((data.lat*1), (data.lon*1)), data.arc);