liuhj vor 5 Monaten
Ursprung
Commit
0394644fe4
1 geänderte Dateien mit 7 neuen und 5 gelöschten Zeilen
  1. 7 5
      src/components/statistics/Statistically.vue

+ 7 - 5
src/components/statistics/Statistically.vue

@@ -626,11 +626,13 @@ export default {
                 done(token);
                 }
             });
-            var map = new mapkit.Map('map', { center: new mapkit.Coordinate(104.096488, 30.635261) });
-            // var center = new mapkit.Coordinate(0, 0); // 经度为0,纬度为0的坐标,即赤道和本初子午线的交点
-            var zoom = 2; // 适当的缩放级别以显示整个世界
-            // map.setCenterCoordinate(center);
-            map.setZoomLevel(zoom);
+            // var map = new mapkit.Map('map', { center: new mapkit.Coordinate(104.096488, 30.635261) });
+            const coordinate = new mapkit.Coordinate(104.096488, 30.635261)
+            const span = new mapkit.CoordinateSpan(5, 5)  // 1degree=111km
+            const region = new mapkit.CoordinateRegion(coordinate, span)
+            const map = new mapkit.Map("map", {center: coordinate, country: region})
+
+            
         },
         //团组酒店
         grouphotel(){