Commit 94125b79 by 张杰

增加搜索点右键设置圆心功能

1 parent 78f8633c
......@@ -163,12 +163,13 @@ export default {
self.autoCenterMarker.on("rightclick", (e) => {
if (self.mapObj.getAllOverlays("circle").length) {
window.mapMenu.contextMenu.open(self.mapObj, e.lnglat);
self.contextMenu.open(self.mapObj, e.lnglat);
self.contextMenuPositon = e.lnglat; //右键菜单位置
}
});
AMap.event.addListener(self.auto, "select", (e) => {
console.log(e.poi)
if (e.poi && e.poi.location) {
self.mapObj.setCenter(e.poi.location);
self.autoCenterMarker.setPosition(e.poi.location);
......@@ -198,7 +199,7 @@ export default {
contextMenu.open(self.mapObj, e.lnglat);
self.contextMenuPositon = e.lnglat;
});
self.contextMenu = contextMenu
//contextMenu.open(self.mapObj, lnglat);
},
drawFence() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!