@eox/drawtools 0.11.1 → 0.13.0
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 +6395 -562
- package/dist/eox-drawtools.umd.cjs +38 -37
- package/package.json +17 -4
- package/src/helpers/features-to-geojson.js +14 -0
- package/src/helpers/features-to-wkt.js +13 -0
- package/src/helpers/index.js +2 -0
- package/src/main.js +24 -8
- package/src/methods/draw/emit-drawn-features.js +42 -3
- package/types/drawtools/src/components/controller.d.ts +99 -0
- package/types/drawtools/src/components/controller.d.ts.map +1 -0
- package/types/drawtools/src/components/list.d.ts +118 -0
- package/types/drawtools/src/components/list.d.ts.map +1 -0
- package/types/drawtools/src/enums/draw.d.ts +8 -0
- package/types/drawtools/src/enums/draw.d.ts.map +1 -0
- package/types/drawtools/src/enums/index.d.ts +4 -0
- package/types/drawtools/src/enums/index.d.ts.map +1 -0
- package/types/drawtools/src/enums/stories.d.ts +30 -0
- package/types/drawtools/src/enums/stories.d.ts.map +1 -0
- package/types/drawtools/src/enums/test.d.ts +8 -0
- package/types/drawtools/src/enums/test.d.ts.map +1 -0
- package/types/drawtools/src/helpers/copy-text-to-clipboard.d.ts +7 -0
- package/types/drawtools/src/helpers/copy-text-to-clipboard.d.ts.map +1 -0
- package/types/drawtools/src/helpers/features-to-geojson.d.ts +11 -0
- package/types/drawtools/src/helpers/features-to-geojson.d.ts.map +1 -0
- package/types/drawtools/src/helpers/features-to-wkt.d.ts +9 -0
- package/types/drawtools/src/helpers/features-to-wkt.d.ts.map +1 -0
- package/types/drawtools/src/helpers/generate-upload-events.d.ts +17 -0
- package/types/drawtools/src/helpers/generate-upload-events.d.ts.map +1 -0
- package/types/drawtools/src/helpers/index.d.ts +4 -0
- package/types/drawtools/src/helpers/index.d.ts.map +1 -0
- package/types/drawtools/src/main.d.ts +204 -0
- package/types/drawtools/src/main.d.ts.map +1 -0
- package/types/drawtools/src/methods/controller/index.d.ts +2 -0
- package/types/drawtools/src/methods/controller/index.d.ts.map +1 -0
- package/types/drawtools/src/methods/controller/update-button-states.d.ts +12 -0
- package/types/drawtools/src/methods/controller/update-button-states.d.ts.map +1 -0
- package/types/drawtools/src/methods/draw/create-select-handler.d.ts +10 -0
- package/types/drawtools/src/methods/draw/create-select-handler.d.ts.map +1 -0
- package/types/drawtools/src/methods/draw/discard-drawing.d.ts +9 -0
- package/types/drawtools/src/methods/draw/discard-drawing.d.ts.map +1 -0
- package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts +20 -0
- package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts.map +1 -0
- package/types/drawtools/src/methods/draw/handle-layer-id.d.ts +12 -0
- package/types/drawtools/src/methods/draw/handle-layer-id.d.ts.map +1 -0
- package/types/drawtools/src/methods/draw/index.d.ts +9 -0
- package/types/drawtools/src/methods/draw/index.d.ts.map +1 -0
- package/types/drawtools/src/methods/draw/init-layer.d.ts +13 -0
- package/types/drawtools/src/methods/draw/init-layer.d.ts.map +1 -0
- package/types/drawtools/src/methods/draw/init-selection.d.ts +9 -0
- package/types/drawtools/src/methods/draw/init-selection.d.ts.map +1 -0
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts +9 -0
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts.map +1 -0
- package/types/drawtools/src/methods/draw/start-drawing.d.ts +9 -0
- package/types/drawtools/src/methods/draw/start-drawing.d.ts.map +1 -0
- package/types/drawtools/src/methods/list/delete-feature.d.ts +11 -0
- package/types/drawtools/src/methods/list/delete-feature.d.ts.map +1 -0
- package/types/drawtools/src/methods/list/first-update.d.ts +8 -0
- package/types/drawtools/src/methods/list/first-update.d.ts.map +1 -0
- package/types/drawtools/src/methods/list/hover-feature.d.ts +10 -0
- package/types/drawtools/src/methods/list/hover-feature.d.ts.map +1 -0
- package/types/drawtools/src/methods/list/index.d.ts +5 -0
- package/types/drawtools/src/methods/list/index.d.ts.map +1 -0
- package/types/drawtools/src/methods/list/select-deselect-feature.d.ts +9 -0
- package/types/drawtools/src/methods/list/select-deselect-feature.d.ts.map +1 -0
- package/types/drawtools/src/style.eox.d.ts +2 -0
- package/types/drawtools/src/style.eox.d.ts.map +1 -0
- package/types/map/src/components/compare.d.ts +31 -0
- package/types/map/src/components/compare.d.ts.map +1 -0
- package/types/map/src/components/tooltip.d.ts +36 -0
- package/types/map/src/components/tooltip.d.ts.map +1 -0
- package/types/map/src/controls/controls.d.ts +27 -0
- package/types/map/src/controls/controls.d.ts.map +1 -0
- package/types/map/src/controls/geo-location.d.ts +41 -0
- package/types/map/src/controls/geo-location.d.ts.map +1 -0
- package/types/map/src/controls/loading-indicator.d.ts +20 -0
- package/types/map/src/controls/loading-indicator.d.ts.map +1 -0
- package/types/map/src/enums/index.d.ts +2 -0
- package/types/map/src/enums/index.d.ts.map +1 -0
- package/types/map/src/enums/map.d.ts +5 -0
- package/types/map/src/enums/map.d.ts.map +1 -0
- package/types/map/src/helpers/add-new-feature.d.ts +14 -0
- package/types/map/src/helpers/add-new-feature.d.ts.map +1 -0
- package/types/map/src/helpers/cancel-animation.d.ts +7 -0
- package/types/map/src/helpers/cancel-animation.d.ts.map +1 -0
- package/types/map/src/helpers/center.d.ts +12 -0
- package/types/map/src/helpers/center.d.ts.map +1 -0
- package/types/map/src/helpers/coordinates-roughly-equals.d.ts +12 -0
- package/types/map/src/helpers/coordinates-roughly-equals.d.ts.map +1 -0
- package/types/map/src/helpers/draw.d.ts +22 -0
- package/types/map/src/helpers/draw.d.ts.map +1 -0
- package/types/map/src/helpers/generate.d.ts +30 -0
- package/types/map/src/helpers/generate.d.ts.map +1 -0
- package/types/map/src/helpers/index.d.ts +16 -0
- package/types/map/src/helpers/index.d.ts.map +1 -0
- package/types/map/src/helpers/interactions.d.ts +16 -0
- package/types/map/src/helpers/interactions.d.ts.map +1 -0
- package/types/map/src/helpers/layer.d.ts +24 -0
- package/types/map/src/helpers/layer.d.ts.map +1 -0
- package/types/map/src/helpers/parse-feature.d.ts +8 -0
- package/types/map/src/helpers/parse-feature.d.ts.map +1 -0
- package/types/map/src/helpers/parse-text.d.ts +33 -0
- package/types/map/src/helpers/parse-text.d.ts.map +1 -0
- package/types/map/src/helpers/register-projection-from-code.d.ts +8 -0
- package/types/map/src/helpers/register-projection-from-code.d.ts.map +1 -0
- package/types/map/src/helpers/register-projection.d.ts +11 -0
- package/types/map/src/helpers/register-projection.d.ts.map +1 -0
- package/types/map/src/helpers/select.d.ts +86 -0
- package/types/map/src/helpers/select.d.ts.map +1 -0
- package/types/map/src/helpers/tile-grid.d.ts +14 -0
- package/types/map/src/helpers/tile-grid.d.ts.map +1 -0
- package/types/map/src/helpers/transform.d.ts +19 -0
- package/types/map/src/helpers/transform.d.ts.map +1 -0
- package/types/map/src/main.d.ts +337 -0
- package/types/map/src/main.d.ts.map +1 -0
- package/types/map/src/methods/map/add-update-layer.d.ts +13 -0
- package/types/map/src/methods/map/add-update-layer.d.ts.map +1 -0
- package/types/map/src/methods/map/animate-to-state.d.ts +7 -0
- package/types/map/src/methods/map/animate-to-state.d.ts.map +1 -0
- package/types/map/src/methods/map/first-updated.d.ts +9 -0
- package/types/map/src/methods/map/first-updated.d.ts.map +1 -0
- package/types/map/src/methods/map/getters.d.ts +15 -0
- package/types/map/src/methods/map/getters.d.ts.map +1 -0
- package/types/map/src/methods/map/index.d.ts +7 -0
- package/types/map/src/methods/map/index.d.ts.map +1 -0
- package/types/map/src/methods/map/remove.d.ts +22 -0
- package/types/map/src/methods/map/remove.d.ts.map +1 -0
- package/types/map/src/methods/map/setters.d.ts +82 -0
- package/types/map/src/methods/map/setters.d.ts.map +1 -0
- package/types/map/types.d.ts +148 -0
- package/types/map/types.d.ts.map +1 -0
package/src/main.js
CHANGED
|
@@ -38,7 +38,9 @@ export class EOxDrawTools extends LitElement {
|
|
|
38
38
|
importFeatures: { attribute: "import-features", type: Boolean },
|
|
39
39
|
showEditor: { attribute: "show-editor", type: Boolean },
|
|
40
40
|
showList: { attribute: "show-list", type: Boolean },
|
|
41
|
+
projection: { type: String },
|
|
41
42
|
noShadow: { type: Boolean },
|
|
43
|
+
format: { type: String },
|
|
42
44
|
type: { type: String },
|
|
43
45
|
unstyled: { type: Boolean },
|
|
44
46
|
};
|
|
@@ -134,6 +136,10 @@ export class EOxDrawTools extends LitElement {
|
|
|
134
136
|
* Show list of features
|
|
135
137
|
*/
|
|
136
138
|
this.showList = false;
|
|
139
|
+
/**
|
|
140
|
+
* Projection of the emitted drawn features
|
|
141
|
+
*/
|
|
142
|
+
this.projection = "EPSG:4326";
|
|
137
143
|
|
|
138
144
|
/**
|
|
139
145
|
* Type of the drawn feature
|
|
@@ -141,6 +147,19 @@ export class EOxDrawTools extends LitElement {
|
|
|
141
147
|
*/
|
|
142
148
|
this.type = "Polygon";
|
|
143
149
|
|
|
150
|
+
/**
|
|
151
|
+
* @type {ReturnType<typeof import("./methods/draw/create-select-handler").default>}
|
|
152
|
+
*/
|
|
153
|
+
this.selectionEvents = null;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The format in which the drawn features should be emitted
|
|
157
|
+
*
|
|
158
|
+
* @default "feature"
|
|
159
|
+
* @type {"feature"| "geojson" | "wkt"}
|
|
160
|
+
*/
|
|
161
|
+
this.format = "feature";
|
|
162
|
+
|
|
144
163
|
/**
|
|
145
164
|
* Render the element without additional styles
|
|
146
165
|
*/
|
|
@@ -152,10 +171,6 @@ export class EOxDrawTools extends LitElement {
|
|
|
152
171
|
* @type {Boolean}
|
|
153
172
|
*/
|
|
154
173
|
this.noShadow = false;
|
|
155
|
-
/**
|
|
156
|
-
* @type {ReturnType<typeof import("./methods/draw/create-select-handler").default>}
|
|
157
|
-
*/
|
|
158
|
-
this.selectionEvents = null;
|
|
159
174
|
}
|
|
160
175
|
|
|
161
176
|
/**
|
|
@@ -229,15 +244,16 @@ export class EOxDrawTools extends LitElement {
|
|
|
229
244
|
* Triggers different events when the drawing of a shape is completed.
|
|
230
245
|
*/
|
|
231
246
|
emitDrawnFeatures() {
|
|
232
|
-
|
|
247
|
+
/**
|
|
248
|
+
* @param {import("./methods/draw/emit-drawn-features").EmitFormat} value
|
|
249
|
+
*/
|
|
250
|
+
const drawUpdateEvent = (value) => {
|
|
233
251
|
/**
|
|
234
252
|
* Fires whenever features are added, modified or discarded, where the event detail
|
|
235
253
|
* is the `drawnFeatures` array
|
|
236
254
|
* @type Array<import("ol").Feature>
|
|
237
255
|
*/
|
|
238
|
-
this.dispatchEvent(
|
|
239
|
-
new CustomEvent("drawupdate", { detail: this.drawnFeatures }),
|
|
240
|
-
);
|
|
256
|
+
this.dispatchEvent(new CustomEvent("drawupdate", { detail: value }));
|
|
241
257
|
};
|
|
242
258
|
emitDrawnFeaturesMethod(this, drawUpdateEvent);
|
|
243
259
|
}
|
|
@@ -1,19 +1,58 @@
|
|
|
1
|
+
import { featuresToGeoJson, featuresToWKT } from "../../helpers";
|
|
2
|
+
|
|
3
|
+
/***
|
|
4
|
+
* @typedef {import("ol").Feature[]
|
|
5
|
+
* | ReturnType<typeof featuresToGeoJson>
|
|
6
|
+
* | ReturnType<typeof featuresToWKT>} EmitFormat
|
|
7
|
+
*/
|
|
8
|
+
|
|
1
9
|
/**
|
|
2
10
|
* Emits drawn features after a timeout to allow updating drawn features.
|
|
3
11
|
*
|
|
4
12
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
5
|
-
* @param {
|
|
13
|
+
* @param {(value:EmitFormat) => void} drawUpdateEvent - event to be triggered after drawFeature is updated
|
|
6
14
|
*/
|
|
7
15
|
const emitDrawnFeaturesMethod = (EoxDrawTool, drawUpdateEvent) => {
|
|
8
16
|
// Function to emit features after a timeout (ensures update)
|
|
9
17
|
const emitFeatures = () => {
|
|
10
18
|
// Update drawnFeatures with features from drawLayer's source
|
|
11
|
-
|
|
19
|
+
const drawnFeatures = EoxDrawTool.drawLayer.getSource().getFeatures();
|
|
20
|
+
// Transform drawn features to the desired projection
|
|
21
|
+
const source = EoxDrawTool.eoxMap.projection || "EPSG:3857";
|
|
22
|
+
// has a default value of EPSG:4326
|
|
23
|
+
const destination = EoxDrawTool.projection;
|
|
24
|
+
// Update drawnFeatures with transformed features if the destination is defined
|
|
25
|
+
EoxDrawTool.drawnFeatures = destination
|
|
26
|
+
? drawnFeatures.map((feat) => {
|
|
27
|
+
feat = feat.clone();
|
|
28
|
+
const transformed = feat.getGeometry().transform(source, destination);
|
|
29
|
+
feat.setGeometry(transformed);
|
|
30
|
+
return feat;
|
|
31
|
+
})
|
|
32
|
+
: drawnFeatures;
|
|
33
|
+
|
|
34
|
+
// Emit features based on the format provided
|
|
35
|
+
let value;
|
|
36
|
+
switch (EoxDrawTool.format) {
|
|
37
|
+
case "geojson":
|
|
38
|
+
value = featuresToGeoJson(EoxDrawTool.drawnFeatures);
|
|
39
|
+
break;
|
|
40
|
+
case "wkt":
|
|
41
|
+
value = featuresToWKT(EoxDrawTool.drawnFeatures);
|
|
42
|
+
break;
|
|
43
|
+
case "feature":
|
|
44
|
+
value = EoxDrawTool.drawnFeatures;
|
|
45
|
+
break;
|
|
46
|
+
default:
|
|
47
|
+
value = EoxDrawTool.drawnFeatures;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
|
|
12
51
|
EoxDrawTool.updateGeoJSON();
|
|
13
52
|
EoxDrawTool.requestUpdate();
|
|
14
53
|
|
|
15
54
|
// Triggering `drawupdate` event after drawFeature is updated
|
|
16
|
-
drawUpdateEvent();
|
|
55
|
+
drawUpdateEvent(value);
|
|
17
56
|
};
|
|
18
57
|
|
|
19
58
|
// Emit features after a timeout (ensures update)
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controller component for drawing features
|
|
3
|
+
*
|
|
4
|
+
* @element eox-drawtools-controller
|
|
5
|
+
*/
|
|
6
|
+
export class EOxDrawToolsController extends LitElement {
|
|
7
|
+
static properties: {
|
|
8
|
+
multipleFeatures: {
|
|
9
|
+
attribute: boolean;
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
};
|
|
12
|
+
drawnFeatures: {
|
|
13
|
+
attribute: boolean;
|
|
14
|
+
state: boolean;
|
|
15
|
+
type: ArrayConstructor;
|
|
16
|
+
};
|
|
17
|
+
currentlyDrawing: {
|
|
18
|
+
attribute: boolean;
|
|
19
|
+
state: boolean;
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
};
|
|
22
|
+
drawFunc: {
|
|
23
|
+
attribute: boolean;
|
|
24
|
+
type: ObjectConstructor;
|
|
25
|
+
};
|
|
26
|
+
select: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
};
|
|
29
|
+
importFeatures: {
|
|
30
|
+
attribute: string;
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
};
|
|
33
|
+
showEditor: {
|
|
34
|
+
attribute: string;
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
};
|
|
37
|
+
geoJSON: {
|
|
38
|
+
attribute: string;
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
};
|
|
41
|
+
unstyled: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Allow adding more than one feature at a time
|
|
47
|
+
*/
|
|
48
|
+
multipleFeatures: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The array of drawn native OpenLayers features. Normally includes only one feature,
|
|
51
|
+
* until multiple feature drawing is enabled.
|
|
52
|
+
*
|
|
53
|
+
* @type Array<import("ol").Feature>
|
|
54
|
+
*/
|
|
55
|
+
drawnFeatures: Array<import("ol").Feature>;
|
|
56
|
+
/**
|
|
57
|
+
* Allow import features using drag-drop and upload button
|
|
58
|
+
* @type Boolean
|
|
59
|
+
*/
|
|
60
|
+
importFeatures: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Show geo-json editor for draw tool
|
|
63
|
+
* @type Boolean
|
|
64
|
+
*/
|
|
65
|
+
showEditor: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the user is currently in the process of drawing or not
|
|
68
|
+
*/
|
|
69
|
+
currentlyDrawing: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* List of draw function object like start, discard etc.
|
|
72
|
+
*/
|
|
73
|
+
drawFunc: any;
|
|
74
|
+
/**
|
|
75
|
+
* Parsed and Stringify Geo JSON
|
|
76
|
+
* @type String
|
|
77
|
+
*/
|
|
78
|
+
geoJSON: string;
|
|
79
|
+
/**
|
|
80
|
+
* Render the element without additional styles
|
|
81
|
+
*/
|
|
82
|
+
unstyled: boolean;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
select: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Updates button states based on conditions
|
|
89
|
+
*/
|
|
90
|
+
updateButtonStates(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Overrides createRenderRoot to handle shadow DOM
|
|
93
|
+
*/
|
|
94
|
+
createRenderRoot(): this;
|
|
95
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
96
|
+
#private;
|
|
97
|
+
}
|
|
98
|
+
import { LitElement } from "lit";
|
|
99
|
+
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../../src/components/controller.js"],"names":[],"mappings":"AAOA;;;;GAIG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUE;IAeA;;OAEG;IACH,0BAA6B;IAE7B;;;;;OAKG;IACH,eAFS,MAAM,OAAO,IAAI,EAAE,OAAO,CAAC,CAEb;IAEvB;;;OAGG;IACH,wBAA2B;IAE3B;;;OAGG;IACH,oBAAuB;IAEvB;;OAEG;IACH,0BAA6B;IAE7B;;OAEG;IACH,cAAoB;IAEpB;;;OAGG;IACH,gBAAiB;IAEjB;;OAEG;IACH,kBAAqB;IAErB;;OAEG;IACH,gBAAmB;IAGrB;;OAEG;IACH,2BAKC;IAED;;OAEG;IACH,yBAEC;IAED,+CAiFC;;CACF;2BA9LyC,KAAK"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display list of features
|
|
3
|
+
*
|
|
4
|
+
* @element eox-drawtools-list
|
|
5
|
+
*/
|
|
6
|
+
export class EOxDrawToolsList extends LitElement {
|
|
7
|
+
static properties: {
|
|
8
|
+
eoxMap: {
|
|
9
|
+
attribute: boolean;
|
|
10
|
+
state: boolean;
|
|
11
|
+
};
|
|
12
|
+
olMap: {
|
|
13
|
+
attribute: boolean;
|
|
14
|
+
state: boolean;
|
|
15
|
+
};
|
|
16
|
+
draw: {
|
|
17
|
+
attribute: boolean;
|
|
18
|
+
state: boolean;
|
|
19
|
+
};
|
|
20
|
+
drawLayer: {
|
|
21
|
+
attribute: boolean;
|
|
22
|
+
state: boolean;
|
|
23
|
+
};
|
|
24
|
+
drawnFeatures: {
|
|
25
|
+
attribute: boolean;
|
|
26
|
+
state: boolean;
|
|
27
|
+
type: ArrayConstructor;
|
|
28
|
+
};
|
|
29
|
+
modify: {
|
|
30
|
+
attribute: boolean;
|
|
31
|
+
state: boolean;
|
|
32
|
+
};
|
|
33
|
+
unstyled: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @type import("../../../map/src/select").EOxSelectInteraction
|
|
39
|
+
*/
|
|
40
|
+
hoverInteraction: any;
|
|
41
|
+
/**
|
|
42
|
+
* @type import("../../../map/src/select").EOxSelectInteraction
|
|
43
|
+
*/
|
|
44
|
+
clickInteraction: any;
|
|
45
|
+
/**
|
|
46
|
+
* @type string | number
|
|
47
|
+
*/
|
|
48
|
+
hoverId: string | number;
|
|
49
|
+
/**
|
|
50
|
+
* @type string | number
|
|
51
|
+
*/
|
|
52
|
+
clickId: string | number;
|
|
53
|
+
/**
|
|
54
|
+
* @type import("../../../map/main").EOxMap
|
|
55
|
+
*/
|
|
56
|
+
eoxMap: any;
|
|
57
|
+
/**
|
|
58
|
+
* @type import("ol").Map
|
|
59
|
+
*/
|
|
60
|
+
olMap: import("ol").Map;
|
|
61
|
+
/**
|
|
62
|
+
* The current native OpenLayers `draw` interaction
|
|
63
|
+
* @type import("ol/interaction").Draw
|
|
64
|
+
*/
|
|
65
|
+
draw: import("ol/interaction").Draw;
|
|
66
|
+
/**
|
|
67
|
+
* The current native OpenLayers draw `layer`
|
|
68
|
+
* @type import("ol/layer").Vector<import("ol/source").Vector>
|
|
69
|
+
*/
|
|
70
|
+
drawLayer: import("ol/layer").Vector<import("ol/source").Vector>;
|
|
71
|
+
/**
|
|
72
|
+
* The array of drawn native OpenLayers features. Normally includes only one feature,
|
|
73
|
+
* until multiple feature drawing is enabled.
|
|
74
|
+
*
|
|
75
|
+
* @type Array<import("ol").Feature>
|
|
76
|
+
*/
|
|
77
|
+
drawnFeatures: Array<import("ol").Feature>;
|
|
78
|
+
/**
|
|
79
|
+
* The current native OpenLayers `modify` interaction
|
|
80
|
+
* @type import("ol/interaction").Modify
|
|
81
|
+
*/
|
|
82
|
+
modify: import("ol/interaction").Modify;
|
|
83
|
+
/**
|
|
84
|
+
* Render the element without additional styles
|
|
85
|
+
*/
|
|
86
|
+
unstyled: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Handles the deletion of an individual feature.
|
|
89
|
+
*
|
|
90
|
+
* @param {Event & { target: HTMLButtonElement }} evt - Event object containing button target.
|
|
91
|
+
*/
|
|
92
|
+
_handleDelete(evt: Event & {
|
|
93
|
+
target: HTMLButtonElement;
|
|
94
|
+
}): void;
|
|
95
|
+
/**
|
|
96
|
+
* Handles the selection and deselection of a feature from the list.
|
|
97
|
+
*
|
|
98
|
+
* @param {import("ol").Feature} feature - The selected feature.
|
|
99
|
+
*/
|
|
100
|
+
_handleFeatureSelectAndDeselect(feature: import("ol").Feature): void;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @param {number | string | undefined} featureId - The ID of the feature to hover.
|
|
104
|
+
* @param {Boolean} mouseOut - Flag indicating mouse out event.
|
|
105
|
+
*/
|
|
106
|
+
_handleHoverFeature(featureId: number | string | undefined, mouseOut?: boolean): void;
|
|
107
|
+
/**
|
|
108
|
+
* Initiates initial settings and event triggers upon the component's first update.
|
|
109
|
+
*/
|
|
110
|
+
firstUpdated(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Overrides createRenderRoot to handle shadow DOM.
|
|
113
|
+
*/
|
|
114
|
+
createRenderRoot(): this;
|
|
115
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
116
|
+
}
|
|
117
|
+
import { LitElement } from "lit";
|
|
118
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/components/list.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQE;IAEF;;OAEG;IACH,sBAAiB;IAEjB;;OAEG;IACH,sBAAiB;IAEjB;;OAEG;IACH,SAFS,MAAM,GAAG,MAAM,CAEhB;IAER;;OAEG;IACH,SAFS,MAAM,GAAG,MAAM,CAEhB;IAKN;;OAEG;IACH,YAAkB;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,MAAM,OAAO,IAAI,EAAE,OAAO,CAAC,CAEb;IAEvB;;;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,+CAiDC;CACF;2BA1LyC,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw.d.ts","sourceRoot":"","sources":["../../../../src/enums/draw.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/enums/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const STORIES_LAYERS_ARRAY: {
|
|
2
|
+
type: string;
|
|
3
|
+
source: {
|
|
4
|
+
type: string;
|
|
5
|
+
};
|
|
6
|
+
}[];
|
|
7
|
+
export const STORIES_VECTOR_LAYERS: {
|
|
8
|
+
type: string;
|
|
9
|
+
background: string;
|
|
10
|
+
properties: {
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
source: {
|
|
14
|
+
type: string;
|
|
15
|
+
url: string;
|
|
16
|
+
format: string;
|
|
17
|
+
attributions: string;
|
|
18
|
+
};
|
|
19
|
+
style: {
|
|
20
|
+
"stroke-color": string;
|
|
21
|
+
"stroke-width": number;
|
|
22
|
+
"fill-color": string;
|
|
23
|
+
};
|
|
24
|
+
}[];
|
|
25
|
+
export const STORIES_MAP_STYLE: "width: 400px; height: 300px;";
|
|
26
|
+
export const STORIES_DRAW_TYPES: {
|
|
27
|
+
id: string;
|
|
28
|
+
type: string;
|
|
29
|
+
}[];
|
|
30
|
+
//# sourceMappingURL=stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stories.d.ts","sourceRoot":"","sources":["../../../../src/enums/stories.js"],"names":[],"mappings":"AAAA;;;;;IAOE;AAEF;;;;;;;;;;;;;;;;;IAmBE;AAEF,+DAAgE;AAEhE;;;IAKE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../../src/enums/test.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-text-to-clipboard.d.ts","sourceRoot":"","sources":["../../../../src/helpers/copy-text-to-clipboard.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,kDAFW,MAAM,QAShB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default featuresToGeoJson;
|
|
2
|
+
/**
|
|
3
|
+
* Converts features to a GeoJSON representation.
|
|
4
|
+
*
|
|
5
|
+
* @param {import("ol").Feature[]} features
|
|
6
|
+
* @param {(Parameters<GeoJson["writeFeaturesObject"]>)["1"]} [options]
|
|
7
|
+
*/
|
|
8
|
+
declare function featuresToGeoJson(features: import("ol").Feature[], options?: ([features: import("ol").Feature<import("ol/geom").Geometry>[], options?: import("ol/format/Feature").WriteOptions])["1"]): import("geojson").FeatureCollection<import("geojson").Geometry, {
|
|
9
|
+
[name: string]: any;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=features-to-geojson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features-to-geojson.d.ts","sourceRoot":"","sources":["../../../../src/helpers/features-to-geojson.js"],"names":[],"mappings":";AAEA;;;;;GAKG;AACH,6CAHW,OAAO,IAAI,EAAE,OAAO,EAAE,YACtB,oHAA4C,CAAC,GAAG,CAAC;;GAK3D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default featureToWKT;
|
|
2
|
+
/**
|
|
3
|
+
* Converts features to a Well-Known Text (WKT) representation.
|
|
4
|
+
*
|
|
5
|
+
* @type {WKT["writeFeatures"]}
|
|
6
|
+
*/
|
|
7
|
+
declare const featureToWKT: WKT["writeFeatures"];
|
|
8
|
+
import WKT from "ol/format/WKT.js";
|
|
9
|
+
//# sourceMappingURL=features-to-wkt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features-to-wkt.d.ts","sourceRoot":"","sources":["../../../../src/helpers/features-to-wkt.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,4BAFU,GAAG,CAAC,eAAe,CAAC,CAK5B;gBAVc,kBAAkB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initializes upload-related event listeners for drag-and-drop interactions on a map element.
|
|
3
|
+
* It configures the map to react visually to drag-and-drop actions and processes dropped files.
|
|
4
|
+
*
|
|
5
|
+
* @param {import("../main.js").EOxDrawTools} EOxDrawTool - The drawing tool instance.
|
|
6
|
+
* @param {import("@eox/map/main").EOxMap} EOxMap - The EOx Map instance.
|
|
7
|
+
*/
|
|
8
|
+
export function initMapDragDropImport(EOxDrawTool: import("../main.js").EOxDrawTools, EOxMap: any): void;
|
|
9
|
+
/**
|
|
10
|
+
* Handles file input from drag-and-drop or file selection events,
|
|
11
|
+
* forwarding each file to a specified processing function.
|
|
12
|
+
*
|
|
13
|
+
* @param {DragEvent | Event} e - The event object from the file input interaction.
|
|
14
|
+
* @param {import("../main.js").EOxDrawTools} EOxDrawTool - The drawing tool instance.
|
|
15
|
+
*/
|
|
16
|
+
export function handleFiles(e: DragEvent | Event, EOxDrawTool: import("../main.js").EOxDrawTools): void;
|
|
17
|
+
//# sourceMappingURL=generate-upload-events.d.ts.map
|
|
@@ -0,0 +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,qBA8B3C;AAaD;;;;;;GAMG;AACH,+BAHW,SAAS,GAAG,KAAK,eACjB,OAAO,YAAY,EAAE,YAAY,QAS3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/index.js"],"names":[],"mappings":""}
|