cd-mapgis 1.0.28 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/MapDrawUtil.js +4 -3
package/package.json
CHANGED
package/src/MapDrawUtil.js
CHANGED
|
@@ -42,14 +42,15 @@ export default class MapDrawUtil {
|
|
|
42
42
|
}
|
|
43
43
|
//绘制完成事件
|
|
44
44
|
drawend(fun, stop) {
|
|
45
|
+
let _this = this;
|
|
45
46
|
this.drawObj.on('drawend', (e) => {
|
|
46
|
-
|
|
47
|
+
_this._drawTempLayer(e.feature);
|
|
47
48
|
try {
|
|
48
49
|
fun(e.feature.getGeometry().getCoordinates());//绘制完成后,将绘制的坐标串传入回调函数
|
|
49
50
|
} catch (ex) {
|
|
50
51
|
console.error(ex);
|
|
51
52
|
}
|
|
52
|
-
if (stop)
|
|
53
|
+
if (stop) _this._closeDrawObj();
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
//关闭工具
|
|
@@ -103,7 +104,7 @@ export default class MapDrawUtil {
|
|
|
103
104
|
});
|
|
104
105
|
//绘制完成事件
|
|
105
106
|
this.drawObj.on('drawend', function (e) {
|
|
106
|
-
|
|
107
|
+
_this._drawTempLayer(e.feature);
|
|
107
108
|
_sketch = null;
|
|
108
109
|
unByKey(_listener);
|
|
109
110
|
});
|