|
@@ -53,12 +53,41 @@ export default {
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
go(e) {
|
|
|
- console.log();
|
|
|
-
|
|
|
+ const that = this;
|
|
|
e.forEach(element => {
|
|
|
- if (element.filed == "geom") {
|
|
|
- console.log(element.data);
|
|
|
- }
|
|
|
+ // if (element.filed == "geom") {
|
|
|
+ // viewer.dataSources.remove(viewer.dataSources.getByName('闪烁')[0]);
|
|
|
+
|
|
|
+ // let geojson = wellknown.parse(element.data);
|
|
|
+
|
|
|
+ // let polygon = Cesium.GeoJsonDataSource.load(geojson, {
|
|
|
+ // // clampToGround: true,
|
|
|
+ // stroke: Cesium.Color.RED,
|
|
|
+ // fill: Cesium.Color.WHITE.withAlpha(0),
|
|
|
+ // strokeWidth: 5,
|
|
|
+ // });
|
|
|
+ // polygon.then(function (dataSource) {
|
|
|
+ // console.log('dataSource: ', dataSource);
|
|
|
+ // // 将数据源添加到Cesium Viewer
|
|
|
+ // viewer.dataSources.add(dataSource);
|
|
|
+ // dataSource.name = '闪烁';
|
|
|
+ // viewer.zoomTo(dataSource);
|
|
|
+
|
|
|
+ // let time = setInterval(() => {
|
|
|
+ // dataSource.show = !dataSource.show;
|
|
|
+ // }, 500);
|
|
|
+ // setTimeout(() => {
|
|
|
+ // clearInterval(time);
|
|
|
+ // viewer.dataSources.remove(viewer.dataSources.getByName('闪烁')[0]);
|
|
|
+
|
|
|
+ // }, 6000);
|
|
|
+
|
|
|
+
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
|
|
|
},
|
|
@@ -120,8 +149,8 @@ export default {
|
|
|
const wkt = wellknown.stringify(geojsonPoint);
|
|
|
let obj = {
|
|
|
// "wkt": 'POINT (109.51207847188947 18.311530254307392)', //单面
|
|
|
- // "wkt": 'POINT (109.50728022974468 18.318266593715794)', //多面
|
|
|
- "wkt": wkt,
|
|
|
+ "wkt": 'POINT (109.50728022974468 18.318266593715794)', //多面
|
|
|
+ // "wkt": wkt,
|
|
|
|
|
|
"id": 'dd699f839bc04969ae2dc2e1964d0ad1',
|
|
|
}
|
|
@@ -209,7 +238,7 @@ export default {
|
|
|
polygonHierarchy: new Cesium.PolygonHierarchy(
|
|
|
Cesium.Cartesian3.fromDegreesArray(oneDArray)
|
|
|
),
|
|
|
- height: 5,
|
|
|
+ height: 1,
|
|
|
// extrudedHeight: 10,
|
|
|
})
|
|
|
})
|
|
@@ -230,8 +259,13 @@ export default {
|
|
|
this.manager_multi_level_vector.add(addPolygonGeometry)
|
|
|
},
|
|
|
draw_vector(geojson, data) {
|
|
|
+ // viewer.dataSources.add(Cesium.GeoJsonDataSource.load(geojson, {
|
|
|
+ // stroke: Cesium.Color.HOTPINK,
|
|
|
+ // fill: Cesium.Color.PINK,
|
|
|
+ // strokeWidth: 3,
|
|
|
+ // markerSymbol: '?'
|
|
|
+ // }));
|
|
|
const that = this;
|
|
|
- // 多面转面,在加载
|
|
|
if (geojson.type == 'MultiPolygon') {
|
|
|
let polygons = that.multiPolygonToPolygons(geojson);
|
|
|
|