Open avi-c opened 6 years ago
This works: mapView.styleURL = URL(string: "mapbox://styles/username/key")
This is possible, but styles copied from https://www.mapbox.com/studio/ aren't in the right format.
Style URLs copied from studio look like this mapbox://styles/jimmartin/cjmidt2lq44ei2rlkvpt1hnhz
, but the static API uses {username}/{StyleID}, so removing the mapbox://styles/
section should give a custom style.
We should make it possible to copy/paste from studio, but in the meantime, use:
textureStyle: "jimmartin/cjmidt2lq44ei2rlkvpt1hnhz"
instead of
textureStyle: mapbox://styles/jimmartin/cjmidt2lq44ei2rlkvpt1hnhz
The current API is using URL schemes that are specific to a few default styles.