Add QTH option, and try connect when Ready

This commit is contained in:
Dave Conway-Jones 2022-01-29 17:49:36 +00:00
parent eb3d4bb04e
commit 6b898e6d3f
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
5 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,6 @@
### Change Log for Node-RED Worldmap ### Change Log for Node-RED Worldmap
- v2.26.1 - Add QTH/Maidenhead option also
- v2.26.0 - Add UTM and MGRS to coordinate display options. - v2.26.0 - Add UTM and MGRS to coordinate display options.
- v2.25.0 - Add bounds command to set overall map bounds. - v2.25.0 - Add bounds command to set overall map bounds.
- v2.24.3 - Fix geojson incorrect fill. - v2.24.3 - Fix geojson incorrect fill.

View File

@ -11,6 +11,7 @@ map web page for plotting "things" on.
### Updates ### Updates
- v2.26.1 - Add QTH/Maidenhead option also
- v2.26.0 - Add UTM and MGRS to coordinate display options. - v2.26.0 - Add UTM and MGRS to coordinate display options.
- v2.25.0 - Add bounds command to set overall map bounds. - v2.25.0 - Add bounds command to set overall map bounds.
- v2.24.3 - Fix geojson incorrect fill. - v2.24.3 - Fix geojson incorrect fill.
@ -141,6 +142,8 @@ following the great circle between the two co-ordinates is plotted.
msg.payload = {name:"GC1", color:"#ff00ff", greatcircle:[ [51.464,0], [25.76,-80.18] ] } msg.payload = {name:"GC1", color:"#ff00ff", greatcircle:[ [51.464,0], [25.76,-80.18] ] }
Shapes can also have a **popup** property containing html, but you MUST also set a property `clickable:true` in order to allow it to be seen.
There are extra optional properties you can specify - see Options below. There are extra optional properties you can specify - see Options below.
@ -255,6 +258,7 @@ Areas, Rectangles, Lines, Circles and Ellipses can also specify more optional pr
Other properties can be found in the leaflet documentation. Other properties can be found in the leaflet documentation.
Shapes can also have a **popup** property containing html, but you MUST also set a property `clickable:true` in order to allow it to be seen.
### Drawing ### Drawing

View File

@ -1,6 +1,6 @@
{ {
"name": "node-red-contrib-web-worldmap", "name": "node-red-contrib-web-worldmap",
"version": "2.26.0", "version": "2.26.1",
"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": {
"@turf/bezier-spline": "~6.5.0", "@turf/bezier-spline": "~6.5.0",

View File

@ -85,6 +85,7 @@
<option value="dms">D.M.S</option> <option value="dms">D.M.S</option>
<option value="utm">UTM</option> <option value="utm">UTM</option>
<option value="mgrs">MGRS</option> <option value="mgrs">MGRS</option>
<option value="qth">QTH/Maidenhead</option>
</select> </select>
<i class="fa fa-th" style="margin-left:22px;"></i> Graticule <i class="fa fa-th" style="margin-left:22px;"></i> Graticule
<select id="node-input-showgrid" style="width:101px;"> <select id="node-input-showgrid" style="width:101px;">
@ -243,6 +244,7 @@ If <i>Web Path</i> is left empty, then by default <code>⌘⇧m</code> - <code>c
<option value="dms">D.M.S</option> <option value="dms">D.M.S</option>
<option value="utm">UTM</option> <option value="utm">UTM</option>
<option value="mgrs">MGRS</option> <option value="mgrs">MGRS</option>
<option value="gth">QTH/Maidenhead</option>
</select> </select>
<i class="fa fa-th" style="margin-left:22px;"></i> Graticule <i class="fa fa-th" style="margin-left:22px;"></i> Graticule
<select id="node-input-showgrid" style="width:101px;"> <select id="node-input-showgrid" style="width:101px;">

View File

@ -170,6 +170,9 @@ if (inIframe === true) {
// Create the Initial Map object. // Create the Initial Map object.
map = new L.map('map',{zoomSnap: 0.1}).setView(startpos, startzoom); map = new L.map('map',{zoomSnap: 0.1}).setView(startpos, startzoom);
map.whenReady(function() {
connect();
});
var droplatlng; var droplatlng;
var target = document.getElementById("map") var target = document.getElementById("map")
@ -2190,6 +2193,7 @@ function doCommand(cmd) {
if (cmd.coords == "dms") { opts.gpsLong = true; } if (cmd.coords == "dms") { opts.gpsLong = true; }
if (cmd.coords == "utm") { opts.utm = true; } if (cmd.coords == "utm") { opts.utm = true; }
if (cmd.coords == "mgrs") { opts.utmref = true; } if (cmd.coords == "mgrs") { opts.utmref = true; }
if (cmd.coords == "qth") { opts.qth = true; }
coords.options = opts; coords.options = opts;
coords.addTo(map); coords.addTo(map);
} }
@ -2711,5 +2715,3 @@ function doGeojson(n,g,l,o) {
layers[lay].addLayer(markers[n]); layers[lay].addLayer(markers[n]);
map.addLayer(layers[lay]); map.addLayer(layers[lay]);
} }
connect();