cd-mapgis 1.0.27 → 1.0.28
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
|
@@ -86,6 +86,7 @@ export default class MapDrawUtil {
|
|
|
86
86
|
tool(toolType) {
|
|
87
87
|
let _sketch = null;
|
|
88
88
|
let _listener = null;
|
|
89
|
+
let _this = this;
|
|
89
90
|
//绘制开始事件
|
|
90
91
|
this.drawObj.on('drawstart', (e) => {
|
|
91
92
|
_sketch = e.feature;
|
|
@@ -93,11 +94,11 @@ export default class MapDrawUtil {
|
|
|
93
94
|
let geom = evt.target;
|
|
94
95
|
var viewTxt;
|
|
95
96
|
if (toolType == "len") {
|
|
96
|
-
viewTxt =
|
|
97
|
+
viewTxt = _this._formatLength(geom.clone());
|
|
97
98
|
} else if (toolType == "area") {
|
|
98
|
-
viewTxt =
|
|
99
|
+
viewTxt = _this._formatArea(geom.clone());
|
|
99
100
|
}
|
|
100
|
-
|
|
101
|
+
_this._viewToolText(viewTxt, geom.getLastCoordinate());
|
|
101
102
|
});
|
|
102
103
|
});
|
|
103
104
|
//绘制完成事件
|