Commit dab79b0f by zhangxw

找车浮窗 向下偏移

1 parent 7dbf6156
......@@ -460,6 +460,7 @@ export default defineComponent({
marker.setPosition(newLnglat);
infoWindow.setPosition(newLnglat);
map.setCenter(newLnglat);
map.panBy(0, 50);
};
//信息窗体内容更新
let GPSBtn = infoDiv.querySelector("[data-GPS]");
......@@ -504,6 +505,7 @@ export default defineComponent({
item.locationType = "gpsLocation";
setAddress();
move(newLnglat);
console.log(newLnglat);
} else {
Toast("暂无GPS定位信息");
}
......@@ -523,6 +525,7 @@ export default defineComponent({
gprsObj.elng,
gprsObj.elat
);
console.log(newLnglat);
setAddress();
move(newLnglat);
} else {
......@@ -636,6 +639,7 @@ export default defineComponent({
//点击车辆打开信息窗体
marker.on("click", () => {
map.setCenter(infoWindow.getPosition());
map.panBy(0, 50);
if (infoWindow.getIsOpen()) {
infoWindow.close();
} else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!