|
@@ -114,7 +114,7 @@
|
|
|
>
|
|
|
</div>
|
|
|
</div> -->
|
|
|
- <dkDetails ref="dkDetails" @mapview="mapview"></dkDetails>
|
|
|
+ <dkDetails ref="dkDetails" @mapview="mapview" @pullUp="pullUp"></dkDetails>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -268,7 +268,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 加载GeoJSON数据
|
|
|
- loadGeoJSON(geojson, yanse, id) {
|
|
|
+ loadGeoJSON(geojson, yanse, id, height) {
|
|
|
let fcolor = id
|
|
|
? Cesium.Color.fromCssColorString(yanse)
|
|
|
: Cesium.Color.WHITE;
|
|
@@ -284,19 +284,27 @@ export default {
|
|
|
.then((data) => {
|
|
|
viewer.dataSources.add(data);
|
|
|
let entities = data.entities.values;
|
|
|
- if (!geojson.type.includes("Polygon")) {
|
|
|
- entities.forEach((value) => {
|
|
|
- if (value.billboard) {
|
|
|
- value.billboard = undefined;
|
|
|
- value.point = {
|
|
|
+ if (!geojson.type.includes("Polygon") || height) {
|
|
|
+ entities.forEach((entity) => {
|
|
|
+ if (entity.billboard) {
|
|
|
+ entity.billboard = undefined;
|
|
|
+ entity.point = {
|
|
|
pixelsize: 20,
|
|
|
color: Cesium.Color.fromCssColorString(yanse),
|
|
|
};
|
|
|
}
|
|
|
+ if (height && entity.polygon) {
|
|
|
+ entity.polygon.extrudedHeight = height;
|
|
|
+ entity.polygon.material = Cesium.Color.WHITE;
|
|
|
+ entity.polygon.outlineColor = Cesium.Color.BLACK;
|
|
|
+ entity.polygon.outlineWidth = 1.0;
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
+ var pitch = height ? -0.8 : 45; // Cesium.Math.toRadians(-45.0);-0.7853981633974483
|
|
|
+ let range = height ? 3000 : 5000;
|
|
|
viewer.flyTo(data, {
|
|
|
- offset: new Cesium.HeadingPitchRange(0, -45, 5000),
|
|
|
+ offset: new Cesium.HeadingPitchRange(0, pitch, range),
|
|
|
});
|
|
|
// viewer.zoomTo(data);
|
|
|
if (id) {
|
|
@@ -320,7 +328,6 @@ export default {
|
|
|
},
|
|
|
//规划信息
|
|
|
planInfo(e, item) {
|
|
|
- this.$refs.dkDetails.itemObj = item;
|
|
|
this.$refs.dkDetails.show(item, "规划信息");
|
|
|
this.$refs.dkDetails.getCollapseList();
|
|
|
},
|
|
@@ -354,6 +361,10 @@ export default {
|
|
|
if (!dataSources[item.id])
|
|
|
this.drawWktPloygon(item.geom, "#ff0000", item.id);
|
|
|
},
|
|
|
+ pullUp(item, height) {
|
|
|
+ if (!dataSources[item.id])
|
|
|
+ this.loadGeoJSON(parse(item.geom), "#000000", item.id, height);
|
|
|
+ },
|
|
|
|
|
|
submit() {
|
|
|
console.log("生成报告");
|