kml stays below the photorealistic google 3d tiles.

I have a problem, I import a kml to cesium.js and the plan takes it perfectly to its coordinates, the problem is that the elevation remains as if it were at level 0 (within the globe), I have tried the clamtoground function (tree) . and if I look at it in google earth pro it looks perfect,

cesium js

Hi @keypull, are you using createGooglePhotorealistic3DTileset, or some other method to create the tiles?

How are you loading the KML? There could be some issue with the HeightReference setting.

If you can provide a Sandcastle example showing the problem, it will be easier for us to figure out what is going wrong.

Are you using createGooglePhotorealistic3DTileset or some other method to create the tiles?

No, in the code you provided you are not using createGooglePhotorealistic3DTileset. Instead, you are loading a 3D tileset via Cesium.Cesium3DTileset.fromIonAssetId(2275207) and then adding it to the scene with viewer.scene.primitives.add(tileset). This means that you are loading a specific tileset stored in Cesium Ion using its asset ID, instead of using the createGooglePhotorealistic3DTileset method.

How are you loading the KML file?

You are loading the KML file using the Cesium.KmlDataSource.load(kmlData, kmlOptions) method. Here is the flow:

The user selects a KML or KMZ file using a element.
The file is read using FileReader.
The read data is passed to Cesium.KmlDataSource.load() along with the options (camera, canvas, and clampToGround).
The resulting KmlDataSource is added to the viewer’s dataSources collection and viewer.flyTo(dataSource) is used to focus the view on the loaded KML.