Pārlūkot izejas kodu

更新 定位偏移量

wzh 3 gadi atpakaļ
vecāks
revīzija
68cb80c8aa
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/views/index/Index.vue

+ 2 - 2
src/views/index/Index.vue

@@ -325,14 +325,14 @@ function drawMarkers() {
       let marker = new AMap.Marker({
         content,
         position: new AMap.LngLat(i.longitude, i.latitude),
-        offset: new AMap.Pixel(-75, 30),
+        offset: new AMap.Pixel(-80, -20),
       });
       let infoWindowContent = `<div class='window-title pointer' style='font-size:12px'>${i.shipName}</div>
       <div style='font-size:12px;margin-top:5px'>查看详情</div>
       `;
       let infoWindow = new AMap.InfoWindow({
         position: new AMap.LngLat(i.longitude, i.latitude),
-        offset: new AMap.Pixel(5, 35),
+        offset: new AMap.Pixel(0, -10),
         content: infoWindowContent,
       });