remove first $.ajax
This commit is contained in:
parent
d05d5d51ab
commit
f268ee7a54
|
@ -99,7 +99,7 @@ const index = (() => {
|
||||||
if (TwcQuery) {
|
if (TwcQuery) {
|
||||||
_AutoSelectQuery = true;
|
_AutoSelectQuery = true;
|
||||||
const txtAddress = document.getElementById('txtAddress');
|
const txtAddress = document.getElementById('txtAddress');
|
||||||
txtAddress.val(TwcQuery);
|
txtAddress.value = TwcQuery;
|
||||||
txtAddress.blur();
|
txtAddress.blur();
|
||||||
txtAddress.focus();
|
txtAddress.focus();
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,12 +57,12 @@ const navigation = (() => {
|
||||||
const point = await utils.weather.getPoint(latLon.lat, latLon.lon);
|
const point = await utils.weather.getPoint(latLon.lat, latLon.lon);
|
||||||
|
|
||||||
// get stations
|
// get stations
|
||||||
const stations = await $.ajax({
|
const stationsResponse = await fetch(point.properties.observationStations, {
|
||||||
|
method: 'GET',
|
||||||
|
mode: 'cors',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: point.properties.observationStations,
|
|
||||||
dataType: 'json',
|
|
||||||
crossDomain: true,
|
|
||||||
});
|
});
|
||||||
|
const stations = await stationsResponse.json();
|
||||||
|
|
||||||
const StationId = stations.features[0].properties.stationIdentifier;
|
const StationId = stations.features[0].properties.stationIdentifier;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue