Let the node name be the map title

pull/150/head
Dave Conway-Jones 4 years ago
parent 795b6ce7b3
commit ff19903cbb
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF

@ -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…
Cancel
Save