Browse Source

调整影像地图,注释火星坐标转换

lkk 8 months ago
parent
commit
1bb6609999

+ 10 - 6
src/views/remote/MapView.vue

@@ -16,6 +16,7 @@ import parse from "wellknown";
 import Map from "ol/Map";
 import View from "ol/View";
 import TileLayer from "ol/layer/Tile";
+import TileWMS from "ol/source/TileWMS";
 import VectorSource from "ol/source/Vector";
 import VectorLayer from "ol/layer/Vector";
 import Feature from "ol/Feature";
@@ -34,6 +35,7 @@ import ImageLayer from "ol/layer/Image";
 import ImageStatic from "ol/source/ImageStatic";
 import Draw from "ol/interaction/Draw";
 import GeoJSON from "ol/format/GeoJSON";
+import { WMTS } from "ol/source";
 export default {
   props: {
     maptype: {
@@ -62,10 +64,6 @@ export default {
         zoom: 4,
         minZoom: 1,
       });
-      // window.map = this.map;
-      // window.view = this.map.view;
-      console.log(this.$props.maptype, "----");
-      // if (this.$props.maptype == "normal") {
       this.addMap("mapDiv", view);
       // } else {
       this.addMap("mapCon1", view);
@@ -76,9 +74,15 @@ export default {
       if (this.maps[target]) return;
       var gaodeMapLayer = new TileLayer({
         title: "高德地图",
+        // source: new XYZ({
+        //   url: "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}",
+        //   wrapX: false,
+        // }),
         source: new XYZ({
-          url: "http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}",
-          wrapX: false,
+          url: `https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}?token=${this.arcgisKey}`,
+          // url: `https://wayback.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/WMTS/1.0.0/default028mm/MapServer/tile/4905/{z}/{y}/{x}`,
+          crossOrigin: "anonymous",
+          // attributions: ["ArcGIS", new Date().getFullYear()],
         }),
       });
       let map = new Map({

+ 2 - 1
src/views/remote/farmland/index.vue

@@ -187,7 +187,8 @@ export default {
       this.tableData.forEach((titem, i) => {
         if (titem.geom && titem.geom != "") {
           if (typeof titem.geom === "string") {
-            let geom = transform(this.tableData[i].geom);
+            // let geom = transform(this.tableData[i].geom);
+            let geom = this.tableData[i].geom;
             titem.geom = parse(geom);
           }
           let features = new GeoJSON().readFeatures(titem.geom);

+ 2 - 2
src/views/remote/satellite/index.vue

@@ -60,7 +60,7 @@
       </el-form-item>
     </el-form>
 
-    <el-row :gutter="10" class="mb8">
+    <!-- <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -111,7 +111,7 @@
         :showSearch.sync="showSearch"
         @queryTable="getList"
       ></right-toolbar>
-    </el-row>
+    </el-row> -->
 
     <el-table
       v-loading="loading"