Pārlūkot izejas kodu

Merge branch 'develop/3.1.5' into test

DESKTOP-SVI9JE1\muzen 1 gadu atpakaļ
vecāks
revīzija
28fbac2691
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4 4
      src/pages/map/index.vue

+ 4 - 4
src/pages/map/index.vue

@@ -244,11 +244,10 @@ export default {
       })
       const marker = new AMap.Marker({
         position: new AMap.LngLat(lng, lat),
-        offset: new AMap.Pixel(-5, -25),
-        icon: icon,
-        zoom: 16
+        offset: new AMap.Pixel(-20, -25),
+        icon: icon
       })
-      marker.setMap(this.map)
+      this.map.add(marker)
     },
 
     // 打开地图
@@ -342,6 +341,7 @@ export default {
     // 切换店铺
     changeActive(item, index) {
       this.active = index
+      this.map.setZoom(16)
       this.map.setCenter([item.longitude, item.latitude])
     },