UX: update gps-label indication if GPS is not available physically

This commit is contained in:
Pieter Vander Vennet 2024-08-09 10:53:09 +02:00
parent 0c3cfdc034
commit d41afe7688
6 changed files with 79 additions and 29 deletions

View file

@ -99,7 +99,8 @@ export default class InitialMapPositioning {
Utils.downloadJson<{ latitude: number; longitude: number }>(
Constants.GeoIpServer + "ip"
).then(({ longitude, latitude }) => {
if (geolocationState.currentGPSLocation.data !== undefined) {
const gpsLoc = geolocationState.currentGPSLocation.data
if (gpsLoc !== undefined) {
return // We got a geolocation by now, abort
}
console.log("Setting location based on geoip", longitude, latitude)