Commit 998b0682 authored by 纪泽龙's avatar 纪泽龙

优化

parent db351864
...@@ -1058,11 +1058,9 @@ class gaodeMap { ...@@ -1058,11 +1058,9 @@ class gaodeMap {
e.obj.on("mouseover", function() { e.obj.on("mouseover", function() {
that.mouseTool.close(); that.mouseTool.close();
}); });
e.obj.on("mouseout", function() { e.obj.on("mouseout", function() {
that.draw(that.deviceType); that.draw(that.deviceType);
}); });
that.markerOverlays.push(e.obj); that.markerOverlays.push(e.obj);
} }
...@@ -1071,7 +1069,6 @@ class gaodeMap { ...@@ -1071,7 +1069,6 @@ class gaodeMap {
// that.mouseTool.overlays.polyLine = []; // that.mouseTool.overlays.polyLine = [];
// 清空当前算距离用的内部数组 // 清空当前算距离用的内部数组
that.mouseTool.overlays.polyline = []; that.mouseTool.overlays.polyline = [];
that.newLineAddEvent(e.obj); that.newLineAddEvent(e.obj);
// 测距结束 // 测距结束
that.ruler.turnOff(true); that.ruler.turnOff(true);
...@@ -1082,7 +1079,6 @@ class gaodeMap { ...@@ -1082,7 +1079,6 @@ class gaodeMap {
e.obj.on("mouseout", () => { e.obj.on("mouseout", () => {
e.obj.setOptions({ strokeColor: "#80d8ff" }); e.obj.setOptions({ strokeColor: "#80d8ff" });
}); });
// 记录这条线 // 记录这条线
// console.log(e.obj.getPath().length) // console.log(e.obj.getPath().length)
// 如果只有一个点,并没有连成线的时候就不close 大于一个点的时候才执行clse // 如果只有一个点,并没有连成线的时候就不close 大于一个点的时候才执行clse
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment