Cesium version problem with deck.gl

Hey! i get email from Omar to post here the problem so:
I’m using Deck.gl and need to show the newest version of asset but i always get first one.

   return new Tile3DLayer({
        id: `tile-3d-layer-${id}`,
        data: `https://assets.cesium.com/${id}/tileset.json`,
        loader: CesiumIonLoader,
        loadOptions: { "cesium-ion": { accessToken' } },
        coordinateSystem: COORDINATE_SYSTEM.LNGLAT,
        pointSize: 1,
        opacity: 0.1,
    });

i was looking on cesium API, but there is no version list or something like this.

The version in Cesium ion is passed as a query parameter to the URL. For example, if you’re loading the Cesium OSM Buildings (in this example: https://sandcastle.cesium.com/index.html?src=Cesium%20OSM%20Buildings.html&label=All) you can see the URL that’s loaded is:

https://assets.cesium.com/96188/tileset.json?v=1

So if/when this asset is updated, the new version may be obtained from ?v=2. With that said, Cesium ion doesn’t currently allow updating an asset (you need to re-upload and get a new asset ID). Can you explain a bit more what you’re currently seeing and what the expected behavior here is?

I know that i can use query parameter, but what i need is that if i have lot of asset and some of them are updated in the web cesium then all can have different asset newest version.
So my question is there any possibility to get newest version of every asset? something like:

https://assets.cesium.com/id/tileset.json?v=latest 

Yeah, making a request to this route returns the correct URL you should be using to access the tileset.json: https://cesium.com/docs/rest-api/#operation/getAssetEndpoint.

1 Like

Thanks, that’s what I was looking for!

1 Like