原文链接及内容
效果如下所示:

示例代码如下:关于simplestyle详见注释提供的链接进行学习。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
const viewer = new Cesium.Viewer("cesiumContainer", { sceneMode: Cesium.SceneMode.SCENE2D, geocoder: false, sceneModePicker: false, homeButton: false, navigationHelpButton: false, baseLayerPicker: false, navigationInstructionsInitiallyVisible: false, fullscreenButton: false, selectionIndicator: false, skyBox: false, timeline: false, animation: false, shouldAnimate: true, });
viewer.cesiumWidget.creditContainer.style.display = "none";
const dataSource = Cesium.GeoJsonDataSource.load( "../SampleData/simplestyles.geojson", ); viewer.dataSources.add(dataSource); viewer.zoomTo(dataSource);
|