Bugfix: weather geolocation not working when there are multiple results.

This commit is contained in:
Sébastien Atoch 2025-07-23 14:06:20 -04:00
parent b6a0adac56
commit 10b70f0c53

View file

@ -1,5 +1,5 @@
function fetchCoordinates(city, callback, errorCallback) {
var geoUrl = "https://geocoding-api.open-meteo.com/v1/search?name=" + encodeURIComponent(city) + "&count=1&language=en&format=json";
var geoUrl = "https://geocoding-api.open-meteo.com/v1/search?name=" + encodeURIComponent(city) + "&language=en&format=json";
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {