-
Notifications
You must be signed in to change notification settings - Fork 187
Open
Labels
bug 🪲Something is broken!Something is broken!
Description
Environment
- Xcode version: Version 16.4 (16F6)
- iOS version: iOS 26.0 (23A343)
- Devices affected: iPhone
- Maps SDK Version: 11.15.1
Observed behavior and steps to reproduce
After setting MapStyle from .standard(lightPreset: .night)
to .standard
it remains in night style
...
init()
mapView.mapboxMap.mapStyle = .standard
}
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
if previousTraitCollection?.hasDifferentColorAppearance(comparedTo: traitCollection) == true {
if traitCollection.userInterfaceStyle == .dark {
mapView.mapboxMap.mapStyle = .standard(lightPreset: .night)
} else {
mapView.mapboxMap.mapStyle = .standard
}
}
}
Expected behavior
Map style is set to same "standard" as it was in init.
Notes / preliminary analysis
This behaviour seems to stem from fact that in .standard
lightPreset is nil which later causes it to be ignored in MapStyleReconciler
as value to be changed.
mapbox-maps-ios/Sources/MapboxMaps/ContentBuilders/MapContent/MapStyleReconciler.swift
Line 119 in 0c92cef
guard let value, value != old?[key] else { |
Is this actually expected behaviour from .standard
use? Or is it a bug?
Metadata
Metadata
Assignees
Labels
bug 🪲Something is broken!Something is broken!