소스 검색

Merge branch 'develop/3.1.5' into test

DESKTOP-SVI9JE1\muzen 1 년 전
부모
커밋
28fbac2691
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  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])
     },