refix command plus payload

This commit is contained in:
Dave Conway-Jones 2018-06-11 17:08:26 +01:00
parent 24a49ada68
commit 978a7be495
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
5 changed files with 19 additions and 15 deletions

View File

@ -1,5 +1,7 @@
### Change Log for Node-RED Worldmap
- v1.2.2 - Re-fix simultaneous command plus payload
- v1.2.1 - Sort out map initialisation - especially clusterAt values
- v1.2.0 - Bump version (should have done it for adding velocity layer). Tidy up deletion of marker and tracks.
- v1.1.16 - Add Velocity layer - for velocity grid type overlays (eg wind, currents, etc)

View File

@ -9,6 +9,7 @@ map web page for plotting "things" on.
### Updates
- v1.2.2 - re-fix simultaneous command plus payload
- v1.2.1 - Sort out map initialisation - especially clusterAt values
- v1.2.0 - Bump version (should have done it for adding velocity layer). Tidy up deletion of marker and tracks.
- v1.1.16 - Add Velocity layer - for velocity grid type overlays (eg wind, currrents, etc)

View File

@ -1,6 +1,6 @@
{
"name": "node-red-contrib-web-worldmap",
"version": "1.2.1",
"version": "1.2.2",
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
"dependencies": {
"cgi": "0.3.1",

View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<!--
Copyright 2015, 2017 IBM Corp.
Copyright 2015, 2018 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -119,7 +119,7 @@ var menuOpen = false;
var clusterAt = 13;
var maxage = 600; // default max age of icons on map in seconds - cleared after 10 mins
var baselayername = "OSM grey"; // Default base layer OSM but uniform grey
var ibmfoot = "&nbsp;&copy; IBM 2015,2017"
var ibmfoot = "&nbsp;&copy; IBM 2015,2018"
var initialposition = false;
var inIframe = false;
var showUserMenu = true;
@ -174,7 +174,7 @@ var connect = function() {
}
else {
if (data.command) { doCommand(data.command); delete data.command; }
else if (data.hasOwnProperty("name")) { setMarker(data); }
if (data.hasOwnProperty("name")) { setMarker(data); }
else { console.log("SKIP",data); }
}
};
@ -347,7 +347,7 @@ setMaxAge();
function setCluster(v) {
clusterAt = v || 0;
console.log("clusterAt set:",v,clusterAt);
console.log("clusterAt set:",clusterAt);
showMapCurrentZoom();
}
//setCluster();
@ -455,7 +455,7 @@ map.on('baselayerchange', function(e) {
});
function showMapCurrentZoom() {
console.log("ZOOM:",map.getZoom(),". CLUSTER:",clusterAt);
console.log("zoom:",map.getZoom(),". clusterAt:",clusterAt);
for (var l in layers) {
if (layers[l].hasOwnProperty("_zoom")) {
if (map.getZoom() >= clusterAt) {
@ -622,13 +622,14 @@ var NLS_OS_1919_1947 = L.tileLayer( 'http://nls-{s}.tileserver.com/nls/{z}/{x}/{
basemaps["UK OS 1919-47"] = NLS_OS_1919_1947;
//var NLS_OS_1900 = L.tileLayer('http://nls-{s}.tileserver.com/NLS_API/{z}/{x}/{y}.jpg', {
//attribution: '<a href="http://geo.nls.uk/maps/">National Library of Scotland Historic Maps</a>',
//bounds: [[49.6, -12], [61.7, 3]],
//minZoom: 1,
//maxZoom: 18,
//subdomains: '0123'
//});
//basemaps["UK OS 1900"] = NLS_OS_1900;
var NLS_OS_1900 = L.tileLayer('http://nls-{s}.tileserver.com/fpsUZbzrfb5d/{z}/{x}/{y}.jpg', {
attribution: '<a href="http://geo.nls.uk/maps/">National Library of Scotland Historic Maps</a>',
bounds: [[49.6, -12], [61.7, 3]],
minZoom: 1,
maxZoom: 18,
subdomains: '0123'
});
basemaps["UK OS 1900"] = NLS_OS_1900;
//var CartoPos = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
// attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://cartodb.com/attributions">CartoDB</a>'
@ -773,7 +774,7 @@ function setMarker(data) {
overlays[lay] = layers[lay];
layercontrol.addOverlay(layers[lay],lay);
map.addLayer(overlays[lay]);
console.log("ADDED LAYER",lay,layers);
//console.log("ADDED LAYER",lay,layers);
}
if (typeof markers[data.name] != "undefined") {

View File

@ -1,5 +1,5 @@
CACHE MANIFEST
# date: June 6th 2018 - v1.2.1
# date: June 11th 2018 - v1.2.2
CACHE:
index.html