I want to host and render vector tiles using .pbf files in the new Mapbox SDK iOS (v10). I tried the following but it does not work.
mapView = MapView(frame: view.bounds)
mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
view.addSubview(mapView)
var vectorSource = VectorSource()
vectorSource.url = "https://maps-new.jungleworks.com/v2/tiles/{z}/{x}/{y}.pbf?fm_token=29f5d580-a7ca-11e9-a2dd-05dd261bdedc"
vectorSource.minzoom = 6
vectorSource.maxzoom = 14
do {
try mapView.mapboxMap.style.addSource(vectorSource, id: "Identifier")
} catch {
print(error.localizedDescription)
}
(Note: The token in the vector tiles source is my own and can be used by anyone for testing purposes. )