|
@@ -65,14 +65,19 @@
|
|
|
mapData: null,
|
|
|
mapName: null
|
|
|
},
|
|
|
+ showLayer:null
|
|
|
}
|
|
|
},
|
|
|
watch: {},
|
|
|
created() {
|
|
|
this.superMapInfo();
|
|
|
},
|
|
|
- mounted() {},
|
|
|
- props: {},
|
|
|
+ mounted() {
|
|
|
+ this.showLayer = this.showLayer != undefined ? this.showLayer:false;
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ showLayer: [Boolean],
|
|
|
+ },
|
|
|
methods: {
|
|
|
choseMeasuringAreaAll() {
|
|
|
if (this.handlerDis != null) {
|
|
@@ -292,15 +297,17 @@
|
|
|
// });
|
|
|
//
|
|
|
//5.农田
|
|
|
- let nongtian = that.superMapRootUrl + "/map-mvt-nongtian/restjsr/v1/vectortile/maps/nongtian";
|
|
|
- that.mvtMap2 = that.scene.addVectorTilesMap({
|
|
|
- url: nongtian,
|
|
|
- canvasWidth: 512,
|
|
|
- name: 'mvt_map2',
|
|
|
- viewer: that.viewer,
|
|
|
- selectedColor: new Cesium.Color(250, 236, 246, 1.0),
|
|
|
- show: true,
|
|
|
- });
|
|
|
+ if(that.showLayer){
|
|
|
+ let nongtian = that.superMapRootUrl + "/map-mvt-nongtian/restjsr/v1/vectortile/maps/nongtian";
|
|
|
+ that.mvtMap2 = that.scene.addVectorTilesMap({
|
|
|
+ url: nongtian,
|
|
|
+ canvasWidth: 512,
|
|
|
+ name: 'mvt_map2',
|
|
|
+ viewer: that.viewer,
|
|
|
+ selectedColor: new Cesium.Color(250, 236, 246, 1.0),
|
|
|
+ show: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
//
|
|
|
// //6.路网
|
|
|
// let road = that.superMapRootUrl+"/map-mvt-roadXian/restjsr/v1/vectortile/maps/road_Xian";
|
|
@@ -328,15 +335,15 @@
|
|
|
//10.添加区县乡镇村名称
|
|
|
let layer_xiangzhenjie_name = that.superMapRootUrl + '/3D-Name_he/rest/realspace';
|
|
|
that.scene.open(layer_xiangzhenjie_name);
|
|
|
- that.road_name.then(function(layers) {
|
|
|
- let xianJie_textLayer = that.scene.layers.find('XianJie@SiPing#1'); //区县文字图层
|
|
|
- let xiangZhenJie_textLayer = that.scene.layers.find('XiangZhenJie@SiPing#2'); //乡镇文字图层
|
|
|
- let cun_textLayer = that.scene.layers.find('Cun@SiPing#1'); //村文字图层
|
|
|
- //关闭避让
|
|
|
- xianJie_textLayer.isOverlapDisplayed = true;
|
|
|
- xiangZhenJie_textLayer.isOverlapDisplayed = true;
|
|
|
- cun_textLayer.isOverlapDisplayed = true;
|
|
|
- });
|
|
|
+ // that.road_name.then(function(layers) {
|
|
|
+ // let xianJie_textLayer = that.scene.layers.find('XianJie@SiPing#1'); //区县文字图层
|
|
|
+ // let xiangZhenJie_textLayer = that.scene.layers.find('XiangZhenJie@SiPing#2'); //乡镇文字图层
|
|
|
+ // let cun_textLayer = that.scene.layers.find('Cun@SiPing#1'); //村文字图层
|
|
|
+ // //关闭避让
|
|
|
+ // xianJie_textLayer.isOverlapDisplayed = true;
|
|
|
+ // xiangZhenJie_textLayer.isOverlapDisplayed = true;
|
|
|
+ // cun_textLayer.isOverlapDisplayed = true;
|
|
|
+ // });
|
|
|
|
|
|
}, 3000);
|
|
|
|