在cesium中我們可以添加物體進入地圖.我們以廣州塔為例
//生成廣州塔的位置var position2 = Cesium.Cartesian3.fromDegrees(113.3191,23.109,100)viewer.camera.setView({//指定相機位置destination: position2,
運行后如圖
我們使用cesium官網提供的代碼為廣州塔在地圖上標點
//添加一個點var point = viewer.entities.add({//定位點position:position2,//點 point:{//像素大小pixelSize:10,//顏色color:Cesium.Color.RED,//邊框顏色outlineColor:Cesium.Color.WHITE,//邊框寬度outlineWidth:4}})
運行后如圖