Fix: also show location info on shake if GPS is disabled
This commit is contained in:
parent
db92a600d5
commit
4c5d24a0a7
1 changed files with 4 additions and 1 deletions
|
@ -23,7 +23,7 @@
|
||||||
bearing: number
|
bearing: number
|
||||||
}> = map.location.mapD(
|
}> = map.location.mapD(
|
||||||
({ lon, lat }) => {
|
({ lon, lat }) => {
|
||||||
const current = currentLocation.data
|
const current = currentLocation?.data
|
||||||
if (!current) {
|
if (!current) {
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,9 @@
|
||||||
let compass = Orientation.singleton.alpha
|
let compass = Orientation.singleton.alpha
|
||||||
let relativeBearing: Store<{ distance: string; bearing: Translation }> = compass.mapD(
|
let relativeBearing: Store<{ distance: string; bearing: Translation }> = compass.mapD(
|
||||||
(compass) => {
|
(compass) => {
|
||||||
|
if(!distanceToCurrentLocation.data){
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
const bearing: Translation =
|
const bearing: Translation =
|
||||||
relativeDir[
|
relativeDir[
|
||||||
GeoOperations.bearingToHumanRelative(distanceToCurrentLocation.data.bearing - compass)
|
GeoOperations.bearingToHumanRelative(distanceToCurrentLocation.data.bearing - compass)
|
||||||
|
|
Loading…
Reference in a new issue