Hello.
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) :
http://cazala.free.fr/without_3D.PNG
- 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 : '//assets.agi.com/stk-terrain/world '
});
http://cazala.free.fr/with_3D.PNG
You can see the source code here :
http://www.pyrandonnees.fr/gpx/carte_earth.php?gpx=650952
Anybody can help me to solve this problem ?
Thank you.
Best regards,
Jérôme
hannah
January 13, 2017, 8:08pm
2
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: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Terrain.html&label=Showcases
Best,
Hannah
Hello.
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
http://www.pyrandonnees.fr/gpx/carte_earth_test.php?gpx=705916
Probably something missing in my code...
Any idea ?
Best regards.
Jérôme
hannah
January 16, 2017, 4:03pm
4
I couldn’t fine where the data is on the globe. What are the coordinates?
-Hannah
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.
http://www.pyrandonnees.fr/gpx/carte_earth.php?gpx=705916
Best regards.