forked from MapComplete/MapComplete
Improve geolocation message
This commit is contained in:
parent
7a27075adb
commit
ba6027dda3
2 changed files with 5 additions and 4 deletions
|
@ -105,6 +105,9 @@ export class GeoLocationState {
|
||||||
|
|
||||||
|
|
||||||
this.gpsStateExplanation = this.gpsAvailable.map(available => {
|
this.gpsStateExplanation = this.gpsAvailable.map(available => {
|
||||||
|
if (this.currentGPSLocation.data !== undefined) {
|
||||||
|
return Translations.t.general.labels.jumpToLocation
|
||||||
|
}
|
||||||
if (!available) {
|
if (!available) {
|
||||||
return Translations.t.general.labels.locationNotAvailable
|
return Translations.t.general.labels.locationNotAvailable
|
||||||
}
|
}
|
||||||
|
@ -123,9 +126,7 @@ export class GeoLocationState {
|
||||||
return Translations.t.general.visualFeedback.islocked
|
return Translations.t.general.visualFeedback.islocked
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.currentGPSLocation.data !== undefined) {
|
|
||||||
return Translations.t.general.labels.jumpToLocation
|
|
||||||
}
|
|
||||||
return Translations.t.general.waitingForLocation
|
return Translations.t.general.waitingForLocation
|
||||||
}, [this.allowMoving, this.permission, this.currentGPSLocation])
|
}, [this.allowMoving, this.permission, this.currentGPSLocation])
|
||||||
|
|
||||||
|
|
|
@ -81,13 +81,13 @@ export class GeolocationControlState {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// A location _is_ known! Let's move to this location
|
|
||||||
const currentLocation = geolocationState.currentGPSLocation.data
|
const currentLocation = geolocationState.currentGPSLocation.data
|
||||||
if (currentLocation === undefined) {
|
if (currentLocation === undefined) {
|
||||||
// No location is known yet, not much we can do
|
// No location is known yet, not much we can do
|
||||||
lastClick.setData(new Date())
|
lastClick.setData(new Date())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// A location _is_ known! Let's move to this location
|
||||||
const inBounds = state.bounds.data.contains([
|
const inBounds = state.bounds.data.contains([
|
||||||
currentLocation.longitude,
|
currentLocation.longitude,
|
||||||
currentLocation.latitude,
|
currentLocation.latitude,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue