|
@@ -208,8 +208,9 @@ export default {
|
|
|
// this.$props.type == "hegxfx"
|
|
|
// ? "/static/data/ghss/导入.geojson"
|
|
|
// : "static/data/draw.geojson";
|
|
|
+ let _this = this;
|
|
|
let polygon = Cesium.GeoJsonDataSource.load(geojson, {
|
|
|
- // clampToGround: true
|
|
|
+ clampToGround: true,
|
|
|
stroke: Cesium.Color.RED,
|
|
|
fill: Cesium.Color.WHITE.withAlpha(0.3),
|
|
|
strokeWidth: 5,
|
|
@@ -218,7 +219,7 @@ export default {
|
|
|
// 将数据源添加到Cesium Viewer
|
|
|
viewer.dataSources.add(dataSource);
|
|
|
viewer.zoomTo(dataSource);
|
|
|
- this.dataSources = dataSource;
|
|
|
+ _this.dataSources = dataSource;
|
|
|
});
|
|
|
},
|
|
|
resetDataSources() {
|