|
@@ -64,7 +64,6 @@
|
|
|
class="header-icon el-icon-place"
|
|
|
@click.stop="mapview(item)"
|
|
|
></i>
|
|
|
-
|
|
|
<i
|
|
|
class="header-icon el-icon-s-order"
|
|
|
@click="planInfo($event, item)"
|
|
@@ -235,7 +234,7 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
};
|
|
|
- this.loadGeoJSON(geom, itemColor, id);
|
|
|
+ this.loadGeoJSON(parse(item), itemColor, id);
|
|
|
|
|
|
// viewer.entities.removeAll();
|
|
|
// let geoms =
|
|
@@ -270,12 +269,15 @@ export default {
|
|
|
|
|
|
// 加载GeoJSON数据
|
|
|
loadGeoJSON(geojson, yanse, id) {
|
|
|
+ let fcolor = id
|
|
|
+ ? Cesium.Color.fromCssColorString(yanse)
|
|
|
+ : Cesium.Color.WHITE;
|
|
|
const dataSource = new Cesium.GeoJsonDataSource();
|
|
|
dataSource
|
|
|
.load(geojson, {
|
|
|
clampToGround: true,
|
|
|
stroke: Cesium.Color.fromCssColorString(yanse),
|
|
|
- fill: Cesium.Color.WHITE.withAlpha(0.3), //注意:颜色必须大写,即不能为blue
|
|
|
+ fill: fcolor.withAlpha(0.4), //注意:颜色必须大写,即不能为blue
|
|
|
strokeWidth: 5,
|
|
|
})
|
|
|
.then((data) => {
|