ongoing nits re sidc icon size

pull/174/head
Dave Conway-Jones 3 years ago
parent 9c38c4b43f
commit 2c38c62bd9
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF

@ -1,6 +1,6 @@
### Change Log for Node-RED Worldmap ### Change Log for Node-RED Worldmap
- v2.15.2 - Fix panit command to work, try to use alt units, popup alignments. - v2.15.3 - Fix panit command to work, try to use alt units, popup alignments.
- v2.15.0 - let speed be text and specify units if required (kt,kn,knots,mph,kmh,kph) default m/s. - v2.15.0 - let speed be text and specify units if required (kt,kn,knots,mph,kmh,kph) default m/s.
- v2.14.0 - Let geojson features be clickable if added as overlay. - v2.14.0 - Let geojson features be clickable if added as overlay.
- v2.13.4 - Fix list of map choices to be in sync. Fix popup auto sizing. - v2.13.4 - Fix list of map choices to be in sync. Fix popup auto sizing.

@ -11,7 +11,7 @@ map web page for plotting "things" on.
### Updates ### Updates
- v2.15.2 - Fix panit command to work, try to use alt units, popup alignments. - v2.15.3 - Fix panit command to work, try to use alt units, popup alignments.
- v2.15.0 - let speed be text and specify units if required (kt,kn,knots,mph,kmh,kph) default m/s. - v2.15.0 - let speed be text and specify units if required (kt,kn,knots,mph,kmh,kph) default m/s.
- v2.14.0 - Let geojson features be clickable if added as overlay. - v2.14.0 - Let geojson features be clickable if added as overlay.
- v2.13.4 - Fix list of map choices to be in sync. Fix popup auto sizing. - v2.13.4 - Fix list of map choices to be in sync. Fix popup auto sizing.

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

@ -318,10 +318,10 @@ else {
rulerButton.addTo(map); rulerButton.addTo(map);
// Create the clear heatmap button // Create the clear heatmap button
var clrHeat = L.easyButton( '<b>Reset Heatmap</b>', function() { var clrHeat = L.easyButton( 'fa-eraser', function() {
console.log("Reset heatmap"); console.log("Reset heatmap");
heat.setLatLngs([]); heat.setLatLngs([]);
}, "Clears the current heatmap", "bottomright"); }, "Clears the current heatmap", {position:"bottomright"});
} }
var helpMenu = '<table>' var helpMenu = '<table>'
@ -1684,12 +1684,12 @@ 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 || {};
var sz = 30; var sz = 25;
if (myMarker.hasOwnProperty("getProperties") && myMarker.getProperties().hasOwnProperty("echelon")) { if (myMarker.hasOwnProperty("getProperties") && myMarker.getProperties().hasOwnProperty("echelon")) {
sz = iconSz[myMarker.getProperties().echelon]; sz = iconSz[myMarker.getProperties().echelon];
} }
opts.size = opts.size || sz; opts.size = opts.size || sz;
opts.size = opts.size * 0.8 * (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({
iconUrl: myMarker.toDataURL(), iconUrl: myMarker.toDataURL(),
@ -1855,6 +1855,7 @@ function setMarker(data) {
if (data.dashArray) { delete data.dashArray; } if (data.dashArray) { delete data.dashArray; }
if (data.fill) { delete data.fill; } if (data.fill) { delete data.fill; }
if (data.draggable) { delete data.draggable; } if (data.draggable) { delete data.draggable; }
if (!isNaN(data.speed)) { data.speed = data.speed.toFixed(2); }
if (data.hasOwnProperty("clickable")) { delete data.clickable; } if (data.hasOwnProperty("clickable")) { delete data.clickable; }
if (data.hasOwnProperty("fillColor")) { delete data.fillColor; } if (data.hasOwnProperty("fillColor")) { delete data.fillColor; }
if (data.hasOwnProperty("radius")) { delete data.radius; } if (data.hasOwnProperty("radius")) { delete data.radius; }

Loading…
Cancel
Save