Skip to content

Commit

Permalink
Add Mapbox Styles for XYZ rasters based on roblabs/xyz-raster-sources#2
Browse files Browse the repository at this point in the history
  • Loading branch information
roblabs committed Sep 30, 2021
1 parent c4ab1b5 commit fa1326a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OSM2VectorTiles/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ struct ContentView: View {
var body: some View {
MapboxView()
.centerCoordinate(
.init(latitude: 33.0, longitude: -116.0)).zoomLevel(1)
.init(latitude: 32.713103, longitude: -117.171231)).zoomLevel(7)
}
}

Expand Down
7 changes: 6 additions & 1 deletion OSM2VectorTiles/MapboxView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ struct MapboxView: UIViewRepresentable {
}

func updateUIView(_ uiView: MGLMapView, context: Context) {
let localStyle = "asset://styles/geography-class-local.json"
var localStyle = "asset://styles/geography-class.GitHub.json"
// localStyle = "https://raw.githubusercontent.com/roblabs/openmaptiles-ios-demo/master/OSM2VectorTiles/styles/geography-class.GitHub.json"
// localStyle = "https://raw.githubusercontent.com/roblabs/xyz-raster-sources/master/styles/naturalearthtiles.json"
// localStyle = "https://raw.githubusercontent.com/roblabs/xyz-raster-sources/master/styles/tileservice-charts-noaa-gov.json"
// localStyle = "https://raw.githubusercontent.com/roblabs/xyz-raster-sources/master/styles/arcgis-world-imagery.json"
// localStyle = "https://raw.githubusercontent.com/roblabs/xyz-raster-sources/master/styles/stamen-multi-rasters.json"
let _ = setStyle(localStyle)
OSLog.mapView(.event, "🗺 style: \(String(describing: mapView.styleURL!))")
}
Expand Down

0 comments on commit fa1326a

Please sign in to comment.