1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-24 16:55:22 +03:00
This commit is contained in:
breadoven 2024-02-29 13:27:21 +00:00
parent 841b05ccd7
commit d18b72b3dc
3 changed files with 104 additions and 92 deletions

View file

@ -65,7 +65,7 @@ let FwApproach = function (number, approachAltAsl = 0, landAltAsl = 0, approachD
self.setIsSeaLevelRef = function (data) {
isSeaLevelRef = data;
}
self.getElevation = function() {
return elevation;
}
@ -87,7 +87,7 @@ let FwApproach = function (number, approachAltAsl = 0, landAltAsl = 0, approachD
self.getElevationFromServer = async function (lon, lat, globalSettings) {
let elevation = "N/A";
if (globalSettings.mapProviderType == 'bing') {
let elevationEarthModel = $('#elevationEarthModel').prop("checked") ? "sealevel" : "ellipsoid";
let elevationEarthModel = $('#elevationEarthModel').prop("checked") ? "ellipsoid" : "sealevel";
const response = await fetch('http://dev.virtualearth.net/REST/v1/Elevation/List?points='+lat+','+lon+'&heights='+elevationEarthModel+'&key='+globalSettings.mapApiKey);
const myJson = await response.json();