try again on panning with popup
This commit is contained in:
parent
57c27d0fd9
commit
28da7948d9
@ -1,6 +1,6 @@
|
|||||||
### Change Log for Node-RED Worldmap
|
### Change Log for Node-RED Worldmap
|
||||||
|
|
||||||
- v1.5.9 - Allow latest mark added to open popup, and allow `popped=false` to close.
|
- v1.5.10 - Allow latest mark added to open popup, and allow `popped=false` to close.
|
||||||
- v1.5.7 - Tidy up sidc entry, and drag-ability of nodes on drawing layer.
|
- v1.5.7 - Tidy up sidc entry, and drag-ability of nodes on drawing layer.
|
||||||
- v1.5.6 - Add search command and clear search functionality.
|
- v1.5.6 - Add search command and clear search functionality.
|
||||||
- v1.5.5 - Allow multiple overlays to be enabled at once - Issue #53
|
- v1.5.5 - Allow multiple overlays to be enabled at once - Issue #53
|
||||||
|
@ -9,7 +9,7 @@ map web page for plotting "things" on.
|
|||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
|
|
||||||
- v1.5.9 - Allow latest mark added to open popup, and allow `popped=false` to close.
|
- v1.5.10 - Allow latest mark added to open popup, and allow `popped=false` to close.
|
||||||
- v1.5.7 - Tidy up sidc entry, and drag-ability of nodes on drawing layer.
|
- v1.5.7 - Tidy up sidc entry, and drag-ability of nodes on drawing layer.
|
||||||
- v1.5.6 - Add search command and clear search functionality.
|
- v1.5.6 - Add search command and clear search functionality.
|
||||||
- v1.5.5 - Allow multiple overlays to be enabled at once - Issue #53
|
- v1.5.5 - Allow multiple overlays to be enabled at once - Issue #53
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-contrib-web-worldmap",
|
"name": "node-red-contrib-web-worldmap",
|
||||||
"version": "1.5.9",
|
"version": "1.5.10",
|
||||||
"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",
|
||||||
|
@ -77,9 +77,9 @@
|
|||||||
<tr><td><input type='text' name='search' id='search' size='20' style="width:150px;"/> <span onclick='doSearch();'><i class="fa fa-search fa-lg"></i></span></td></tr>
|
<tr><td><input type='text' name='search' id='search' size='20' style="width:150px;"/> <span onclick='doSearch();'><i class="fa fa-search fa-lg"></i></span></td></tr>
|
||||||
<tr><td style="cursor:default"><i class="fa fa-spinner fa-lg fa-fw"></i> Set Max Age <input type='text' name='maxage' id='maxage' value="600" size="5" onchange='setMaxAge();'/>s</td></tr>
|
<tr><td style="cursor:default"><i class="fa fa-spinner fa-lg fa-fw"></i> Set Max Age <input type='text' name='maxage' id='maxage' value="600" size="5" onchange='setMaxAge();'/>s</td></tr>
|
||||||
<tr><td style="cursor:default"><i class="fa fa-search-plus fa-lg fa-fw"></i> Cluster at zoom <<input type='text' name='setclus' id='setclus' size="2" onchange='setCluster();'/></td></tr>
|
<tr><td style="cursor:default"><i class="fa fa-search-plus fa-lg fa-fw"></i> Cluster at zoom <<input type='text' name='setclus' id='setclus' size="2" onchange='setCluster();'/></td></tr>
|
||||||
<tr><td style="cursor:default"><input type='checkbox' name='panit' onclick='doPanit();'/> Auto Pan Map</td></tr>
|
<tr><td style="cursor:default"><input type='checkbox' id='panit' onclick='doPanit();'/> Auto Pan Map</td></tr>
|
||||||
<tr><td style="cursor:default"><input type='checkbox' name='lockit' onclick='doLock();'/> Lock Map</td></tr>
|
<tr><td style="cursor:default"><input type='checkbox' id='lockit' onclick='doLock();'/> Lock Map</td></tr>
|
||||||
<tr><td style="cursor:default"><input type='checkbox' name='heatall' onclick='doHeatAll();'/> Heatmap all layers</td></tr>
|
<tr><td style="cursor:default"><input type='checkbox' id='heatall' onclick='doHeatAll();'/> Heatmap all layers</td></tr>
|
||||||
<tr><td style="cursor:default"><span id="showHelp" ><i class="fa fa-info fa-lg fa-fw"></i>Help</span></td></tr>
|
<tr><td style="cursor:default"><span id="showHelp" ><i class="fa fa-info fa-lg fa-fw"></i>Help</span></td></tr>
|
||||||
</table></div>
|
</table></div>
|
||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
@ -847,7 +847,7 @@ var delMarker = function(dname) {
|
|||||||
}
|
}
|
||||||
delete allData[dname];
|
delete allData[dname];
|
||||||
ws.send(JSON.stringify({action:"delete", name:dname}));
|
ws.send(JSON.stringify({action:"delete", name:dname}));
|
||||||
map.closePopup();
|
//map.closePopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
// the MAIN add something to map function
|
// the MAIN add something to map function
|
||||||
@ -1218,10 +1218,11 @@ function setMarker(data) {
|
|||||||
delete data.popped;
|
delete data.popped;
|
||||||
}
|
}
|
||||||
if (data.hasOwnProperty("popped") && (data.popped === false)) {
|
if (data.hasOwnProperty("popped") && (data.popped === false)) {
|
||||||
if ((popid == data.name) && (popmark)) {
|
if (popid == data.name) {
|
||||||
|
if (popmark) { popmark.closePopup(); }
|
||||||
popped = false;
|
popped = false;
|
||||||
popmark.closePopup();
|
|
||||||
}
|
}
|
||||||
|
delete data.popped;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add any remaining properties to the info box
|
// Add any remaining properties to the info box
|
||||||
@ -1290,7 +1291,7 @@ function setMarker(data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (panit) {
|
if (panit) {
|
||||||
if (popped) {
|
if (popped === true) {
|
||||||
map.setView(ll,map.getZoom());
|
map.setView(ll,map.getZoom());
|
||||||
popped = true;
|
popped = true;
|
||||||
}
|
}
|
||||||
@ -1302,6 +1303,7 @@ function setMarker(data) {
|
|||||||
marker.openPopup();
|
marker.openPopup();
|
||||||
}
|
}
|
||||||
else { popmark.openPopup(); }
|
else { popmark.openPopup(); }
|
||||||
|
popped = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1317,8 +1319,9 @@ function doCommand(cmd) {
|
|||||||
doTidyUp(cmd.clear);
|
doTidyUp(cmd.clear);
|
||||||
}
|
}
|
||||||
if (cmd.hasOwnProperty("panit")) {
|
if (cmd.hasOwnProperty("panit")) {
|
||||||
if (cmd.panit === "true") { panit = true; }
|
if (cmd.panit == "true") { panit = true; }
|
||||||
else { panit = false; }
|
else { panit = false; }
|
||||||
|
document.getElementById("panit").checked = panit;
|
||||||
}
|
}
|
||||||
if (cmd.hasOwnProperty("showmenu")) {
|
if (cmd.hasOwnProperty("showmenu")) {
|
||||||
if ((cmd.showmenu === "hide") && (showUserMenu === true)) {
|
if ((cmd.showmenu === "hide") && (showUserMenu === true)) {
|
||||||
@ -1612,6 +1615,7 @@ function doCommand(cmd) {
|
|||||||
}
|
}
|
||||||
if (cmd.hasOwnProperty("heatmap")) {
|
if (cmd.hasOwnProperty("heatmap")) {
|
||||||
heat.setOptions(cmd.heatmap);
|
heat.setOptions(cmd.heatmap);
|
||||||
|
document.getElementById("heatall").checked = !!cmd.heatmap;
|
||||||
heat.redraw();
|
heat.redraw();
|
||||||
}
|
}
|
||||||
map.setView([clat,clon],czoom);
|
map.setView([clat,clon],czoom);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
# date: Nov 9th 2018 - v1.5.9
|
# date: Nov 9th 2018 - v1.5.10
|
||||||
|
|
||||||
CACHE:
|
CACHE:
|
||||||
index.html
|
index.html
|
||||||
|
Loading…
Reference in New Issue
Block a user