mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 17:42:45 +02:00
Show own location in map views (#7375)
* show own location on static sharing * show own location on live sharing * add tests and changelog * check location authorisation, fix center to current user location button * it moves request to LocationManager in proper service * add static location viewer service
This commit is contained in:
+15
-8
@@ -29,19 +29,26 @@ struct StaticLocationView: View {
|
||||
|
||||
// MARK: Views
|
||||
|
||||
var mapView: LocationSharingMapView {
|
||||
LocationSharingMapView(tileServerMapURL: viewModel.viewState.mapStyleURL,
|
||||
annotations: [viewModel.viewState.sharedAnnotation],
|
||||
highlightedAnnotation: viewModel.viewState.sharedAnnotation,
|
||||
userAvatarData: nil,
|
||||
showsUserLocation: viewModel.viewState.showsUserLocation,
|
||||
userLocation: Binding.constant(nil),
|
||||
mapCenterCoordinate: Binding.constant(nil),
|
||||
errorSubject: viewModel.viewState.errorSubject)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
ZStack(alignment: .bottom) {
|
||||
LocationSharingMapView(tileServerMapURL: viewModel.viewState.mapStyleURL,
|
||||
annotations: [viewModel.viewState.sharedAnnotation],
|
||||
highlightedAnnotation: viewModel.viewState.sharedAnnotation,
|
||||
userAvatarData: viewModel.viewState.userAvatarData,
|
||||
showsUserLocation: false,
|
||||
userLocation: Binding.constant(nil),
|
||||
mapCenterCoordinate: Binding.constant(nil),
|
||||
errorSubject: viewModel.viewState.errorSubject)
|
||||
mapView
|
||||
MapCreditsView()
|
||||
}
|
||||
.overlay(CenterToUserLocationButton(action: {
|
||||
viewModel.send(viewAction: .showUserLocation)
|
||||
}).offset(x: -11.0, y: 52), alignment: .topTrailing)
|
||||
.ignoresSafeArea(.all, edges: [.bottom])
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .navigationBarLeading) {
|
||||
|
||||
Reference in New Issue
Block a user