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
|
### 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.7 - Let fillColor set color of hulls
|
||||||
- v2.5.6 - Let node accept plain text payload kml or nvg input
|
- v2.5.6 - Let node accept plain text payload kml or nvg input
|
||||||
- v2.5.5 - Fix NVG import to handle symbols for points
|
- v2.5.5 - Fix NVG import to handle symbols for points
|
||||||
|
@ -11,6 +11,7 @@ map web page for plotting "things" on.
|
|||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
|
|
||||||
|
- v2.5.8 - Let node name be the full page map title
|
||||||
- v2.5.7 - Let fillColor set color of hulls
|
- v2.5.7 - Let fillColor set color of hulls
|
||||||
- v2.5.6 - Let node accept plain text payload kml or nvg input
|
- v2.5.6 - Let node accept plain text payload kml or nvg input
|
||||||
- v2.5.5 - Fix NVG import to handle symbols for points
|
- v2.5.5 - Fix NVG import to handle symbols for points
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-contrib-web-worldmap",
|
"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.",
|
"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",
|
||||||
|
@ -79,6 +79,7 @@ module.exports = function(RED) {
|
|||||||
c.grid = {showgrid:node.showgrid};
|
c.grid = {showgrid:node.showgrid};
|
||||||
c.hiderightclick = node.hiderightclick;
|
c.hiderightclick = node.hiderightclick;
|
||||||
c.coords = node.coords;
|
c.coords = node.coords;
|
||||||
|
c.toptitle = node.name;
|
||||||
client.write(JSON.stringify({command:c}));
|
client.write(JSON.stringify({command:c}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="topbar">
|
<div id="topbar">
|
||||||
<a href="https://nodered.org"><img src="images/node-red.png" width="60" height="24" alt="NRed"/></a>
|
<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>
|
||||||
<div id="results">
|
<div id="results">
|
||||||
<span id="searchRes"></span>
|
<span id="searchRes"></span>
|
||||||
|
@ -1668,6 +1668,12 @@ function setMarker(data) {
|
|||||||
// handle any incoming COMMANDS to control the map remotely
|
// handle any incoming COMMANDS to control the map remotely
|
||||||
function doCommand(cmd) {
|
function doCommand(cmd) {
|
||||||
//console.log("COMMAND",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")) {
|
if (cmd.hasOwnProperty("clear")) {
|
||||||
doTidyUp(cmd.clear);
|
doTidyUp(cmd.clear);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user