How to add Billboard with I3S data

I have a URL that return a JSON about I3S data,
so I could use I3SDataProvider to show some 3D buildings at the view.

Now I want to add icon upon every building.
I referred the the examples in sandcastle about Billboards and watch the object from I3SDataProvider but got nothing, did I miss something?

the effect I want:

my code:

    const modelUrl = "https://...";
    Cesium.Ion.defaultAccessToken = "...";

    const viewer = new Cesium.Viewer("container", {
      terrain: Cesium.Terrain.fromWorldTerrain(),
    });

    try {
      const i3sData = await Cesium.I3SDataProvider.fromUrl(modelUrl);
      viewer.scene.primitives.add(i3sData);

      console.log("i3sData:", i3sData);
      }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
    } catch (error) {
      console.log(
        `There was an error creating the I3S Data Provider: ${error}`
      );
    }

Hi there,

Do you have some sample code for what you tried here?

1 Like

Thanks for your reply :grinning:
I think I found the solution for this problem!

After I tried to analyze the JSON’s structure,
I could get the buildings’s data from the property ā€œnodePageā€,
and use these nodes position to create some billboards or points!

reference: https://github.com/Esri/i3s-spec/blob/master/docs/1.7/nodePage.cmn.md

1 Like