forked from MapComplete/MapComplete
Fixes to the geolocation flow
This commit is contained in:
parent
b0bbae2ce6
commit
bd5e9903bd
3 changed files with 18 additions and 7 deletions
|
@ -28,10 +28,10 @@ export class GeolocationControl extends VariableUiElement {
|
|||
return Svg.location_locked_svg()
|
||||
}
|
||||
|
||||
if (permission === "prompt") {
|
||||
return Svg.location_empty_svg()
|
||||
}
|
||||
if (geolocationState.currentGPSLocation === undefined) {
|
||||
if (geolocationState.currentGPSLocation.data === undefined) {
|
||||
if (permission === "prompt") {
|
||||
return Svg.location_empty_svg()
|
||||
}
|
||||
// Position not yet found, but permission is either requested or granted: we spin to indicate activity
|
||||
const icon = !geolocationHandler.mapHasMoved.data
|
||||
? Svg.location_svg()
|
||||
|
@ -41,6 +41,8 @@ export class GeolocationControl extends VariableUiElement {
|
|||
.SetStyle("animation: spin 4s linear infinite;")
|
||||
}
|
||||
|
||||
// We have a location, so we show a dot in the center
|
||||
|
||||
if (
|
||||
lastClickWithinThreeSecs.data &&
|
||||
geolocationState.permission.data === "granted"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue