mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 20:39:24 +00:00
Clarify how the different mapLibre URLs are used.
This commit is contained in:
committed by
Stefan Ceriu
parent
6465730638
commit
dd95a4313a
@@ -65,7 +65,7 @@ struct MapLibreMapView: UIViewRepresentable {
|
||||
// Don't set the same value twice. Otherwise, if there is an error loading the map, a loop
|
||||
// is caused as the `error` binding being set, which triggers this update, which sets a
|
||||
// new URL, which causes another error, and so it goes on round and round in a circle.
|
||||
let dynamicMapURL = mapURLBuilder.dynamicMapURL(for: .init(colorScheme))
|
||||
let dynamicMapURL = mapURLBuilder.interactiveMapURL(for: .init(colorScheme))
|
||||
if mapView.styleURL != dynamicMapURL {
|
||||
mapView.styleURL = dynamicMapURL
|
||||
}
|
||||
@@ -86,7 +86,7 @@ struct MapLibreMapView: UIViewRepresentable {
|
||||
}
|
||||
|
||||
private func makeMapView() -> MGLMapView {
|
||||
let mapView = MGLMapView(frame: .zero, styleURL: mapURLBuilder.dynamicMapURL(for: colorScheme == .dark ? .dark : .light))
|
||||
let mapView = MGLMapView(frame: .zero, styleURL: mapURLBuilder.interactiveMapURL(for: colorScheme == .dark ? .dark : .light))
|
||||
mapView.logoViewPosition = .topLeft
|
||||
mapView.attributionButtonPosition = .topLeft
|
||||
mapView.attributionButtonMargins = .init(x: mapView.logoView.frame.maxX + 8, y: mapView.logoView.center.y / 2)
|
||||
|
||||
Reference in New Issue
Block a user