KML clampping to 3Dtiles


Is it possible to clamp a KML to a 3Dtile?


Currently not automatically. We are currently working on a way to easily clamp entities to tilesets, and in the meantime we have a demo with a workaround for clamping to tilesets.



Not yet developed??

kml only can clamp to terrain.

Not to photogrammetry 3dtiles.

I do this work by using FME ‘surface draper tool’ clamp kml to DSM and give alpha z value.

This should actually work now! You can clamp entities in Cesium (when you load a KML in Cesium it gets added to the scene as entities) on either terrain, 3D Tiles, or both.

Here’s an example of textured materials on 3D Tiles and terrain:

And this one shows polylines:

You can even have dynamic entities clamped:

Hi Omar.
Is it kml clamp to 3dtiles working now??
It seems not working for me
my code is below

    var options = {
		camera :,
		canvas : viewer.scene.canvas,
	var kml = viewer.dataSources.add(Cesium.KmlDataSource.load('/project/autodesk/3dtiles/auto_line_kmz.kml', options));

Thank you

You need to set clampToGround: true in your KML options, so it would look like this:

var options = {
		camera :,
		canvas : viewer.scene.canvas,
        clampToGround: true,
var kml = viewer.dataSources.add(Cesium.KmlDataSource.load('/project/autodesk/3dtiles/auto_line_kmz.kml', options));

If it’s still not working, I would check that your entities inside the KML have an altitude mode of “clampToGround” as well. And note that lines can only be clamped to ground when they have tessellate set to true:

Hi omar.
Thank you for your reply. I just solve the problem about polyline clamptoground. but point is still not working. point clamptoground to 3dtiles is not support??

Points should be clamped to ground in the same way. It must have a height reference of clamp to ground or relative to ground. If it’s not working, try uploading your file to Cesium ion and share a Sandcastle here (see How to share custom Sandcastle examples) and I can take a look.