考虑性能问题暂去除正射图层

master
许宏杰 1 month ago
parent af0ff405f7
commit af9ad3da30

@ -22,16 +22,6 @@
<link href="./lib/mars3d/mars3d.css" rel="stylesheet" type="text/css" />
<script src="./lib/mars3d/mars3d.js" type="text/javascript"></script>
<script
src="./lib/mars3d/plugins/echarts/echarts.min.js"
type="text/javascript"
></script>
<script
src="./lib/mars3d/plugins/echarts/mars3d-echarts.js"
type="text/javascript"
></script>
<script src="./lib/localforage.js" type="text/javascript"></script>
<script src="./lib/CesiumNetworkPlug.js" type="text/javascript"></script>
<title><%= webpackConfig.name %></title>

@ -57,6 +57,7 @@ export default {
mapLoad(map) {
let _this = this;
this.map = map;
map.centerAt(this.config.viewHome, {
complete: function () {
//
@ -215,12 +216,13 @@ export default {
width: 70,
height: 45,
clampToGround: false,
visibleDepth: true,
label: {
text: key,
font_size: 14,
font_family: "黑体",
color: "#ffffff",
visibleDepth: false,
pixelOffsetY: -5,
background: true,
backgroundColor: "#000000",
@ -286,7 +288,7 @@ export default {
const { yuanName, buildingNumber, buildingColor, image } =
this.pointFilter(item.attr);
const polygon = new mars3d.graphic.PolygonEntity({
id: buildingNumber,
id: item.attr["幢号"],
positions: item.positions,
style: {
color: "transparent",
@ -298,7 +300,7 @@ export default {
});
this.mapLayer.plane.addGraphic(polygon);
const point = new mars3d.graphic.BillboardEntity({
id: buildingNumber,
id: item.attr["幢号"],
position: polygon.centerPoint,
style: {
image: image,
@ -409,10 +411,9 @@ export default {
});
this.map.addLayer(this.mapLayer.tiles3dLayer);
},
//3D
handle3D() {
//2D - 3D
handle3dPoint() {
this.mapLayer.tiles3dLayer.show = true;
//
this.mapLayer.planePoint.eachGraphic((graphic) => {
let attr = graphic.attr;
@ -432,7 +433,6 @@ export default {
});
});
},
//
addDTH() {
let geoJsonLayerDTH = new mars3d.layer.GeoJsonLayer({
@ -456,6 +456,40 @@ export default {
});
this.map.addLayer(geoJsonLayerDTH);
},
// handlezs() {
// // this.mapLayer.zhengsheLayer.show = true;
// this.addZhengsheLayer();
// },
// //
// addZhengsheLayer() {
// if (!window.zhengsheLayer) {
// //
// window.zhengsheLayer = new mars3d.layer.WmsLayer({
// show: false,
// url: this.config.zhengshe.url,
// layers: this.config.zhengshe.layers,
// parameters: {
// transparent: true,
// format: "image/png",
// },
// // bbox: [
// // 608648.6336036972, 3481287.392025131, 609648.8066657612,
// // 3482195.491969689,
// // ],
// // srs: "EPSG:4549",
// // brightness: 0.9,
// // contrast: 0.9, //
// // saturation: 0.9,
// // gamma: 0.9,
// // tileWidth: 64,
// // tileHeight: 64,
// });
// this.map.addLayer(window.zhengsheLayer);
// window.zhengsheLayer.show = true;
// }
// },
},
};
</script>

@ -8,6 +8,7 @@
<div class="buttom-group">
<button @click="handle3D()"></button>
<button @click="handlezs()"></button>
</div>
</div>
</template>
@ -39,7 +40,10 @@ export default {
},
methods: {
handle3D() {
this.$refs.map.handle3D();
this.$refs.map.handle3dPoint();
},
handlezs() {
this.$refs.map.handlezs();
},
},
};

Loading…
Cancel
Save