I’ve run into an issue getting custom map styles (from MapBox) to display in Cesium. I can get the defaults working fine so I know the code I’m using is correct. However, when I use the assetToken
and styleId
for the custom map from MapBox I keep getting an error (see below).
imageryProvider: new Cesium.MapboxStyleImageryProvider({
styleId: 'cli8woyr703dw01p62dr6fof9',
accessToken:
'..',
}),
The accessToken
is provided for the custom style I’ve created. When I use it or the default one, it fails.
An error occurred in "W_": Failed to obtain image tile X: 7 Y: 1 Level: 3.
in
This is repeated multiple times for every tile that is attempted to be retrieved. If I attempt to open the URL of the tile I get this error:
{"message":"Not Authorized - Invalid Token"}
So, this feels like an authentication issue but I’ve checked and re-checked that I the correct accessToken. It’s public so it shoudl work. Has anyone out there had any luck with doing this?