You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add `StyleReloadPolicy` to control style reload behavior. Use `reloadPolicy: .always` parameter in `loadStyle()` methods or `MapStyle` initializers to always reload the style even when the URI or JSON matches the currently loaded style. Defaults to `.onlyIfChanged` for optimal performance.
22
22
23
+
* Introduce the `LocationManager.locationDataModel` and make it possible to use location provider from MapboxCommon. Deprecate the `LocationManager.override*` methods.
24
+
Now you can choose to use the location provider from MapboxCommon.
25
+
```swift
26
+
@_spi(Experimental) import MapboxMaps
27
+
28
+
// UIKit
29
+
let initOptions = MapInitOptions(
30
+
locationDataModel: .createCore()
31
+
)
32
+
let mapView = MapView(mapInitOptions: initOptions) // specify at init time (recommended)
33
+
mapView.mapboxMap.locationDataModel = .createCore() // or, override it at runtime
34
+
35
+
36
+
// SwiftUI
37
+
struct MyView: View {
38
+
@State var locationDataModel = LocationDataModel.createCore()
Copy file name to clipboardExpand all lines: Sources/Examples/SwiftUI Examples/SwiftUIRoot.swift
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@ struct SwiftUIExamples {
42
42
Example("Puck playground", note:"Display user location using puck.", destination:PuckPlayground())
43
43
Example("Annotation Order", note:"Test the rendering order of annotations.", destination:AnnotationsOrderTestExample())
44
44
Example("Snapshot Map", note:"Make a snapshot of the map.", destination:SnapshotMapExample())
45
+
Example("Locate Me (Core Location Provider)", note:"Use Viewport to create user location control. This example uses Location Provider from MabpoxCommon", destination:LocateMeCoreLocationProviderExample())
45
46
46
47
Example("Attribution url via callback", note:"Works on iOS 13+", destination:AttributionManualURLOpen())
47
48
Example("Raster particles", note:"Rendering of raster particles.", destination:RasterParticleExample())
0 commit comments