@eox/drawtools 0.14.1-dev.1740731700.0 → 0.14.1
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 +324 -316
- package/dist/eox-drawtools.umd.cjs +21 -20
- package/package.json +1 -1
- package/src/components/list.js +1 -0
- package/src/enums/test.js +2 -0
- package/src/main.js +9 -4
- package/src/methods/draw/create-select-handler.js +4 -4
- package/src/methods/draw/emit-drawn-features.js +2 -9
- package/src/methods/draw/init-layer.js +2 -2
- package/src/methods/draw/on-draw-end.js +6 -12
- package/src/methods/list/delete-feature.js +1 -1
- package/src/methods/list/first-update.js +2 -2
- package/types/drawtools/src/components/list.d.ts.map +1 -1
- package/types/drawtools/src/enums/test.d.ts +2 -0
- package/types/drawtools/src/main.d.ts +3 -3
- package/types/drawtools/src/main.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/create-select-handler.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts +1 -2
- package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts +1 -2
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts.map +1 -1
- package/types/map/src/helpers/add-new-feature.d.ts +2 -1
- package/types/map/src/helpers/add-new-feature.d.ts.map +1 -1
- package/types/map/src/helpers/parse-text.d.ts +3 -1
- package/types/map/src/helpers/parse-text.d.ts.map +1 -1
package/src/components/list.js
CHANGED
package/src/enums/test.js
CHANGED
package/src/main.js
CHANGED
|
@@ -240,13 +240,19 @@ export class EOxDrawTools extends LitElement {
|
|
|
240
240
|
/**
|
|
241
241
|
* @param {string} text - The string representation of the features to be parsed.
|
|
242
242
|
* @param {boolean} replaceFeatures - A boolean flag indicating whether to replace the existing features.
|
|
243
|
+
* @param {boolean} animate - A boolean flag indicating whether to animate the map on feature change.
|
|
243
244
|
*/
|
|
244
|
-
handleFeatureChange(text, replaceFeatures = false) {
|
|
245
|
+
handleFeatureChange(text, replaceFeatures = false, animate = true) {
|
|
245
246
|
this.eoxMap.parseTextToFeature(
|
|
246
247
|
text || JSON.stringify(DUMMY_GEO_JSON),
|
|
247
248
|
this.drawLayer,
|
|
248
249
|
this.eoxMap,
|
|
249
250
|
replaceFeatures,
|
|
251
|
+
{
|
|
252
|
+
dataProjection: this.eoxMap.projection,
|
|
253
|
+
featureProjection: this.projection,
|
|
254
|
+
},
|
|
255
|
+
animate,
|
|
250
256
|
);
|
|
251
257
|
}
|
|
252
258
|
|
|
@@ -277,9 +283,8 @@ export class EOxDrawTools extends LitElement {
|
|
|
277
283
|
|
|
278
284
|
/**
|
|
279
285
|
* Triggers different events when the drawing of a shape is completed.
|
|
280
|
-
* @param {import("ol/Feature").default} [selectedFeature] - The feature that was selected by the user.
|
|
281
286
|
*/
|
|
282
|
-
emitDrawnFeatures(
|
|
287
|
+
emitDrawnFeatures() {
|
|
283
288
|
/**
|
|
284
289
|
* @param {import("./methods/draw/emit-drawn-features").EmitFormat} value
|
|
285
290
|
*/
|
|
@@ -291,7 +296,7 @@ export class EOxDrawTools extends LitElement {
|
|
|
291
296
|
*/
|
|
292
297
|
this.dispatchEvent(new CustomEvent("drawupdate", { detail: value }));
|
|
293
298
|
};
|
|
294
|
-
emitDrawnFeaturesMethod(this, drawUpdateEvent
|
|
299
|
+
emitDrawnFeaturesMethod(this, drawUpdateEvent);
|
|
295
300
|
}
|
|
296
301
|
|
|
297
302
|
/**
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { onDrawEndMethod } from "./";
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Factory function to create a select event handler
|
|
5
3
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
@@ -15,8 +13,10 @@ const createSelectHandler = (EoxDrawTool) => {
|
|
|
15
13
|
if (e?.detail.id !== "SelectLayerClickInteraction" || !e.detail.feature) {
|
|
16
14
|
return;
|
|
17
15
|
}
|
|
18
|
-
EoxDrawTool.
|
|
19
|
-
|
|
16
|
+
EoxDrawTool.drawLayer.getSource().addFeature(e.detail.feature);
|
|
17
|
+
EoxDrawTool.eoxMap.dispatchEvent(
|
|
18
|
+
new CustomEvent("addfeatures", { detail: e.detail }),
|
|
19
|
+
);
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -11,19 +11,12 @@ import { featuresToGeoJson, featuresToWKT } from "../../helpers";
|
|
|
11
11
|
*
|
|
12
12
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
13
13
|
* @param {(value:EmitFormat) => void} drawUpdateEvent - event to be triggered after drawFeature is updated
|
|
14
|
-
* @param {import("ol").Feature} [selectedFeature] - The feature that was selected by the user.
|
|
15
14
|
*/
|
|
16
|
-
const emitDrawnFeaturesMethod = (
|
|
17
|
-
EoxDrawTool,
|
|
18
|
-
drawUpdateEvent,
|
|
19
|
-
selectedFeature,
|
|
20
|
-
) => {
|
|
15
|
+
const emitDrawnFeaturesMethod = (EoxDrawTool, drawUpdateEvent) => {
|
|
21
16
|
// Function to emit features after a timeout (ensures update)
|
|
22
17
|
const emitFeatures = () => {
|
|
23
18
|
// Update drawnFeatures with features from drawLayer's source
|
|
24
|
-
const drawnFeatures =
|
|
25
|
-
? EoxDrawTool.drawnFeatures
|
|
26
|
-
: EoxDrawTool.drawLayer.getSource().getFeatures();
|
|
19
|
+
const drawnFeatures = EoxDrawTool.drawLayer.getSource().getFeatures();
|
|
27
20
|
// Transform drawn features to the desired projection
|
|
28
21
|
const source = EoxDrawTool.eoxMap.projection || "EPSG:3857";
|
|
29
22
|
// has a default value of EPSG:4326
|
|
@@ -44,7 +44,7 @@ const initLayerMethod = (EoxDrawTool, multipleFeatures) => {
|
|
|
44
44
|
{
|
|
45
45
|
type: "select",
|
|
46
46
|
options: {
|
|
47
|
-
id: "
|
|
47
|
+
id: "SelectLayerHoverInteraction",
|
|
48
48
|
condition: "pointermove",
|
|
49
49
|
style: EoxDrawTool.featureStyles?.["hover"] || {
|
|
50
50
|
"fill-color": "rgba(51, 153, 204,0.5)",
|
|
@@ -57,7 +57,7 @@ const initLayerMethod = (EoxDrawTool, multipleFeatures) => {
|
|
|
57
57
|
{
|
|
58
58
|
type: "select",
|
|
59
59
|
options: {
|
|
60
|
-
id: "
|
|
60
|
+
id: "SelectLayerClickInteraction",
|
|
61
61
|
condition: "click",
|
|
62
62
|
panIn: true,
|
|
63
63
|
style: EoxDrawTool.featureStyles?.["click"] || {
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
* emits drawn features, deactivates drawing, and requests an update.
|
|
4
4
|
*
|
|
5
5
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
6
|
-
* @param {import("ol/Feature").default} [selectedFeature] - The feature that was selected by the user.
|
|
7
6
|
*/
|
|
8
|
-
const onDrawEndMethod = (EoxDrawTool
|
|
7
|
+
const onDrawEndMethod = (EoxDrawTool) => {
|
|
9
8
|
// Function to handle actions when drawing ends
|
|
10
9
|
const handleDrawEnd = () => {
|
|
11
|
-
EoxDrawTool.emitDrawnFeatures(
|
|
10
|
+
EoxDrawTool.emitDrawnFeatures(); // Emit drawn features
|
|
12
11
|
if (!EoxDrawTool.multipleFeatures) {
|
|
13
12
|
EoxDrawTool.draw.setActive(false); // Deactivate drawing
|
|
14
13
|
EoxDrawTool.selectionEvents.removeSelectionEvent();
|
|
@@ -20,15 +19,10 @@ const onDrawEndMethod = (EoxDrawTool, selectedFeature) => {
|
|
|
20
19
|
EoxDrawTool.drawLayer.getSource().clear(true);
|
|
21
20
|
EoxDrawTool.drawnFeatures = [];
|
|
22
21
|
} else {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const features = EoxDrawTool.drawLayer.getSource().getFeatures();
|
|
28
|
-
latest = features.at(-1);
|
|
29
|
-
EoxDrawTool.drawLayer.getSource().clear(true);
|
|
30
|
-
EoxDrawTool.drawLayer.getSource().addFeature(latest);
|
|
31
|
-
}
|
|
22
|
+
const features = EoxDrawTool.drawLayer.getSource().getFeatures();
|
|
23
|
+
const latest = features.at(-1);
|
|
24
|
+
EoxDrawTool.drawLayer.getSource().clear(true);
|
|
25
|
+
EoxDrawTool.drawLayer.getSource().addFeature(latest);
|
|
32
26
|
EoxDrawTool.drawnFeatures = [latest];
|
|
33
27
|
}
|
|
34
28
|
}
|
|
@@ -11,7 +11,7 @@ const deleteFeatureMethod = (evt, EoxDrawToolList) => {
|
|
|
11
11
|
const index = Number(evt.target.getAttribute("index"));
|
|
12
12
|
|
|
13
13
|
// Retrieve the feature to be deleted from the drawnFeatures array
|
|
14
|
-
const feature = EoxDrawToolList.
|
|
14
|
+
const feature = EoxDrawToolList.drawLayer.getSource().getFeatures()[index];
|
|
15
15
|
|
|
16
16
|
// Remove the feature from the draw layer and update the drawnFeatures array
|
|
17
17
|
EoxDrawToolList.drawLayer.getSource().removeFeature(feature);
|
|
@@ -7,9 +7,9 @@ const firstUpdatedMethod = (EoxDrawToolList) => {
|
|
|
7
7
|
// Set hover and click interactions
|
|
8
8
|
// Assign the hover and click interactions from eoxMap to respective variables in EoxDrawToolList
|
|
9
9
|
EoxDrawToolList.hoverInteraction =
|
|
10
|
-
EoxDrawToolList.eoxMap.selectInteractions["
|
|
10
|
+
EoxDrawToolList.eoxMap.selectInteractions["SelectLayerHoverInteraction"];
|
|
11
11
|
EoxDrawToolList.clickInteraction =
|
|
12
|
-
EoxDrawToolList.eoxMap.selectInteractions["
|
|
12
|
+
EoxDrawToolList.eoxMap.selectInteractions["SelectLayerClickInteraction"];
|
|
13
13
|
|
|
14
14
|
// Function to trigger an update when the style changes due to interaction
|
|
15
15
|
const handleInteractionStyleChange = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/components/list.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;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;;;;;MAUE;IAEF;;OAEG;IACH,kBAFU,OAAO,UAAU,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAEhD;IAEjB;;OAEG;IACH,kBAFU,OAAO,UAAU,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAEhD;IAEjB;;OAEG;IACH,SAFS,MAAM,GAAG,MAAM,CAEhB;IAER;;OAEG;IACH,SAFS,MAAM,GAAG,MAAM,CAEhB;IAKN;;OAEG;IACH,cAFS,OAAO,SAAS,EAAE,YAAY,CAEf;IAExB;;OAEG;IACH,QAFS,OAAO,UAAU,EAAE,MAAM,CAEhB;IAElB;;OAEG;IACH,OAFS,OAAO,IAAI,EAAE,GAAG,CAER;IAEjB;;;OAGG;IAEH,MAHS,OAAO,gBAAgB,EAAE,IAAI,CAGtB;IAEhB;;;OAGG;IAEH,WAHS,OAAO,UAAU,EAAE,MAAM,CAAC,OAAO,WAAW,EAAE,MAAM,CAAC,CAGzC;IAErB;;;;;OAKG;IACH,eAFS,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,CAAC,CAEb;IAEvB;;OAEG;IACH,oBAA4B;IAE5B;;;OAGG;IAEH,QAHS,OAAO,gBAAgB,EAAE,MAAM,CAGtB;IAElB;;OAEG;IACH,kBAAqB;IAGvB;;;;OAIG;IACH,mBAFW,KAAK,GAAG;QAAE,MAAM,EAAE,iBAAiB,CAAA;KAAE,QAK/C;IAED;;;;OAIG;IACH,yCAFW,OAAO,IAAI,EAAE,OAAO,QAI9B;IAED;;;;OAIG;IACH,+BAHW,MAAM,GAAG,MAAM,GAAG,SAAS,4BAKrC;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,yBAEC;IAED,+CAsDC;CACF;2BA3MyC,KAAK"}
|
|
@@ -203,8 +203,9 @@ export class EOxDrawTools extends LitElement {
|
|
|
203
203
|
/**
|
|
204
204
|
* @param {string} text - The string representation of the features to be parsed.
|
|
205
205
|
* @param {boolean} replaceFeatures - A boolean flag indicating whether to replace the existing features.
|
|
206
|
+
* @param {boolean} animate - A boolean flag indicating whether to animate the map on feature change.
|
|
206
207
|
*/
|
|
207
|
-
handleFeatureChange(text: string, replaceFeatures?: boolean): void;
|
|
208
|
+
handleFeatureChange(text: string, replaceFeatures?: boolean, animate?: boolean): void;
|
|
208
209
|
/**
|
|
209
210
|
* @param {DragEvent} evt - The event object from the file input interaction.
|
|
210
211
|
*/
|
|
@@ -219,9 +220,8 @@ export class EOxDrawTools extends LitElement {
|
|
|
219
220
|
updateGeoJSON(): void;
|
|
220
221
|
/**
|
|
221
222
|
* Triggers different events when the drawing of a shape is completed.
|
|
222
|
-
* @param {import("ol/Feature").default} [selectedFeature] - The feature that was selected by the user.
|
|
223
223
|
*/
|
|
224
|
-
emitDrawnFeatures(
|
|
224
|
+
emitDrawnFeatures(): void;
|
|
225
225
|
/**
|
|
226
226
|
* initializes the EOxMap and OlMap instances
|
|
227
227
|
* And stores them in the private properties #eoxMap and #olMap, respectively.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuBC;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;IAwGvB;;;OAGG;IACH,2BAGC;IAED,sBAEC;IA5GC;;;OAGG;IACH,eAFS,KAAK,CAAC,OAAO,IAAI,EAAE,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IAcD,6CAIC;IARD,wCAEC;IAVD,sCAMC;IAiBD,+CA8CC;;CACF;2BA3YyC,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-select-handler.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/create-select-handler.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"create-select-handler.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/create-select-handler.js"],"names":[],"mappings":";AAAA;;;GAGG;AACH,kDAFW,OAAO,YAAY,EAAE,YAAY;;;EA6C3C"}
|
|
@@ -13,9 +13,8 @@ export type EmitFormat = import("ol").Feature[] | ReturnType<typeof featuresToGe
|
|
|
13
13
|
*
|
|
14
14
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
15
15
|
* @param {(value:EmitFormat) => void} drawUpdateEvent - event to be triggered after drawFeature is updated
|
|
16
|
-
* @param {import("ol").Feature} [selectedFeature] - The feature that was selected by the user.
|
|
17
16
|
*/
|
|
18
|
-
declare function emitDrawnFeaturesMethod(EoxDrawTool: import("../../main").EOxDrawTools, drawUpdateEvent: (value: EmitFormat) => void
|
|
17
|
+
declare function emitDrawnFeaturesMethod(EoxDrawTool: import("../../main").EOxDrawTools, drawUpdateEvent: (value: EmitFormat) => void): void;
|
|
19
18
|
import { featuresToGeoJson } from "../../helpers";
|
|
20
19
|
import { featuresToWKT } from "../../helpers";
|
|
21
20
|
//# sourceMappingURL=emit-drawn-features.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-drawn-features.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/emit-drawn-features.js"],"names":[],"mappings":";;;;yBAGa,OAAO,IAAI,EAAE,OAAO,EAAE,GAC9B,UAAU,CAAC,OAAO,iBAAiB,CAAC,GACpC,UAAU,CAAC,OAAO,aAAa,CAAC;AAHrC;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"emit-drawn-features.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/emit-drawn-features.js"],"names":[],"mappings":";;;;yBAGa,OAAO,IAAI,EAAE,OAAO,EAAE,GAC9B,UAAU,CAAC,OAAO,iBAAiB,CAAC,GACpC,UAAU,CAAC,OAAO,aAAa,CAAC;AAHrC;;;;GAIG;AAEH;;;;;GAKG;AACH,sDAHW,OAAO,YAAY,EAAE,YAAY,mBACjC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,QA+CpC;kCA3DgD,eAAe;8BAAf,eAAe"}
|
|
@@ -4,7 +4,6 @@ export default onDrawEndMethod;
|
|
|
4
4
|
* emits drawn features, deactivates drawing, and requests an update.
|
|
5
5
|
*
|
|
6
6
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
7
|
-
* @param {import("ol/Feature").default} [selectedFeature] - The feature that was selected by the user.
|
|
8
7
|
*/
|
|
9
|
-
declare function onDrawEndMethod(EoxDrawTool: import("../../main").EOxDrawTools
|
|
8
|
+
declare function onDrawEndMethod(EoxDrawTool: import("../../main").EOxDrawTools): void;
|
|
10
9
|
//# sourceMappingURL=on-draw-end.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-draw-end.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/on-draw-end.js"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"on-draw-end.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/on-draw-end.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,8CAFW,OAAO,YAAY,EAAE,YAAY,QA8B3C"}
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
* @param {import("../main").EOxMap} EOxMap - The EOxMap instance for dispatching custom events and adjusting the view.
|
|
8
8
|
* @param {boolean} isDraw - Optional. If true, indicates the features come from a drawing event.
|
|
9
9
|
* @param {boolean} replaceFeatures - Optional. If true, existing features in the layer are cleared before adding new ones.
|
|
10
|
+
* @param {boolean} animate - Optional. If true, the map will animate to the new features.
|
|
10
11
|
*/
|
|
11
12
|
export default function addNewFeature(e: import("ol/interaction/Draw").DrawEvent | import("ol/interaction/DragAndDrop").DragAndDropEvent | {
|
|
12
13
|
features: Array<import("ol/Feature").default>;
|
|
13
|
-
}, vectorLayer: import("ol/layer").Vector, EOxMap: import("../main").EOxMap, isDraw?: boolean, replaceFeatures?: boolean): void;
|
|
14
|
+
}, vectorLayer: import("ol/layer").Vector, EOxMap: import("../main").EOxMap, isDraw?: boolean, replaceFeatures?: boolean, animate?: boolean): void;
|
|
14
15
|
//# sourceMappingURL=add-new-feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-new-feature.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/add-new-feature.js"],"names":[],"mappings":"AAOA
|
|
1
|
+
{"version":3,"file":"add-new-feature.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/add-new-feature.js"],"names":[],"mappings":"AAOA;;;;;;;;;;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,QAiEjB"}
|
|
@@ -6,9 +6,11 @@
|
|
|
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
|
+
* @param {boolean} animate - Optional boolean flag indicating whether to animate the map on feature change.
|
|
9
11
|
* @return {void}
|
|
10
12
|
*/
|
|
11
|
-
export default function parseTextToFeature(text: string, vectorLayer: import("ol/layer").Vector, EOxMap: import("../main").EOxMap, replaceFeatures?: boolean): void;
|
|
13
|
+
export default function parseTextToFeature(text: string, vectorLayer: import("ol/layer").Vector, EOxMap: import("../main").EOxMap, replaceFeatures?: boolean, parseOptions?: any, animate?: boolean): void;
|
|
12
14
|
/**
|
|
13
15
|
* Function to check if a string is valid GeoJSON
|
|
14
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-text.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/parse-text.js"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"parse-text.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/parse-text.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;GAWG;AACH,iDARW,MAAM,eACN,OAAO,UAAU,EAAE,MAAM,UACzB,OAAO,SAAS,EAAE,MAAM,oBACxB,OAAO,gCAEP,OAAO,GACN,IAAI,CAiCf;AAmBD;;;;;GAKG;AACH,gCAHW,MAAM,GACJ,OAAO,CAWnB;AAED;;;;;GAKG;AACH,4BAHW,MAAM,GACJ,OAAO,CAKnB;AAED;;;;;GAKG;AACH,iCAHW,MAAM,GACJ,OAAO,CAWnB"}
|