فهرست منبع

3857坐标转换定位

maxiaoxiao 9 ماه پیش
والد
کامیت
4bab0b3611
1فایلهای تغییر یافته به همراه2 افزوده شده و 12 حذف شده
  1. 2 12
      src/components/Query/clickQuery/clickQuery.vue

+ 2 - 12
src/components/Query/clickQuery/clickQuery.vue

@@ -650,27 +650,17 @@ export default {
               let urlNew = obj.url + ".json";
               let resNew = await axios.get(urlNew);
               let serCode = resNew.data.prjCoordSys.epsgCode;
-              // if (serCode == 3857) {
-              //   let c = that.cartesianToCartographic84(
-              //     e.features[u].geometry.points[0].x,
-              //     e.features[u].geometry.points[0].y
-              //   );
-              // }
               let points = [];
               for (let y = 0; y < e.features[u].geometry.points.length; y++) {
                 let c  = {}
                 if (serCode == 3857) {
                   c = that.cartesianToCartographic84(
-                    e.features[u].geometry.points[0].x,
-                    e.features[u].geometry.points[0].y
+                    e.features[u].geometry.points[y].x,
+                    e.features[u].geometry.points[y].y
                   );
                 } else {
                    c = e.features[u].geometry.points[y];
                 }
-                // let c = that.cartesianToCartographic84(
-                //   e.features[u].geometry.points[y].x,
-                //   e.features[u].geometry.points[y].y
-                // );
                 points.push([c.x, c.y]);
               }
               parts.push(e.features[u].geometry.parts);