Problem of coordinates with 3D view

Excuse me for my poor english.
I use the Cesium JS script (great piece of code!) on my website and I encounter a problem with the 3D rendering of gpx files on a 3D terrain.

Here you can see :
- the classical 2D view (OK) :

- the 3D view (having a problem with the gpx track location not around the lake like in classical view)
    I use : var terrainProvider = new Cesium.CesiumTerrainProvider({
      url : '//'

You can see the source code here :

Anybody can help me to solve this problem ?
Thank you.

Best regards,


Hello Jérôme,

We don’t currently have support for polylines on terrain, but it is one of the most frequently requested features and we would like to add support.

In the meantime, you can try using sampleTerrain to query the terrain for it’s height at each position.

You can see this demo for an example for how to use the function:



First, thank you very much for you help.
So i modify my source code in order to :
- load positions (lon, lat) from the kml
- make them converted by the sample terrain to have heights
- draw them on the terrain like in the example

Unfortunatelly that does not work properly. I can't see the drawed points on the terrain :frowning:

Probably something missing in my code...
Any idea ?

Best regards.


I couldn’t fine where the data is on the globe. What are the coordinates?


Hello Hanna,

Points are located in South West of France.
You can see them here on the 2D version of the map with the good points locations.

Best regards.