|
|
@ -57,6 +57,7 @@ export default {
|
|
|
|
mapLoad(map) {
|
|
|
|
mapLoad(map) {
|
|
|
|
let _this = this;
|
|
|
|
let _this = this;
|
|
|
|
this.map = map;
|
|
|
|
this.map = map;
|
|
|
|
|
|
|
|
|
|
|
|
map.centerAt(this.config.viewHome, {
|
|
|
|
map.centerAt(this.config.viewHome, {
|
|
|
|
complete: function () {
|
|
|
|
complete: function () {
|
|
|
|
//加载图层数据
|
|
|
|
//加载图层数据
|
|
|
@ -215,12 +216,13 @@ export default {
|
|
|
|
width: 70,
|
|
|
|
width: 70,
|
|
|
|
height: 45,
|
|
|
|
height: 45,
|
|
|
|
clampToGround: false,
|
|
|
|
clampToGround: false,
|
|
|
|
visibleDepth: true,
|
|
|
|
|
|
|
|
label: {
|
|
|
|
label: {
|
|
|
|
text: key,
|
|
|
|
text: key,
|
|
|
|
font_size: 14,
|
|
|
|
font_size: 14,
|
|
|
|
font_family: "黑体",
|
|
|
|
font_family: "黑体",
|
|
|
|
color: "#ffffff",
|
|
|
|
color: "#ffffff",
|
|
|
|
|
|
|
|
visibleDepth: false,
|
|
|
|
pixelOffsetY: -5,
|
|
|
|
pixelOffsetY: -5,
|
|
|
|
background: true,
|
|
|
|
background: true,
|
|
|
|
backgroundColor: "#000000",
|
|
|
|
backgroundColor: "#000000",
|
|
|
@ -286,7 +288,7 @@ export default {
|
|
|
|
const { yuanName, buildingNumber, buildingColor, image } =
|
|
|
|
const { yuanName, buildingNumber, buildingColor, image } =
|
|
|
|
this.pointFilter(item.attr);
|
|
|
|
this.pointFilter(item.attr);
|
|
|
|
const polygon = new mars3d.graphic.PolygonEntity({
|
|
|
|
const polygon = new mars3d.graphic.PolygonEntity({
|
|
|
|
id: buildingNumber,
|
|
|
|
id: item.attr["幢号"],
|
|
|
|
positions: item.positions,
|
|
|
|
positions: item.positions,
|
|
|
|
style: {
|
|
|
|
style: {
|
|
|
|
color: "transparent",
|
|
|
|
color: "transparent",
|
|
|
@ -298,7 +300,7 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.mapLayer.plane.addGraphic(polygon);
|
|
|
|
this.mapLayer.plane.addGraphic(polygon);
|
|
|
|
const point = new mars3d.graphic.BillboardEntity({
|
|
|
|
const point = new mars3d.graphic.BillboardEntity({
|
|
|
|
id: buildingNumber,
|
|
|
|
id: item.attr["幢号"],
|
|
|
|
position: polygon.centerPoint,
|
|
|
|
position: polygon.centerPoint,
|
|
|
|
style: {
|
|
|
|
style: {
|
|
|
|
image: image,
|
|
|
|
image: image,
|
|
|
@ -409,10 +411,9 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.map.addLayer(this.mapLayer.tiles3dLayer);
|
|
|
|
this.map.addLayer(this.mapLayer.tiles3dLayer);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//3D
|
|
|
|
//2D - 3D点处理
|
|
|
|
handle3D() {
|
|
|
|
handle3dPoint() {
|
|
|
|
this.mapLayer.tiles3dLayer.show = true;
|
|
|
|
this.mapLayer.tiles3dLayer.show = true;
|
|
|
|
|
|
|
|
|
|
|
|
//修改二维图标成为三维
|
|
|
|
//修改二维图标成为三维
|
|
|
|
this.mapLayer.planePoint.eachGraphic((graphic) => {
|
|
|
|
this.mapLayer.planePoint.eachGraphic((graphic) => {
|
|
|
|
let attr = graphic.attr;
|
|
|
|
let attr = graphic.attr;
|
|
|
@ -432,7 +433,6 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//单体化
|
|
|
|
//单体化
|
|
|
|
addDTH() {
|
|
|
|
addDTH() {
|
|
|
|
let geoJsonLayerDTH = new mars3d.layer.GeoJsonLayer({
|
|
|
|
let geoJsonLayerDTH = new mars3d.layer.GeoJsonLayer({
|
|
|
@ -456,6 +456,40 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.map.addLayer(geoJsonLayerDTH);
|
|
|
|
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>
|
|
|
|
</script>
|
|
|
|