Fix altitude handling
This commit is contained in:
parent
9592153fe8
commit
9c38c4b43f
@ -1,6 +1,6 @@
|
||||
### Change Log for Node-RED Worldmap
|
||||
|
||||
- v2.15.1 - Fix panit command to work, try to use alt units, popup alignments.
|
||||
- v2.15.2 - Fix panit command to work, try to use alt units, popup alignments.
|
||||
- v2.15.0 - let speed be text and specify units if required (kt,kn,knots,mph,kmh,kph) default m/s.
|
||||
- v2.14.0 - Let geojson features be clickable if added as overlay.
|
||||
- v2.13.4 - Fix list of map choices to be in sync. Fix popup auto sizing.
|
||||
|
@ -11,7 +11,7 @@ map web page for plotting "things" on.
|
||||
|
||||
### Updates
|
||||
|
||||
- v2.15.1 - Fix panit command to work, try to use alt units, popup alignments.
|
||||
- v2.15.2 - Fix panit command to work, try to use alt units, popup alignments.
|
||||
- v2.15.0 - let speed be text and specify units if required (kt,kn,knots,mph,kmh,kph) default m/s.
|
||||
- v2.14.0 - Let geojson features be clickable if added as overlay.
|
||||
- v2.13.4 - Fix list of map choices to be in sync. Fix popup auto sizing.
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-contrib-web-worldmap",
|
||||
"version": "2.15.1",
|
||||
"version": "2.15.2",
|
||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||
"dependencies": {
|
||||
"cgi": "0.3.1",
|
||||
|
@ -1753,13 +1753,13 @@ function setMarker(data) {
|
||||
var reft = new RegExp('feet|ft','i');
|
||||
var refm = new RegExp('metres|m','i');
|
||||
if ( reft.test(""+data.alt) ) {
|
||||
data.alt = (""+parseFloat(data.alt)).toFixed(2) + " ft";
|
||||
data.alt = (parseFloat(data.alt)).toFixed(2) + " ft";
|
||||
}
|
||||
else if ( refm.test(""+data.alt) ) {
|
||||
data.alt = (""+parseFloat(data.alt)).toFixed(2) + " m";
|
||||
data.alt = (parseFloat(data.alt)).toFixed(2) + " m";
|
||||
}
|
||||
else {
|
||||
data.alt = (""+parseFloat(data.alt)).toFixed(2);
|
||||
data.alt = (parseFloat(data.alt)).toFixed(2);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user