mapid for rendering mapbox which has custom style using mapBoxImageryProvider

Hello Patrick/Mathew,

This query is regarding the basemap of mapbox using cesium MapBoxImageryProvider.

Issue

I have
subscribed to Mapbox, created my own account, created and added my own Mapbox
Access Token, then created my own custom map style in the Mapbox Studio
UI as given in the attachment . I am unable to render the map of custom
styles .

Reason
For issue

of what I
have noticed is the mapbox rendering through cesium using MapBoxImageryProvider
expects mapId as
mandatory param, but the custom styles created through Mapbox studio as given
below do not have mapIds, could u please let me know whether there is a way to get mapIds for the created
custom styles.

Approach
Tried

Also I have
tried using UrlTemplateImageryProvider, but in vain.

Could u please guide me any other alternative approach on the same.

thanks and regards,

chandrika

Hello Chandrika,

We don’t currently have support for the mapbox styles API. We have an issue written up here to modify MapBoxImageryProvider to add it: https://github.com/AnalyticalGraphicsInc/cesium/issues/4015

Until then, you should be able to use the UrlTemplateImageryProvider. When I was looking into this issue before, I believe the url should be formatted like this: https://api.mapbox.com/styles/v1/{username}/{style_id}/tiles/{tileSize}?/{z}/{x}/{y}?access_token={access_token}

Best,

Hannah