Browse Source

航道维护水深图层加载和定位

sbj 1 year ago
parent
commit
51b4846b48
2 changed files with 9 additions and 4 deletions
  1. 3 3
      src/utils/map/Channel.js
  2. 6 1
      src/views/map/Index.vue

+ 3 - 3
src/utils/map/Channel.js

@@ -70,8 +70,8 @@ export function compareSjBeforeAfter(value,isShow) {
  */
 export function showWhss(isShow){
     addLayer({
-        id: 'portLayer',
-        title: 'portLayer',
+        id: 'warterDeepsAreaLayer',
+        title: 'warterDeepsAreaLayer',
         type: 'feature',
         url: 'http://10.83.68.109:6080/arcgis/rest/services/digitalTwain_3857/MapServer/8',
         visible: isShow,
@@ -85,7 +85,7 @@ export function locationOneWhss(code,isShow){
     if(isShow){
         layerQuery({
             title: "digitalTwain",
-            layerId: "1",
+            layerId: "8",
             where: "控制点区域='" + code + "'",
             symbol: null,
             is_draw: true,

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

@@ -42,6 +42,7 @@
             <button @click="test('轨迹回放')">轨迹回放</button>
             <button @click="test('结束回放')">结束回放</button>
             <button @click="test('维护水深面')">维护水深面</button>
+            <button @click="test('维护水深面-定位')">维护水深面-定位</button>
         </div>
     </div>
 </template>
@@ -53,7 +54,7 @@
     import {setBoat, setBoatPath, onLocationBoat, locationBoat, boatDriving, drawArea, setMultiBoatHistory, playAreaBoatHistory,djldBoatHistory} from '@/utils/map/Boat'
     import {setCenter, setVideoCamera} from '@/utils/map/Common'
     import {addDefaultServer,addLayerByName,closeAllLayer} from '@/utils/map/Layer'
-    import {compareSjBeforeAfter,showWhss} from '@/utils/map/Channel'
+    import {compareSjBeforeAfter, locationOneWhss, showWhss} from '@/utils/map/Channel'
 
     export default {
         name: "MapHome",
@@ -241,6 +242,10 @@
                         this.isWhss = !this.isWhss
                         showWhss(this.isWhss);
                         break
+                    case '维护水深面-定位':
+                        this.isWhss = !this.isWhss
+                        locationOneWhss('H44-H71',this.isWhss);
+                        break
                     default:
                 }
             },