Skip to content

Commit 61ef22b

Browse files
RD-1007: Update README.md
1 parent acb8e87 commit 61ef22b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ guard let style = mapView.style else {
8383
return
8484
}
8585

86-
if let contoursTilesURL = URL(string: "https://api.maptiler.com/tiles/contours-v2/{z}/{x}/{y}.pbf?key=YOUR_API_KEY") {
87-
let contoursDataSource = MTVectorTileSource(identifier: "contoursSource", tiles: [contoursTilesURL])
86+
if let contoursTilesURL = URL(string: "https://api.maptiler.com/tiles/contours-v2/tiles.json?key=YOUR_API_KEY") {
87+
let contoursDataSource = MTVectorTileSource(identifier: "contoursSource", url: contoursTilesURL)
8888
style.addSource(contoursDataSource)
8989

9090
let contoursLayer = MTLineLayer(identifier: "contoursLayer", sourceIdentifier: contoursDataSource.identifier, sourceLayer: "contour_ft")
@@ -102,7 +102,7 @@ if let contoursTilesURL = URL(string: "https://api.maptiler.com/tiles/contours-v
102102

103103
var body: some View {
104104
MTMapViewContainer(map: mapView) {
105-
MTVectorTileSource(identifier: "countoursSource", tiles: [URL(string: "https://api.maptiler.com/tiles/contours-v2/{z}/{x}/{y}.pbf?key=YOUR_API_KEY")])
105+
MTVectorTileSource(identifier: "countoursSource", url: URL(string: "https://api.maptiler.com/tiles/contours-v2/tiles.json?key=YOUR_API_KEY"))
106106

107107
MTLineLayer(identifier: "contoursLayer", sourceIdentifier: "countoursSource", sourceLayer: "contour_ft")
108108
.color(.brown)

0 commit comments

Comments
 (0)