Skip to content

Commit bfb27b9

Browse files
Update README.md
1 parent 61ef22b commit bfb27b9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,19 @@ mapView.pinToSuperviewEdges()
5858
```swift
5959
import MapTilerSDK
6060

61-
@State private var referenceStyle: MTMapReferenceStyle = .streets
62-
@State private var styleVariant: MTMapStyleVariant? = .defaultVariant
63-
6461
@State private var mapView = MTMapView(options: MTMapOptions(zoom: 2.0))
6562

6663
var body: some View {
6764
MTMapViewContainer(map: mapView) {}
68-
.referenceStyle(referenceStyle)
69-
.styleVariant(styleVariant)
65+
.referenceStyle(.streets)
7066
}
7167
```
7268

7369
For detailed functionality overview refer to the API Reference documentation or build local docs in Xcode: Product -> Build Documentation.
7470

7571
## Sources and Layers
7672

77-
Sources and layers can be added to the map view style object as soon as map is initialized.
73+
Sources and layers can be added to the map view style object as soon as map is initialized. Setting the style after adding layers resets them to default, so make sure style is finished loading first.
7874

7975
### UIKit
8076

0 commit comments

Comments
 (0)