您好,
具体出现的报错信息是什么呢?方便截图吗?
另外:billboard贴地示范代码
var viewer = new Cesium.Viewer('cesiumContainer',{
//添加STK World Terrain地形服务
terrainProvider : new Cesium.CesiumTerrainProvider({
url : URL_CONFIG.STK,
requestWaterMask : true,
requestVertexNormals : true
}),
//添加BingMaps影像服务
imageryProvider : new Cesium.BingMapsImageryProvider({
url : 'https://dev.virtualearth.net',
mapStyle : Cesium.BingMapsStyle.AERIAL,
key : URL_CONFIG.BING_MAP_KEY
})
});
//设置相机视角
viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(103.064734, 31.12816),
billboard :{
image : './images/省级.png',
heightReference:Cesium.HeightReference.CLAMP_TO_GROUND
}
});
viewer.scene.globe.depthTestAgainstTerrain = false;
viewer.scene.camera.setView({
destination : new Cesium.Cartesian3.fromDegrees(103.064734,31.12816,8870.867706),
orientation : {
heading : 0.34555839949062594,
pitch : -0.1422794351856307,
roll : 0.0009471063581933947
}
});
可以对照一下