|
@@ -68,6 +68,7 @@
|
|
mapData: null,
|
|
mapData: null,
|
|
mapName: null
|
|
mapName: null
|
|
},
|
|
},
|
|
|
|
+ showLayer:null,
|
|
clickTime: new Date().getTime(),
|
|
clickTime: new Date().getTime(),
|
|
cacheData: {
|
|
cacheData: {
|
|
ProvinceRoad: "",
|
|
ProvinceRoad: "",
|
|
@@ -205,8 +206,12 @@
|
|
watch: {},
|
|
watch: {},
|
|
created() {
|
|
created() {
|
|
},
|
|
},
|
|
- mounted() {},
|
|
|
|
- props: {},
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ this.showLayer = this.showLayer != undefined ? this.showLayer:false;
|
|
|
|
+ },
|
|
|
|
+ props: {
|
|
|
|
+ showLayer: [Boolean],
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
//初始化地图数据
|
|
//初始化地图数据
|
|
removeAllviewer(num, index) {
|
|
removeAllviewer(num, index) {
|
|
@@ -679,15 +684,29 @@
|
|
//开始加载专题图等数据,8秒后开始执行
|
|
//开始加载专题图等数据,8秒后开始执行
|
|
setTimeout(function() {
|
|
setTimeout(function() {
|
|
//3.水系
|
|
//3.水系
|
|
- let shuixi = that.superMapRootUrl + withinData[2];
|
|
|
|
- that.mvtMap0 = that.scene.addVectorTilesMap({
|
|
|
|
- url: shuixi,
|
|
|
|
- canvasWidth: 512,
|
|
|
|
- name: 'mvt_map0',
|
|
|
|
- viewer: that.viewer
|
|
|
|
- });
|
|
|
|
- that.mvtMap0.selectedColor = new Cesium.Color(6, 169, 254, 0.5);
|
|
|
|
- that.mvtMap0.show = false;
|
|
|
|
|
|
+ if(that.showLayer){
|
|
|
|
+ let shuixi = that.superMapRootUrl + withinData[2];
|
|
|
|
+ that.mvtMap0 = that.scene.addVectorTilesMap({
|
|
|
|
+ url: shuixi,
|
|
|
|
+ canvasWidth: 512,
|
|
|
|
+ name: 'mvt_map0',
|
|
|
|
+ viewer: that.viewer
|
|
|
|
+ });
|
|
|
|
+ that.mvtMap0.selectedColor = new Cesium.Color(6, 169, 254, 0.5);
|
|
|
|
+ that.mvtMap0.show = false;
|
|
|
|
+ // 8.添加水系NAME
|
|
|
|
+ let shuixi_name_url = that.superMapRootUrl + withinData[10];
|
|
|
|
+ that.shuixi_name = that.scene.open(shuixi_name_url);
|
|
|
|
+ that.cacheData.ShuiXi = withinData[11]
|
|
|
|
+ that.shuixi_name.then(function (layers) {
|
|
|
|
+ let textlayer = that.scene.layers.find(withinData[11]);//文字图层
|
|
|
|
+ //加载后隐藏
|
|
|
|
+ textlayer.visible = false;
|
|
|
|
+ //关闭避让
|
|
|
|
+ textlayer.isOverlapDisplayed = true;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
// //4.林地
|
|
// //4.林地
|
|
// let lindi = that.superMapRootUrl+"/map-mvt-lindi/restjsr/v1/vectortile/maps/lindi";
|
|
// let lindi = that.superMapRootUrl+"/map-mvt-lindi/restjsr/v1/vectortile/maps/lindi";
|
|
@@ -725,17 +744,7 @@
|
|
// let road_name_url = that.superMapRootUrl+'/3D-road_Name_S/rest/realspace';
|
|
// let road_name_url = that.superMapRootUrl+'/3D-road_Name_S/rest/realspace';
|
|
// that.road_name = that.scene.open(road_name_url);
|
|
// that.road_name = that.scene.open(road_name_url);
|
|
//
|
|
//
|
|
- // 8.添加水系NAME
|
|
|
|
- let shuixi_name_url = that.superMapRootUrl + withinData[10];
|
|
|
|
- that.shuixi_name = that.scene.open(shuixi_name_url);
|
|
|
|
- that.cacheData.ShuiXi = withinData[11]
|
|
|
|
- that.shuixi_name.then(function (layers) {
|
|
|
|
- let textlayer = that.scene.layers.find(withinData[11]);//文字图层
|
|
|
|
- //加载后隐藏
|
|
|
|
- textlayer.visible = false;
|
|
|
|
- //关闭避让
|
|
|
|
- textlayer.isOverlapDisplayed = true;
|
|
|
|
- });
|
|
|
|
|
|
+
|
|
|
|
|
|
//9.添加县界和乡镇界
|
|
//9.添加县界和乡镇界
|
|
let layer_xianjie = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
|
|
let layer_xianjie = that.viewer.imageryLayers.addImageryProvider(new Cesium.SuperMapImageryProvider({
|