I would like to add some extra data such as {dataId: 12345, type: “secondary“} or something similar to a 3dtileset when its being created with Cesium3DTileset.fromUrl('url', { options });
I know I can add it through the tileset json and access it through extras but is there another way? I could also just add a property to the returned tileset object but I would like to see if there was a better way.
The use case is that when I click and pick a 3dtileset, i would like to do different things based on which tileset it is.
Hello, thank you for the link but I dont think that is 100% related to my question.
I know that I am able to add extra data through the 3dtiles json which will be shown in the readonly extras within the tileset after it was ingested by cesium through Cesium3dTileset.fromUrl or something similar.
What I am looking for is if theres a way to add extra data while creating the Cesium3dTileset object through Cesium3DTileset - Cesium Documentation (Cesium3dTileset.fromUrl)
What I would like to do is something like const tileset = await Cesium3dTileset.fromUrl(‘urlToTilesetJson’, {extraData: {id: ourInternalIdForThisTileset, priority: 3}} const internalId = tileset.extraData.id
and then we would be able to figure out our own internal id for this tileset. I could create a custom type for this but I was wondering if something like this already exists.
There are workarounds in Cesium for Unreal which are unfortunately generally not low-effort Adding metadata to the OSM dataset - #2 by Kevin_Ring. If you are interested I can research if similar workflows are available in CesiumJS with the heavy lifitng documented (with a cursory look now I do not see any documented).
Thanks and please let us know if you have more questions or thoughts to share on this topic.