mapbox / mapbox-scenekit

Other
231 stars 51 forks source link

Need to extend the MapboxHTTPAPI class to support specifying custom map style URLs. #30

Open avi-c opened 6 years ago

avi-c commented 6 years ago

The current API is using URL schemes that are specific to a few default styles.

rockarts commented 6 years ago

This works: mapView.styleURL = URL(string: "mapbox://styles/username/key")

jim-martin commented 5 years ago

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