Skip to content

Commit

Permalink
fix(iOS): Make map padding uniform (#717)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaSimon authored Feb 7, 2025
1 parent e962754 commit 97fe0b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions iosApp/iosApp/Pages/Map/AnnotatedMap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ struct AnnotatedMap: View {
.debugOptions(devDebugMode ? .camera : [])
.cameraBounds(.init(maxZoom: 18, minZoom: 6))
.onCameraChanged { change in handleCameraChange(change) }
.ornamentOptions(.init(scaleBar: .init(visibility: .hidden)))
.ornamentOptions(.init(
scaleBar: .init(visibility: .hidden),
attributionButton: .init(margins: .init(x: 0, y: 8))
))
.onLayerTapGesture(StopLayerGenerator.shared.stopLayerId, perform: handleTapStopLayer)
.onLayerTapGesture(StopLayerGenerator.shared.stopTouchTargetLayerId, perform: handleTapStopLayer)
.onStyleLoaded { _ in
Expand All @@ -61,7 +64,8 @@ struct AnnotatedMap: View {
handleStyleLoaded()
}
}
.additionalSafeAreaInsets(.bottom, sheetHeight)
.additionalSafeAreaInsets(.bottom, sheetHeight + 8)
.additionalSafeAreaInsets(.top, 20)
.accessibilityIdentifier("transitMap")
.onReceive(viewportProvider.cameraStatePublisher) { newCameraState in
zoomLevel = newCameraState.zoom
Expand Down
4 changes: 2 additions & 2 deletions iosApp/iosApp/Pages/Map/HomeMapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ struct HomeMapView: View {

private var crosshairs: some View {
VStack {
Image("map-nearby-location-cursor")
Image(.mapNearbyLocationCursor)
Spacer()
.frame(height: sheetHeight)
.frame(height: sheetHeight - 12)
}
}

Expand Down

0 comments on commit 97fe0b0

Please sign in to comment.