Draw / fix map object in addToDrawing method

This commit is contained in:
Olivier Guyot
2020-02-10 16:55:35 +01:00
parent 8722d16158
commit 3c5d0f223e
+1 -1
View File
@@ -769,7 +769,7 @@ class Draw extends PointerInteraction {
*/ */
addToDrawing_(coordinate) { addToDrawing_(coordinate) {
const geometry = this.sketchFeature_.getGeometry(); const geometry = this.sketchFeature_.getGeometry();
const projection = event.map.getView().getProjection(); const projection = this.getMap().getView().getProjection();
let done; let done;
let coordinates; let coordinates;
if (this.mode_ === Mode.LINE_STRING) { if (this.mode_ === Mode.LINE_STRING) {