Let the node name be the map title
This commit is contained in:
parent
795b6ce7b3
commit
ff19903cbb
@ -1,5 +1,6 @@
|
||||
### Change Log for Node-RED Worldmap
|
||||
|
||||
- v2.5.8 - Let node name be the full page map title
|
||||
- v2.5.7 - Let fillColor set color of hulls
|
||||
- v2.5.6 - Let node accept plain text payload kml or nvg input
|
||||
- v2.5.5 - Fix NVG import to handle symbols for points
|
||||
|
@ -11,6 +11,7 @@ map web page for plotting "things" on.
|
||||
|
||||
### Updates
|
||||
|
||||
- v2.5.8 - Let node name be the full page map title
|
||||
- v2.5.7 - Let fillColor set color of hulls
|
||||
- v2.5.6 - Let node accept plain text payload kml or nvg input
|
||||
- v2.5.5 - Fix NVG import to handle symbols for points
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-contrib-web-worldmap",
|
||||
"version": "2.5.7",
|
||||
"version": "2.5.8",
|
||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||
"dependencies": {
|
||||
"cgi": "0.3.1",
|
||||
|
@ -79,6 +79,7 @@ module.exports = function(RED) {
|
||||
c.grid = {showgrid:node.showgrid};
|
||||
c.hiderightclick = node.hiderightclick;
|
||||
c.coords = node.coords;
|
||||
c.toptitle = node.name;
|
||||
client.write(JSON.stringify({command:c}));
|
||||
}
|
||||
});
|
||||
|
@ -79,7 +79,7 @@
|
||||
<body>
|
||||
<div id="topbar">
|
||||
<a href="https://nodered.org"><img src="images/node-red.png" width="60" height="24" alt="NRed"/></a>
|
||||
<span class="topbar"> Node-RED - map all the things</span>
|
||||
<span class="topbar" id="topwords"> Node-RED - map all the things</span>
|
||||
</div>
|
||||
<div id="results">
|
||||
<span id="searchRes"></span>
|
||||
|
@ -1668,6 +1668,12 @@ function setMarker(data) {
|
||||
// handle any incoming COMMANDS to control the map remotely
|
||||
function doCommand(cmd) {
|
||||
//console.log("COMMAND",cmd);
|
||||
if (cmd.hasOwnProperty("toptitle")) {
|
||||
if (!inIframe ) {
|
||||
document.title = cmd.toptitle;
|
||||
document.getElementById("topwords").innerText = cmd.toptitle;
|
||||
}
|
||||
}
|
||||
if (cmd.hasOwnProperty("clear")) {
|
||||
doTidyUp(cmd.clear);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user