liuhj 5 months ago
parent
commit
23c82ea7c0
1 changed files with 13 additions and 3 deletions
  1. 13 3
      src/components/statistics/Statistically.vue

+ 13 - 3
src/components/statistics/Statistically.vue

@@ -633,11 +633,21 @@ export default {
             //     countryCode: "CN",
             //     isZoomEnabled:true,
             // })
-            const map = new mapkit.Map(document.getElementById('map'), {
+            let map = new mapkit.Map("map", {
                 center: new mapkit.Coordinate(104.096488, 30.635261),
-                zoom: 11
+                showsMapTypeControl: true,
+                showsZoomControl: true,
+                showsUserLocation: true,
+                zoomEnabled: true,
+                region: new mapkit.CoordinateRegion(
+                    new mapkit.Coordinate(104.096488, 30.635261),
+                    new mapkit.CoordinateSpan(0.01, 0.01)
+                )
             });
-
+            let overlay = new mapkit.MapOverlay(map.region, {
+                urlTemplate: "https://example.com/overlay/{x}/{y}/{z}.png"
+            });
+            map.addOverlay(overlay);
             
         },
         //团组酒店