diff --git a/server/scripts/index.js b/server/scripts/index.js index 45f9187..f4a05c0 100644 --- a/server/scripts/index.js +++ b/server/scripts/index.js @@ -99,7 +99,7 @@ const index = (() => { if (TwcQuery) { _AutoSelectQuery = true; const txtAddress = document.getElementById('txtAddress'); - txtAddress.val(TwcQuery); + txtAddress.value = TwcQuery; txtAddress.blur(); txtAddress.focus(); } diff --git a/server/scripts/modules/navigation.js b/server/scripts/modules/navigation.js index 61a5ccb..9d28f08 100644 --- a/server/scripts/modules/navigation.js +++ b/server/scripts/modules/navigation.js @@ -57,12 +57,12 @@ const navigation = (() => { const point = await utils.weather.getPoint(latLon.lat, latLon.lon); // get stations - const stations = await $.ajax({ + const stationsResponse = await fetch(point.properties.observationStations, { + method: 'GET', + mode: 'cors', type: 'GET', - url: point.properties.observationStations, - dataType: 'json', - crossDomain: true, }); + const stations = await stationsResponse.json(); const StationId = stations.features[0].properties.stationIdentifier;