@eox/drawtools 1.1.0 → 1.1.2
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/dist/eox-drawtools.js +335 -309
- package/dist/eox-drawtools.umd.cjs +19 -19
- package/package.json +2 -2
- package/src/helpers/generate-upload-events.js +11 -5
- package/src/main.js +15 -7
- package/src/methods/draw/create-select-handler.js +2 -2
- package/src/methods/draw/discard-drawing.js +1 -1
- package/src/methods/draw/init-layer.js +32 -5
- package/src/methods/draw/init-selection.js +3 -3
- package/src/methods/draw/on-draw-end.js +1 -1
- package/src/methods/draw/start-drawing.js +2 -2
- package/types/drawtools/src/helpers/generate-upload-events.d.ts +4 -2
- package/types/drawtools/src/helpers/generate-upload-events.d.ts.map +1 -1
- package/types/drawtools/src/main.d.ts +5 -2
- package/types/drawtools/src/main.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/init-layer.d.ts +1 -1
- package/types/drawtools/src/methods/draw/init-layer.d.ts.map +1 -1
- package/types/map/src/helpers/add-new-feature.d.ts.map +1 -1
- package/types/map/src/helpers/parse-feature.d.ts.map +1 -1
- package/types/map/src/helpers/parse-text.d.ts +1 -2
- package/types/map/src/helpers/parse-text.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eox/drawtools",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@eox/map": "*",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"watch": "vite build --watch"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@eox/elements-utils": "^1.
|
|
37
|
+
"@eox/elements-utils": "^1.1.0",
|
|
38
38
|
"@eox/ui": "^0.3.6",
|
|
39
39
|
"lit": "^3.2.0",
|
|
40
40
|
"ol": "^10.4.0"
|
|
@@ -49,18 +49,24 @@ function preventDefaults(e) {
|
|
|
49
49
|
* Handles file input from drag-and-drop or file selection events,
|
|
50
50
|
* forwarding each file to a specified processing function.
|
|
51
51
|
*
|
|
52
|
-
* @param {DragEvent} e - The event object from the file input interaction.
|
|
52
|
+
* @param {DragEvent | InputEvent & { target: HTMLInputElement }} e - The event object from the file input interaction.
|
|
53
53
|
* @param {import("../main.js").EOxDrawTools} EOxDrawTool - The drawing tool instance.
|
|
54
54
|
*/
|
|
55
55
|
export function handleFiles(e, EOxDrawTool) {
|
|
56
56
|
preventDefaults(e);
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
let files;
|
|
59
|
+
if ("dataTransfer" in e && e.dataTransfer) files = e.dataTransfer.files;
|
|
60
|
+
else if (e.target && "files" in e.target)
|
|
61
|
+
files = /**@type {HTMLInputElement}*/ (e.target).files;
|
|
62
|
+
else files = [];
|
|
62
63
|
|
|
63
64
|
Array.from(files).forEach((file) => importFile(file, EOxDrawTool));
|
|
65
|
+
|
|
66
|
+
// Only try to clear the value if the target is an HTMLInputElement
|
|
67
|
+
if (e.target && "value" in e.target) {
|
|
68
|
+
e.target.value = "";
|
|
69
|
+
}
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
/**
|
package/src/main.js
CHANGED
|
@@ -253,16 +253,12 @@ export class EOxDrawTools extends LitElement {
|
|
|
253
253
|
this.drawLayer,
|
|
254
254
|
this.eoxMap,
|
|
255
255
|
replaceFeatures,
|
|
256
|
-
{
|
|
257
|
-
dataProjection: this.eoxMap.projection,
|
|
258
|
-
featureProjection: this.projection,
|
|
259
|
-
},
|
|
260
256
|
animate,
|
|
261
257
|
);
|
|
262
258
|
}
|
|
263
259
|
|
|
264
260
|
/**
|
|
265
|
-
* @param {DragEvent} evt - The event object from the file input interaction.
|
|
261
|
+
* @param {DragEvent | InputEvent & { target: HTMLInputElement }} evt - The event object from the file input interaction.
|
|
266
262
|
*/
|
|
267
263
|
handleFilesChange(evt) {
|
|
268
264
|
handleFiles(evt, this);
|
|
@@ -317,7 +313,11 @@ export class EOxDrawTools extends LitElement {
|
|
|
317
313
|
* It then calls requestUpdate to trigger a re-render.
|
|
318
314
|
*/
|
|
319
315
|
firstUpdated() {
|
|
320
|
-
const { EoxMap, OlMap } = initLayerMethod(
|
|
316
|
+
const { EoxMap, OlMap, reset } = initLayerMethod(
|
|
317
|
+
this,
|
|
318
|
+
this.multipleFeatures,
|
|
319
|
+
);
|
|
320
|
+
this.resetLayer = reset;
|
|
321
321
|
this.eoxMap = EoxMap;
|
|
322
322
|
this.#olMap = OlMap;
|
|
323
323
|
this.selectionEvents = createSelectHandler(this);
|
|
@@ -346,9 +346,17 @@ export class EOxDrawTools extends LitElement {
|
|
|
346
346
|
this.requestUpdate("eoxMap", oldValue);
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
+
connectedCallback() {
|
|
350
|
+
super.connectedCallback();
|
|
351
|
+
if (this.drawLayer && this.eoxMap) {
|
|
352
|
+
const { reset } = initLayerMethod(this, this.multipleFeatures);
|
|
353
|
+
this.resetLayer = reset;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
349
357
|
disconnectedCallback() {
|
|
350
|
-
this.eoxMap?.map.removeLayer(this.drawLayer);
|
|
351
358
|
super.disconnectedCallback();
|
|
359
|
+
this.resetLayer?.(this);
|
|
352
360
|
}
|
|
353
361
|
// Render method for UI display
|
|
354
362
|
render() {
|
|
@@ -26,7 +26,7 @@ const createSelectHandler = (EoxDrawTool) => {
|
|
|
26
26
|
if (EoxDrawTool.layerId) {
|
|
27
27
|
const hoverInteraction =
|
|
28
28
|
EoxDrawTool.eoxMap.selectInteractions["SelectLayerHoverInteraction"];
|
|
29
|
-
hoverInteraction
|
|
29
|
+
hoverInteraction?.setActive(true);
|
|
30
30
|
EoxDrawTool.eoxMap.addEventListener("select", selectHandler);
|
|
31
31
|
}
|
|
32
32
|
};
|
|
@@ -39,7 +39,7 @@ const createSelectHandler = (EoxDrawTool) => {
|
|
|
39
39
|
EoxDrawTool.eoxMap.selectInteractions?.["SelectLayerHoverInteraction"];
|
|
40
40
|
if (hoverInteraction) {
|
|
41
41
|
hoverInteraction.selectedFids = [];
|
|
42
|
-
hoverInteraction
|
|
42
|
+
hoverInteraction?.setActive(false);
|
|
43
43
|
}
|
|
44
44
|
EoxDrawTool.eoxMap.removeEventListener("select", selectHandler);
|
|
45
45
|
};
|
|
@@ -9,7 +9,7 @@ const discardDrawingMethod = (EoxDrawTool) => {
|
|
|
9
9
|
const discardDrawingActions = () => {
|
|
10
10
|
// Reset drawnFeatures, deactivate drawing, and clear drawLayer's source
|
|
11
11
|
EoxDrawTool.drawnFeatures = [];
|
|
12
|
-
EoxDrawTool.draw
|
|
12
|
+
EoxDrawTool.draw?.setActive(false);
|
|
13
13
|
EoxDrawTool.selectionEvents.removeSelectionEvent();
|
|
14
14
|
EoxDrawTool.drawLayer.getSource().clear();
|
|
15
15
|
//@ts-expect-error TODO
|
|
@@ -7,7 +7,6 @@ import { getElement } from "@eox/elements-utils";
|
|
|
7
7
|
*
|
|
8
8
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
9
9
|
* @param {Boolean} multipleFeatures - Allow adding more than one feature at a time
|
|
10
|
-
* @returns {{EoxMap: import("@eox/map").EOxMap, OlMap: import("ol").Map}} - The map instances.
|
|
11
10
|
*/
|
|
12
11
|
const initLayerMethod = (EoxDrawTool, multipleFeatures) => {
|
|
13
12
|
const mapQuery = getElement(EoxDrawTool.for);
|
|
@@ -95,12 +94,40 @@ const initLayerMethod = (EoxDrawTool, multipleFeatures) => {
|
|
|
95
94
|
|
|
96
95
|
// Initialize selection interactions
|
|
97
96
|
initSelection(EoxDrawTool, EoxMap, EoxDrawTool.layerId);
|
|
97
|
+
const onModifyEnd = () => EoxDrawTool.onModifyEnd();
|
|
98
|
+
const onAddFeatures = () => onDrawEndMethod(EoxDrawTool);
|
|
98
99
|
|
|
99
|
-
EoxDrawTool.modify?.on("modifyend",
|
|
100
|
+
EoxDrawTool.modify?.on("modifyend", onModifyEnd);
|
|
100
101
|
|
|
101
|
-
EoxMap.addEventListener("addfeatures",
|
|
102
|
+
EoxMap.addEventListener("addfeatures", onAddFeatures);
|
|
102
103
|
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
if (EoxDrawTool.drawnFeatures) {
|
|
105
|
+
EoxDrawTool.drawLayer.getSource().addFeatures(EoxDrawTool.drawnFeatures);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Resets the draw layer, cleaning up interactions and listeners.
|
|
110
|
+
*
|
|
111
|
+
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
112
|
+
*/
|
|
113
|
+
const reset = (EoxDrawTool) => {
|
|
114
|
+
if (!EoxDrawTool.eoxMap || !EoxDrawTool.drawLayer) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Remove the layer from the map
|
|
119
|
+
EoxDrawTool.drawLayer.getSource().clear();
|
|
120
|
+
EoxDrawTool.eoxMap.map.removeLayer(EoxDrawTool.drawLayer);
|
|
121
|
+
EoxDrawTool.modify?.un("modifyend", onModifyEnd);
|
|
122
|
+
EoxDrawTool.eoxMap.removeEventListener("addfeatures", onAddFeatures);
|
|
105
123
|
|
|
124
|
+
// Clean up references
|
|
125
|
+
if (!EoxDrawTool.layerId) {
|
|
126
|
+
EoxDrawTool.draw = null;
|
|
127
|
+
}
|
|
128
|
+
EoxDrawTool.modify = null;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
return { EoxMap, OlMap, reset };
|
|
132
|
+
};
|
|
106
133
|
export default initLayerMethod;
|
|
@@ -63,9 +63,9 @@ const initSelection = (EoxDrawTool, EoxMap, layerId) => {
|
|
|
63
63
|
const oldDrawInteraction = EoxDrawTool.draw;
|
|
64
64
|
EoxDrawTool.draw = EoxMap.selectInteractions["SelectLayerClickInteraction"];
|
|
65
65
|
|
|
66
|
-
oldDrawInteraction
|
|
67
|
-
EoxMap.selectInteractions["SelectLayerClickInteraction"]
|
|
68
|
-
EoxMap.selectInteractions["SelectLayerHoverInteraction"]
|
|
66
|
+
oldDrawInteraction?.setActive(false);
|
|
67
|
+
EoxMap.selectInteractions["SelectLayerClickInteraction"]?.setActive(false);
|
|
68
|
+
EoxMap.selectInteractions["SelectLayerHoverInteraction"]?.setActive(false);
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
export default initSelection;
|
|
@@ -9,7 +9,7 @@ const onDrawEndMethod = (EoxDrawTool) => {
|
|
|
9
9
|
const handleDrawEnd = () => {
|
|
10
10
|
EoxDrawTool.emitDrawnFeatures(); // Emit drawn features
|
|
11
11
|
if (!EoxDrawTool.multipleFeatures) {
|
|
12
|
-
EoxDrawTool.draw
|
|
12
|
+
EoxDrawTool.draw?.setActive(false); // Deactivate drawing
|
|
13
13
|
EoxDrawTool.selectionEvents.removeSelectionEvent();
|
|
14
14
|
EoxDrawTool.currentlyDrawing = false; // Update drawing status flag
|
|
15
15
|
} else {
|
|
@@ -8,7 +8,7 @@ const startDrawingMethod = (EoxDrawTool) => {
|
|
|
8
8
|
// Function to initialize the drawing process
|
|
9
9
|
const initializeDrawing = () => {
|
|
10
10
|
EoxDrawTool.drawLayer.set("isDrawingEnabled", true);
|
|
11
|
-
EoxDrawTool.draw
|
|
11
|
+
EoxDrawTool.draw?.setActive(true);
|
|
12
12
|
// Add selection
|
|
13
13
|
EoxDrawTool.selectionEvents.addSelectionEvent();
|
|
14
14
|
};
|
|
@@ -27,7 +27,7 @@ const startDrawingMethod = (EoxDrawTool) => {
|
|
|
27
27
|
// Abort drawing on Esc key
|
|
28
28
|
document.addEventListener("keydown", ({ key }) => {
|
|
29
29
|
if (key === "Escape" && EoxDrawTool.currentlyDrawing) {
|
|
30
|
-
EoxDrawTool.draw
|
|
30
|
+
EoxDrawTool.draw?.setActive(false);
|
|
31
31
|
EoxDrawTool.currentlyDrawing = false;
|
|
32
32
|
EoxDrawTool.requestUpdate();
|
|
33
33
|
}
|
|
@@ -10,8 +10,10 @@ export function initMapDragDropImport(EOxDrawTool: import("../main.js").EOxDrawT
|
|
|
10
10
|
* Handles file input from drag-and-drop or file selection events,
|
|
11
11
|
* forwarding each file to a specified processing function.
|
|
12
12
|
*
|
|
13
|
-
* @param {DragEvent} e - The event object from the file input interaction.
|
|
13
|
+
* @param {DragEvent | InputEvent & { target: HTMLInputElement }} e - The event object from the file input interaction.
|
|
14
14
|
* @param {import("../main.js").EOxDrawTools} EOxDrawTool - The drawing tool instance.
|
|
15
15
|
*/
|
|
16
|
-
export function handleFiles(e: DragEvent
|
|
16
|
+
export function handleFiles(e: DragEvent | (InputEvent & {
|
|
17
|
+
target: HTMLInputElement;
|
|
18
|
+
}), EOxDrawTool: import("../main.js").EOxDrawTools): void;
|
|
17
19
|
//# sourceMappingURL=generate-upload-events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-upload-events.d.ts","sourceRoot":"","sources":["../../../../src/helpers/generate-upload-events.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,mDAHW,OAAO,YAAY,EAAE,YAAY,UACjC,OAAO,UAAU,EAAE,MAAM,QA6BnC;AAaD;;;;;;GAMG;AACH,+BAHW,SAAS,
|
|
1
|
+
{"version":3,"file":"generate-upload-events.d.ts","sourceRoot":"","sources":["../../../../src/helpers/generate-upload-events.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,mDAHW,OAAO,YAAY,EAAE,YAAY,UACjC,OAAO,UAAU,EAAE,MAAM,QA6BnC;AAaD;;;;;;GAMG;AACH,+BAHW,SAAS,IAAG,UAAU,GAAG;IAAE,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAA,eACrD,OAAO,YAAY,EAAE,YAAY,QAiB3C"}
|
|
@@ -215,9 +215,11 @@ export class EOxDrawTools extends LitElement {
|
|
|
215
215
|
*/
|
|
216
216
|
handleFeatureChange(text: string, replaceFeatures?: boolean, animate?: boolean): void;
|
|
217
217
|
/**
|
|
218
|
-
* @param {DragEvent} evt - The event object from the file input interaction.
|
|
218
|
+
* @param {DragEvent | InputEvent & { target: HTMLInputElement }} evt - The event object from the file input interaction.
|
|
219
219
|
*/
|
|
220
|
-
handleFilesChange(evt: DragEvent
|
|
220
|
+
handleFilesChange(evt: DragEvent | (InputEvent & {
|
|
221
|
+
target: HTMLInputElement;
|
|
222
|
+
})): void;
|
|
221
223
|
/**
|
|
222
224
|
* @event onModifyEnd triggered when the modification of a shape is completed.
|
|
223
225
|
*/
|
|
@@ -236,6 +238,7 @@ export class EOxDrawTools extends LitElement {
|
|
|
236
238
|
* It then calls requestUpdate to trigger a re-render.
|
|
237
239
|
*/
|
|
238
240
|
firstUpdated(): void;
|
|
241
|
+
resetLayer: (EoxDrawTool: import("./main").EOxDrawTools) => void;
|
|
239
242
|
set eoxMap(value: import("@eox/map").EOxMap);
|
|
240
243
|
get eoxMap(): import("@eox/map").EOxMap;
|
|
241
244
|
updated(changedProperties: any): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwBC;IA6BC;;OAEG;IACH,qBAAwB;IAExB;;;;;OAKG;IACH,KAFU,SAAO,WAAW,CAER;IAEpB;;OAEG;IACH,0BAA6B;IAE7B;;;OAGG;IACH,MAFS,OAAO,gBAAgB,EAAE,IAAI,GAAG,OAAO,UAAU,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAEhF;IAEhB;;;OAGG;IAEH,WAHS,OAAO,iBAAiB,EAAE,OAAO,CAGrB;IA6GvB;;;OAGG;IACH,2BAGC;IAED,sBAEC;IAjHC;;;OAGG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,YACP,OAAO,QAUjB;IAED;;OAEG;IACH,uBAFW,SAAS,IAAG,UAAU,GAAG;QAAE,MAAM,EAAE,gBAAgB,CAAA;KAAE,CAAA,QAI/D;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,sBAMC;IAED;;OAEG;IACH,0BAaC;IASD;;;;OAIG;IACH,qBAcC;IATC,iCAjMgC,QAAY,wBAiMrB;IAuBzB,6CAIC;IARD,wCAEC;IAVD,sCAMC;IAyBD,+CAqDC;;CACF;2BA/ZyC,KAAK"}
|
|
@@ -4,10 +4,10 @@ export default initLayerMethod;
|
|
|
4
4
|
*
|
|
5
5
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
6
6
|
* @param {Boolean} multipleFeatures - Allow adding more than one feature at a time
|
|
7
|
-
* @returns {{EoxMap: import("@eox/map").EOxMap, OlMap: import("ol").Map}} - The map instances.
|
|
8
7
|
*/
|
|
9
8
|
declare function initLayerMethod(EoxDrawTool: import("../../main").EOxDrawTools, multipleFeatures: boolean): {
|
|
10
9
|
EoxMap: import("@eox/map").EOxMap;
|
|
11
10
|
OlMap: import("ol").Map;
|
|
11
|
+
reset: (EoxDrawTool: import("../../main").EOxDrawTools) => void;
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=init-layer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-layer.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/init-layer.js"],"names":[],"mappings":";AAIA
|
|
1
|
+
{"version":3,"file":"init-layer.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/init-layer.js"],"names":[],"mappings":";AAIA;;;;;GAKG;AACH,8CAHW,OAAO,YAAY,EAAE,YAAY;;;yBAuG/B,OAAO,YAAY,EAAE,YAAY;EAqB7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-new-feature.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/add-new-feature.js"],"names":[],"mappings":"AAQA;;;;;;;;;;GAUG;AACH,yCAPW,OAAO,qBAAqB,EAAE,SAAS,GAAG,OAAO,4BAA4B,EAAE,gBAAgB,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,OAAO,YAAY,EAAE,OAAO,CAAC,CAAA;CAAE,eACnJ,OAAO,UAAU,EAAE,MAAM,UACzB,OAAO,SAAS,EAAE,MAAM,WACxB,OAAO,oBACP,OAAO,YACP,OAAO,
|
|
1
|
+
{"version":3,"file":"add-new-feature.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/add-new-feature.js"],"names":[],"mappings":"AAQA;;;;;;;;;;GAUG;AACH,yCAPW,OAAO,qBAAqB,EAAE,SAAS,GAAG,OAAO,4BAA4B,EAAE,gBAAgB,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,OAAO,YAAY,EAAE,OAAO,CAAC,CAAA;CAAE,eACnJ,OAAO,UAAU,EAAE,MAAM,UACzB,OAAO,SAAS,EAAE,MAAM,WACxB,OAAO,oBACP,OAAO,YACP,OAAO,QAoEjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-feature.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/parse-feature.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse-feature.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/parse-feature.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,+CAHW,KAAK,CAAC,OAAO,YAAY,EAAE,OAAO,CAAC,OAS7C"}
|
|
@@ -6,11 +6,10 @@
|
|
|
6
6
|
* @param {import("ol/layer").Vector} vectorLayer - The vector layer to which the parsed features will be added.
|
|
7
7
|
* @param {import("../main").EOxMap} EOxMap - An instance of EOxMap, used here for context and potentially for further operations like event dispatching.
|
|
8
8
|
* @param {boolean} replaceFeatures - Optional boolean flag indicating whether to replace the existing features with the new ones.
|
|
9
|
-
* @param {Object} parseOptions - Optional object containing options for the parser.
|
|
10
9
|
* @param {boolean} animate - Optional boolean flag indicating whether to animate the map on feature change.
|
|
11
10
|
* @return {void}
|
|
12
11
|
*/
|
|
13
|
-
export default function parseTextToFeature(text: string, vectorLayer: import("ol/layer").Vector, EOxMap: import("../main").EOxMap, replaceFeatures?: boolean,
|
|
12
|
+
export default function parseTextToFeature(text: string, vectorLayer: import("ol/layer").Vector, EOxMap: import("../main").EOxMap, replaceFeatures?: boolean, animate?: boolean): void;
|
|
14
13
|
/**
|
|
15
14
|
* Function to check if a string is valid GeoJSON
|
|
16
15
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-text.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/parse-text.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse-text.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/parse-text.js"],"names":[],"mappings":"AA+BA;;;;;;;;;;GAUG;AACH,iDAPW,MAAM,eACN,OAAO,UAAU,EAAE,MAAM,UACzB,OAAO,SAAS,EAAE,MAAM,oBACxB,OAAO,YACP,OAAO,GACN,IAAI,CAqCf;AAmBD;;;;;GAKG;AACH,gCAHW,MAAM,GACJ,OAAO,CAWnB;AAED;;;;;GAKG;AACH,4BAHW,MAAM,GACJ,OAAO,CAKnB;AAED;;;;;GAKG;AACH,iCAHW,MAAM,GACJ,OAAO,CAWnB"}
|