From ec4d5c1827487f4c901b69bd9eae58e111e82b32 Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期四, 20 五月 2021 18:05:25 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 src/views/Temp.vue |   57 ++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 38 insertions(+), 19 deletions(-)

diff --git a/src/views/Temp.vue b/src/views/Temp.vue
index 130740e..e4ac9e0 100644
--- a/src/views/Temp.vue
+++ b/src/views/Temp.vue
@@ -15,7 +15,7 @@
     <!--    <el-button type="primary" @click="ChangeState" class="solid-waste">鍥哄簾</el-button>-->
     <!--    <el-button type="primary" @click="ChangeWaterState" class="Waste-water">搴熸按</el-button>-->
     <!--    <el-button type="primary" @click="AddGasHelper" class="flue-gas">搴熸皵</el-button>-->
-    <PublicBounced ref="PublicBounced"></PublicBounced>
+<!--    <PublicBounced ref="PublicBounced"></PublicBounced>-->
   </div>
 </template>
 
@@ -33,8 +33,11 @@
 import LegendPanel from '@components/panel/LegendPanel'
 import Enterprise from '../components/table/enterprise'
 // // 鍏叡灞曠ず鏁版嵁
-import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced'
+// import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced'
 import LayerFactory from '@components/LayerController/service/LayerFactory'
+// import '../components/plugin/Leaflet.TileLayer.ProjWMTS'
+// import * as L from 'leaflet'
+// import * as L from 'leaflet'
 const esri = require('esri-leaflet')
 // const proj4 = require('proj4')
 const proj4 = require('proj4')
@@ -51,8 +54,8 @@
     SgisLayerController,
     MonitorPanel,
     Popup,
-    summarySheets,
-    PublicBounced
+    summarySheets
+    // PublicBounced
   },
   data () {
     return {
@@ -88,7 +91,7 @@
       const mapcontainer = this.$refs.rootmap
       const CRS_4490 = new Proj.CRS('EPSG:4490', '+proj=longlat +ellps=GRS80 +no_defs', {
         resolutions: [
-          1.40625,
+          // 1.40625,
           0.703125,
           0.3515625,
           0.17578125,
@@ -110,12 +113,30 @@
           2.682209064925356E-6,
           1.3411045324626732E-6
         ],
-        origin: [-180, 90]
+        origin: [-180, 90],
+        // origin: [-400.0, 399.9999999999998],//arcgis 鍧愭爣婧愮偣
+        bounds: this.L.bounds([-180, -90], [180, 90]) // 澶╁湴鍥�
+
       })
       console.log(mapcontainer)
       console.log(CRS_4490)
-      debugger
-      this.map = Sgis.initMap(mapcontainer)
+      const options = {
+        crs: CRS_4490,
+        // crs: this.L.CRS.EPSG4326,
+        minZoom: 3,
+        maxZoom: 21,
+        // center: [26, 104],
+        center: [32.23012597374691, 118.78516085275147],
+        // center: [29.454345703125, 113.40362548828125],
+        zoom: 3,
+        worldCopyJump: false,
+        inertia: true,
+        zoomControl: false,
+        attributionControl: false,
+        editable: true,
+        preferCanvas: true
+      }
+      this.map = Sgis.initMap(mapcontainer, options)
       this.$refs.toolBox.map = this.map
 
       window.popupComp = this.$refs.popup
@@ -127,7 +148,7 @@
       window.layerFactory = layerFactory
 
       this.basemapHelper = Sgis.initBasemapsHelper(this.map) // 鍒濆鍖栧熀纭�搴曞浘鍔╂墜
-      this.basemapHelper.initBasemap(this.config, false) // 绗簩涓弬鏁帮紝琛ㄧず鏄惁鍐呯綉搴曞浘
+      this.basemapHelper.initBasemap(this.config, true) // 绗簩涓弬鏁帮紝琛ㄧず鏄惁鍐呯綉搴曞浘
       // this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.map) // 鍒濆鍖栧姩鎬佽绱犲浘灞傚姪鎵�
       // this.vectorLayerHelper.initVectorLayers(this.config)
 
@@ -143,10 +164,15 @@
     },
     loadArcgisImg () {
       // const url = 'http://10.246.132.249:8080/OneMapServer/rest/services/base-map-image-enterprise/MapServer/tile/{z}/{y}/{x}'
-      const url = 'http://10.246.132.249:8080/OneMapServer/rest/services/base-map-image-enterprise/MapServer'
+      // const url = 'http://10.246.132.249:8080/OneMapServer/rest/services/base-map-image-enterprise/MapServer'
+      const url = 'http://10.246.132.249:8080/OneMapServer/rest/services/base-map-image-sinopec/MapServer'
       // const arcgisTileLayer = this.L.tileLayer(url, {
-      const arcgisTileLayer = esri.tiledMapLayer({ url: url })
-      // const arcgisTileLayer = esri.dynamicMapLayer({ url: url })
+      const arcgisTileLayer = esri.tiledMapLayer({
+        url: url,
+        token: window.tdtToken,
+        zoomOffsetAllowance: 0.5
+      })
+      // const arcgisTileLayer = esri.dynamicMapLayer({ url: url, useCors: true })
       arcgisTileLayer.addTo(this.map)
     },
     onLayerClick () {
@@ -171,13 +197,6 @@
   position: absolute;
   top: 88px;
   left: 88px;
-  z-index: 999;
-}
-
-.Waste-water {
-  position: absolute;
-  top: 88px;
-  left: 280px;
   z-index: 999;
 }
 

--
Gitblit v1.8.0