mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
MESSENGER-4235 - location sharing without gps
This commit is contained in:
@@ -151,6 +151,8 @@ extension LocationSharingMapView {
|
||||
fallthrough
|
||||
case .denied:
|
||||
locationSharingMapView.errorSubject.send(.invalidLocationAuthorization)
|
||||
// bwi: center map if gps is not available
|
||||
centerMapOnDefaultPosition(mapView: mapView)
|
||||
default:
|
||||
break
|
||||
}
|
||||
@@ -190,6 +192,11 @@ extension LocationSharingMapView {
|
||||
func didPan() {
|
||||
locationSharingMapView.userDidPan?()
|
||||
}
|
||||
|
||||
// bwi: center map on default position (Germany)
|
||||
func centerMapOnDefaultPosition(mapView: MGLMapView) {
|
||||
mapView.setVisibleCoordinateBounds(MGLCoordinateBounds(sw: CLLocationCoordinate2D(latitude: CLLocationDegrees(47.11216018072962), longitude: CLLocationDegrees(6.124326657878219)), ne: CLLocationCoordinate2D(latitude: 54.928634747516774, longitude: 14.641747314488596)), animated: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user