MapBox for iOS, custom styling

I created a new map style using Mapbox Studio, then I uploaded it to my account (so I can see it in the styles tab) and then added the StyleID to my iOS MGLMapView but when I run the app it throws an error

[ERROR] {Map}[Setup]: loading style failed: HTTP status code 404

      

If I don't use my style the map works correctly.

+3


source to share


1 answer


Try this in viewDidload:

mapView.styleURL = NSURL(string: "asset://styles/dark-v7.json")

      

Update 1:

It is currently not possible to use a custom map style with Mapbox GL for iOS.



'First Steps with Mapbox GL for iOS' :

Change the map style

Currently Mapbox GL comes with several map styles. This will all change in a few months, but now lets you change the map style to Mapbox Dark ...

+1


source







All Articles