I'm trying to do a very simple thing, I want to place a billboard (or a placemark in GE language) on a set of coordinates. It happens that these coordinates are on the top of a small mountain. But when the camera view changes, so does the position of the billboard. Alas the billboard is not clamped/fixed to the ground. I hope that I'm doing something wrong and you can give me an easy solution, but then again such a basic functionality shouldn't be so difficult.
To replicate the problem you can go to the Hello Word demo http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Hello%20World.html&label=Showcases and add the following code:
var terrainProvider = new Cesium.CesiumTerrainProvider({
url : '//assets.agi.com/stk-terrain/world',
requestVertexNormals: true
});
viewer.terrainProvider = terrainProvider;
viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(23.815, 37.955),
billboard :{
image : '../images/Cesium_Logo_overlay.png'
}
});
The coordinates are in Athens, Greece. Try to change the camera view and watch the cesium logo moving with you. I'm using Firefox 41.0.2.
Thanks,
Nikos
var viewer = new Cesium.Viewer('cesiumContainer');
var cesiumTerrainProviderMeshes = new Cesium.CesiumTerrainProvider({
url : '//assets.agi.com/stk-terrain/world'
});
viewer.terrainProvider = cesiumTerrainProviderMeshes;
viewer.scene.globe.depthTestAgainstTerrain = true;
var ellipsoid = viewer.scene.globe.ellipsoid;
var billboardCollection = viewer.scene.primitives.add(new Cesium.BillboardCollection({
scene : viewer.scene
}));
billboardCollection.add({
position : Cesium.Cartesian3.fromDegrees(-110.0, 30.0),
image : '../images/facility.gif',
heightReference : Cesium.HeightReference.CLAMP_TO_GROUND
});
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Is the billboard issue fixed in latest version of Cesium (v1.37)?
Thanks,
Chakresh
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.