Browse Source

新增危险品码头图层

sbj 1 year ago
parent
commit
2e04175966
2 changed files with 19 additions and 0 deletions
  1. 13 0
      src/utils/map/Layer.js
  2. 6 0
      src/views/map/Index.vue

+ 13 - 0
src/utils/map/Layer.js

@@ -459,5 +459,18 @@ export function addLayerByName(name,isShow,opacity){
                 is_goto: false
             })
             break
+        // 危险品码头
+        case 'wxpmt':
+            addLayer({
+                id: 'dangerPortLayer',
+                title: 'dangerPortLayer',
+                type: 'scene',
+                url: 'https://geoscene.geosceneonline.cn/server/rest/services/Hosted/危险品码头/SceneServer',
+                visible: isShow,
+                opacity: opacity?opacity:1,
+                token: '',
+                is_goto: true
+            })
+            break
     }
 }

+ 6 - 0
src/views/map/Index.vue

@@ -31,6 +31,7 @@
             <button @click="test('疏浚前')">疏浚前</button>
             <button @click="test('疏浚后')">疏浚后</button>
             <button @click="test('白膜')">白膜</button>
+            <button @click="test('危险品码头')">危险品码头</button>
             <button @click="test('关闭全部图层')">关闭全部图层</button>
             <button @click="test('基础地图')">基础地图</button>
             <button @click="test('遥感地图')">遥感地图</button>
@@ -74,6 +75,7 @@
                 isShowSsfwqLayer:false,
                 isShowHbLayer:false,
                 isShowHdLayer:false,
+                isShowDangerPortLayer:false,
                 isShowDbsLayer:false,
                 isShowYjyjLayer:false,
                 isShowBmLayer:false,
@@ -180,6 +182,10 @@
                         this.isShowHdLayer = !this.isShowHdLayer
                         addLayerByName('hd',this.isShowHdLayer)
                         break
+                    case '危险品码头':
+                        this.isShowDangerPortLayer = !this.isShowDangerPortLayer
+                        addLayerByName('wxpmt',this.isShowDangerPortLayer)
+                        break
                     case '水下地形':
                         this.isShowDbsLayer = !this.isShowDbsLayer
                         addLayerByName('sxdx',this.isShowDbsLayer)