@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
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manage drawn features on a map
|
|
3
|
+
*
|
|
4
|
+
* @element eox-drawtools
|
|
5
|
+
*/
|
|
6
|
+
export class EOxDrawTools extends LitElement {
|
|
7
|
+
static get properties(): {
|
|
8
|
+
allowModify: {
|
|
9
|
+
attribute: string;
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
};
|
|
12
|
+
for: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
currentlyDrawing: {
|
|
16
|
+
attribute: boolean;
|
|
17
|
+
state: boolean;
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
};
|
|
20
|
+
draw: {
|
|
21
|
+
attribute: boolean;
|
|
22
|
+
state: boolean;
|
|
23
|
+
};
|
|
24
|
+
drawLayer: {
|
|
25
|
+
attribute: boolean;
|
|
26
|
+
state: boolean;
|
|
27
|
+
};
|
|
28
|
+
layerId: {
|
|
29
|
+
attribute: string;
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
};
|
|
32
|
+
drawnFeatures: {
|
|
33
|
+
attribute: boolean;
|
|
34
|
+
state: boolean;
|
|
35
|
+
type: ArrayConstructor;
|
|
36
|
+
};
|
|
37
|
+
modify: {
|
|
38
|
+
attribute: boolean;
|
|
39
|
+
state: boolean;
|
|
40
|
+
};
|
|
41
|
+
multipleFeatures: {
|
|
42
|
+
attribute: string;
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
};
|
|
45
|
+
importFeatures: {
|
|
46
|
+
attribute: string;
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
};
|
|
49
|
+
showEditor: {
|
|
50
|
+
attribute: string;
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
};
|
|
53
|
+
showList: {
|
|
54
|
+
attribute: string;
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
};
|
|
57
|
+
projection: {
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
};
|
|
60
|
+
noShadow: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
};
|
|
63
|
+
format: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
};
|
|
66
|
+
type: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
};
|
|
69
|
+
unstyled: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Allow modifying the drawn feature(s)
|
|
75
|
+
*/
|
|
76
|
+
allowModify: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Query selector of an `eox-map` (`String`, passed as an attribute or property)
|
|
79
|
+
* or an `eox-map` DOM element (`HTMLElement`, passed as property)
|
|
80
|
+
*
|
|
81
|
+
* @type {String|HTMLElement}
|
|
82
|
+
*/
|
|
83
|
+
for: string | HTMLElement;
|
|
84
|
+
/**
|
|
85
|
+
* Whether the user is currently in the process of drawing or not
|
|
86
|
+
*/
|
|
87
|
+
currentlyDrawing: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* The current native OpenLayers `draw` interaction
|
|
90
|
+
* @type import("ol/interaction").Draw | import("@eox/map/src/helpers").EOxSelectInteraction
|
|
91
|
+
*/
|
|
92
|
+
draw: import("ol/interaction").Draw | any;
|
|
93
|
+
/**
|
|
94
|
+
* The current native OpenLayers draw `layer` (initialized with a `zIndex` of 100)
|
|
95
|
+
* @type import("ol/layer/Vector").default
|
|
96
|
+
*/
|
|
97
|
+
drawLayer: import("ol/layer/Vector").default;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
*
|
|
101
|
+
* @type {string}
|
|
102
|
+
*/
|
|
103
|
+
set layerId(value: string);
|
|
104
|
+
get layerId(): string;
|
|
105
|
+
/**
|
|
106
|
+
* The array of drawn native OpenLayers features. Normally includes only one feature, until multiple feature drawing is enabled.
|
|
107
|
+
* @type Array<import("ol").Feature>
|
|
108
|
+
*/
|
|
109
|
+
drawnFeatures: Array<import("ol").Feature>;
|
|
110
|
+
/**
|
|
111
|
+
* The current native OpenLayers `modify` interaction
|
|
112
|
+
* @type import("ol/interaction").Modify
|
|
113
|
+
*/
|
|
114
|
+
modify: import("ol/interaction").Modify;
|
|
115
|
+
/**
|
|
116
|
+
* Allow adding more than one feature at a time
|
|
117
|
+
*/
|
|
118
|
+
multipleFeatures: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Allow import features using drag-drop and upload button
|
|
121
|
+
*/
|
|
122
|
+
importFeatures: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Show geo-json editor for draw tool
|
|
125
|
+
*/
|
|
126
|
+
showEditor: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Show list of features
|
|
129
|
+
*/
|
|
130
|
+
showList: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Projection of the emitted drawn features
|
|
133
|
+
*/
|
|
134
|
+
projection: string;
|
|
135
|
+
/**
|
|
136
|
+
* Type of the drawn feature
|
|
137
|
+
* @type {"Polygon" | "Point" | "LineString" | "Circle" | "Box"}
|
|
138
|
+
*/
|
|
139
|
+
type: "Polygon" | "Point" | "LineString" | "Circle" | "Box";
|
|
140
|
+
/**
|
|
141
|
+
* @type {ReturnType<typeof import("./methods/draw/create-select-handler").default>}
|
|
142
|
+
*/
|
|
143
|
+
selectionEvents: ReturnType<typeof import("./methods/draw/create-select-handler").default>;
|
|
144
|
+
/**
|
|
145
|
+
* The format in which the drawn features should be emitted
|
|
146
|
+
*
|
|
147
|
+
* @default "feature"
|
|
148
|
+
* @type {"feature"| "geojson" | "wkt"}
|
|
149
|
+
*/
|
|
150
|
+
format: "feature" | "geojson" | "wkt";
|
|
151
|
+
/**
|
|
152
|
+
* Render the element without additional styles
|
|
153
|
+
*/
|
|
154
|
+
unstyled: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Renders the element without a shadow root
|
|
157
|
+
*
|
|
158
|
+
* @type {Boolean}
|
|
159
|
+
*/
|
|
160
|
+
noShadow: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* @onClick Event handler triggered to start drawing on the map.
|
|
163
|
+
*/
|
|
164
|
+
startDrawing(): void;
|
|
165
|
+
/**
|
|
166
|
+
* @onClick Event handler triggered to discard/stop drawing
|
|
167
|
+
* on the map and delete the drawn shapes.
|
|
168
|
+
*/
|
|
169
|
+
discardDrawing(): void;
|
|
170
|
+
/**
|
|
171
|
+
* @param {string} text - The string representation of the features to be parsed.
|
|
172
|
+
* @param {boolean} replaceFeatures - A boolean flag indicating whether to replace the existing features.
|
|
173
|
+
*/
|
|
174
|
+
handleFeatureChange(text: string, replaceFeatures?: boolean): void;
|
|
175
|
+
/**
|
|
176
|
+
* @param {DragEvent | Event} evt - The event object from the file input interaction.
|
|
177
|
+
*/
|
|
178
|
+
handleFilesChange(evt: DragEvent | Event): void;
|
|
179
|
+
/**
|
|
180
|
+
* @event onModifyEnd triggered when the modification of a shape is completed.
|
|
181
|
+
*/
|
|
182
|
+
onModifyEnd(): void;
|
|
183
|
+
/**
|
|
184
|
+
* Update #geoJSON with stringify feature.
|
|
185
|
+
*/
|
|
186
|
+
updateGeoJSON(): void;
|
|
187
|
+
/**
|
|
188
|
+
* Triggers different events when the drawing of a shape is completed.
|
|
189
|
+
*/
|
|
190
|
+
emitDrawnFeatures(): void;
|
|
191
|
+
/**
|
|
192
|
+
* initializes the EOxMap and OlMap instances
|
|
193
|
+
* And stores them in the private properties #eoxMap and #olMap, respectively.
|
|
194
|
+
* It then calls requestUpdate to trigger a re-render.
|
|
195
|
+
*/
|
|
196
|
+
firstUpdated(): void;
|
|
197
|
+
set eoxMap(value: import("../../map/src/main").EOxMap);
|
|
198
|
+
get eoxMap(): import("../../map/src/main").EOxMap;
|
|
199
|
+
updated(changedProperties: any): void;
|
|
200
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
201
|
+
#private;
|
|
202
|
+
}
|
|
203
|
+
import { LitElement } from "lit";
|
|
204
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAoBC;IAyBC;;OAEG;IACH,qBAAwB;IAExB;;;;;OAKG;IACH,KAFU,SAAO,WAAW,CAER;IAEpB;;OAEG;IACH,0BAA6B;IAE7B;;;OAGG;IACH,MAFS,OAAO,gBAAgB,EAAE,IAAI,MAAsD,CAE5E;IAEhB;;;OAGG;IAEH,WAHS,OAAO,iBAAiB,EAAE,OAAO,CAGrB;IA2EvB;;;;OAIG;IACH,2BAGC;IAED,sBAEC;IAhFC;;;OAGG;IACH,eAFS,MAAM,OAAO,IAAI,EAAE,OAAO,CAAC,CAEb;IAEvB;;;OAGG;IACH,QAFS,OAAO,gBAAgB,EAAE,MAAM,CAEtB;IAElB;;OAEG;IACH,0BAA6B;IAE7B;;OAEG;IACH,wBAA2B;IAE3B;;OAEG;IACH,oBAAuB;IAEvB;;OAEG;IACH,kBAAqB;IACrB;;OAEG;IACH,mBAA6B;IAE7B;;;OAGG;IACH,MAFU,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,CAE1C;IAErB;;OAEG;IACH,iBAFU,WAAW,cAAc,sCAAsC,EAAE,OAAO,CAAC,CAExD;IAE3B;;;;;OAKG;IACH,QAFU,SAAS,GAAE,SAAS,GAAG,KAAK,CAEf;IAEvB;;OAEG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAiBvB;;OAEG;IACH,qBAEC;IAED;;;OAGG;IACH,uBAEC;IAED;;;OAGG;IACH,0BAHW,MAAM,oBACN,OAAO,QASjB;IAED;;OAEG;IACH,uBAFW,SAAS,GAAG,KAAK,QAI3B;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,sBAMC;IAED;;OAEG;IACH,0BAaC;IASD;;;;OAIG;IACH,qBAUC;IAcD,uDAIC;IARD,kDAEC;IAVD,sCAMC;IAaD,+CA6CC;;CACF;2BA7VyC,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/methods/controller/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default updateButtonStatesMethod;
|
|
2
|
+
/**
|
|
3
|
+
* Update button state of draw and discard buttons based on specific conditions.
|
|
4
|
+
*
|
|
5
|
+
* @param {import("../../components/controller").EOxDrawToolsController} EoxDrawToolController - The controller instance.
|
|
6
|
+
* @returns {{ drawDisabled: boolean | import("lit").nothing, discardDisabled: boolean | import("lit").nothing }} - The updated button states.
|
|
7
|
+
*/
|
|
8
|
+
declare function updateButtonStatesMethod(EoxDrawToolController: import("../../components/controller").EOxDrawToolsController): {
|
|
9
|
+
drawDisabled: boolean | typeof import("lit-html").nothing;
|
|
10
|
+
discardDisabled: boolean | typeof import("lit-html").nothing;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=update-button-states.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-button-states.d.ts","sourceRoot":"","sources":["../../../../../src/methods/controller/update-button-states.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,iEAHW,OAAO,6BAA6B,EAAE,sBAAsB,GAC1D;IAAE,YAAY,EAAE,OAAO,oCAAwB,CAAC;IAAC,eAAe,EAAE,OAAO,oCAAwB,CAAA;CAAE,CAgB/G"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default createSelectHandler;
|
|
2
|
+
/**
|
|
3
|
+
* Factory function to create a select event handler
|
|
4
|
+
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
5
|
+
*/
|
|
6
|
+
declare function createSelectHandler(EoxDrawTool: import("../../main").EOxDrawTools): {
|
|
7
|
+
addSelectionEvent: () => void;
|
|
8
|
+
removeSelectionEvent: () => void;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=create-select-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default discardDrawingMethod;
|
|
2
|
+
/**
|
|
3
|
+
* Discards drawing on the map, resets drawing interactions and features,
|
|
4
|
+
* clears the source, and triggers updates.
|
|
5
|
+
*
|
|
6
|
+
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
7
|
+
*/
|
|
8
|
+
declare function discardDrawingMethod(EoxDrawTool: import("../../main").EOxDrawTools): void;
|
|
9
|
+
//# sourceMappingURL=discard-drawing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discard-drawing.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/discard-drawing.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,mDAFW,OAAO,YAAY,EAAE,YAAY,QAwB3C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default emitDrawnFeaturesMethod;
|
|
2
|
+
/**
|
|
3
|
+
* *
|
|
4
|
+
*/
|
|
5
|
+
export type EmitFormat = import("ol").Feature[] | ReturnType<typeof featuresToGeoJson> | ReturnType<typeof featuresToWKT>;
|
|
6
|
+
/***
|
|
7
|
+
* @typedef {import("ol").Feature[]
|
|
8
|
+
* | ReturnType<typeof featuresToGeoJson>
|
|
9
|
+
* | ReturnType<typeof featuresToWKT>} EmitFormat
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Emits drawn features after a timeout to allow updating drawn features.
|
|
13
|
+
*
|
|
14
|
+
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
15
|
+
* @param {(value:EmitFormat) => void} drawUpdateEvent - event to be triggered after drawFeature is updated
|
|
16
|
+
*/
|
|
17
|
+
declare function emitDrawnFeaturesMethod(EoxDrawTool: import("../../main").EOxDrawTools, drawUpdateEvent: (value: EmitFormat) => void): void;
|
|
18
|
+
import { featuresToGeoJson } from "../../helpers";
|
|
19
|
+
import { featuresToWKT } from "../../helpers";
|
|
20
|
+
//# sourceMappingURL=emit-drawn-features.d.ts.map
|
|
@@ -0,0 +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,WAAW,wBAAwB,CAAC,GACpC,WAAW,oBAAoB,CAAC;AAHrC;;;;GAIG;AAEH;;;;;GAKG;AACH,sDAHW,OAAO,YAAY,EAAE,YAAY,mBACjC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,QA+CpC;kCA3DgD,eAAe;8BAAf,eAAe"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default handleLayerId;
|
|
2
|
+
/**
|
|
3
|
+
* handles switching between selection and drawing and updates of the selection layer
|
|
4
|
+
*
|
|
5
|
+
* @param {import("../../main").EOxDrawTools} EoxDrawTool
|
|
6
|
+
* @param {import("@eox/map/src/main").EOxMap} EoxMap
|
|
7
|
+
* @param {string} oldLayerId
|
|
8
|
+
* @param {string} updatedLayerId
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
declare function handleLayerId(EoxDrawTool: import("../../main").EOxDrawTools, EoxMap: any, updatedLayerId: string, oldLayerId: string): void;
|
|
12
|
+
//# sourceMappingURL=handle-layer-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handle-layer-id.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/handle-layer-id.js"],"names":[],"mappings":";AAEA;;;;;;;;GAQG;AACH,4CANW,OAAO,YAAY,EAAE,YAAY,+BAGjC,MAAM,cADN,MAAM,QAuBhB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as onDrawEndMethod } from "./on-draw-end";
|
|
2
|
+
export { default as startDrawingMethod } from "./start-drawing";
|
|
3
|
+
export { default as initLayerMethod } from "./init-layer.js";
|
|
4
|
+
export { default as discardDrawingMethod } from "./discard-drawing";
|
|
5
|
+
export { default as emitDrawnFeaturesMethod } from "./emit-drawn-features";
|
|
6
|
+
export { default as createSelectHandler } from "./create-select-handler";
|
|
7
|
+
export { default as initSelection } from "./init-selection";
|
|
8
|
+
export { default as handleLayerId } from "./handle-layer-id";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default initLayerMethod;
|
|
2
|
+
/**
|
|
3
|
+
* Initializes the draw layer, interacts with the map, and returns map instances.
|
|
4
|
+
*
|
|
5
|
+
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
6
|
+
* @param {Boolean} multipleFeatures - Allow adding more than one feature at a time
|
|
7
|
+
* @returns {{EoxMap: import("@eox/map/src/main").EOxMap, OlMap: import("ol").Map}} - The map instances.
|
|
8
|
+
*/
|
|
9
|
+
declare function initLayerMethod(EoxDrawTool: import("../../main").EOxDrawTools, multipleFeatures: boolean): {
|
|
10
|
+
EoxMap: any;
|
|
11
|
+
OlMap: import("ol").Map;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=init-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-layer.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/init-layer.js"],"names":[],"mappings":";AAIA;;;;;;GAMG;AACH,8CAJW,OAAO,YAAY,EAAE,YAAY,8BAE/B;IAAC,MAAM,MAAqC;IAAC,KAAK,EAAE,OAAO,IAAI,EAAE,GAAG,CAAA;CAAC,CA+EjF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default initSelection;
|
|
2
|
+
/**
|
|
3
|
+
* Initializes the selection interactions for the given layer ID to the DrawTool.
|
|
4
|
+
*
|
|
5
|
+
* @param {import('../../main').EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
6
|
+
* @param {import("@eox/map/src/main").EOxMap} EoxMap - The map instance.
|
|
7
|
+
*/
|
|
8
|
+
declare function initSelection(EoxDrawTool: import('../../main').EOxDrawTools, EoxMap: any, updatedLayerId: any): void;
|
|
9
|
+
//# sourceMappingURL=init-selection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-selection.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/init-selection.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,4CAHW,OAAO,YAAY,EAAE,YAAY,0CAiE3C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default onDrawEndMethod;
|
|
2
|
+
/**
|
|
3
|
+
* Handles actions after drawing ends -
|
|
4
|
+
* emits drawn features, deactivates drawing, and requests an update.
|
|
5
|
+
*
|
|
6
|
+
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
7
|
+
*/
|
|
8
|
+
declare function onDrawEndMethod(EoxDrawTool: import("../../main").EOxDrawTools): void;
|
|
9
|
+
//# sourceMappingURL=on-draw-end.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,QAgB3C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default startDrawingMethod;
|
|
2
|
+
/**
|
|
3
|
+
* Initiates the drawing process by initializing the draw layer,
|
|
4
|
+
* activating drawing, and updating the drawing status.
|
|
5
|
+
*
|
|
6
|
+
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
7
|
+
*/
|
|
8
|
+
declare function startDrawingMethod(EoxDrawTool: import("../../main").EOxDrawTools): void;
|
|
9
|
+
//# sourceMappingURL=start-drawing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-drawing.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/start-drawing.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,iDAFW,OAAO,YAAY,EAAE,YAAY,QAqB3C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default deleteFeatureMethod;
|
|
2
|
+
/**
|
|
3
|
+
* Deletes a feature when clicked on the delete button.
|
|
4
|
+
*
|
|
5
|
+
* @param {Event & { target: HTMLButtonElement }} evt - Event object containing button target.
|
|
6
|
+
* @param {import("../../components/list").EOxDrawToolsList} EoxDrawToolList - The list of drawn features.
|
|
7
|
+
*/
|
|
8
|
+
declare function deleteFeatureMethod(evt: Event & {
|
|
9
|
+
target: HTMLButtonElement;
|
|
10
|
+
}, EoxDrawToolList: import("../../components/list").EOxDrawToolsList): void;
|
|
11
|
+
//# sourceMappingURL=delete-feature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-feature.d.ts","sourceRoot":"","sources":["../../../../../src/methods/list/delete-feature.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,0CAHW,KAAK,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,mBACrC,OAAO,uBAAuB,EAAE,gBAAgB,QAiB1D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default firstUpdatedMethod;
|
|
2
|
+
/**
|
|
3
|
+
* Handles initial settings and event triggers upon the component's first update.
|
|
4
|
+
*
|
|
5
|
+
* @param {import("../../components/list").EOxDrawToolsList} EoxDrawToolList - The list of drawn features.
|
|
6
|
+
*/
|
|
7
|
+
declare function firstUpdatedMethod(EoxDrawToolList: import("../../components/list").EOxDrawToolsList): void;
|
|
8
|
+
//# sourceMappingURL=first-update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"first-update.d.ts","sourceRoot":"","sources":["../../../../../src/methods/list/first-update.js"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,qDAFW,OAAO,uBAAuB,EAAE,gBAAgB,QAyB1D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default hoverFeatureMethod;
|
|
2
|
+
/**
|
|
3
|
+
* Handles the hover effect on a feature within the list.
|
|
4
|
+
*
|
|
5
|
+
* @param {import("../../components/list").EOxDrawToolsList} EoxDrawToolList - The list of drawn features.
|
|
6
|
+
* @param {number | string | undefined} featureId - The ID of the feature to hover.
|
|
7
|
+
* @param {Boolean} mouseOut - Flag indicating mouse out event.
|
|
8
|
+
*/
|
|
9
|
+
declare function hoverFeatureMethod(EoxDrawToolList: import("../../components/list").EOxDrawToolsList, featureId: number | string | undefined, mouseOut: boolean): void;
|
|
10
|
+
//# sourceMappingURL=hover-feature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hover-feature.d.ts","sourceRoot":"","sources":["../../../../../src/methods/list/hover-feature.js"],"names":[],"mappings":";AAAA;;;;;;GAMG;AACH,qDAJW,OAAO,uBAAuB,EAAE,gBAAgB,aAChD,MAAM,GAAG,MAAM,GAAG,SAAS,2BAUrC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as firstUpdatedMethod } from "./first-update";
|
|
2
|
+
export { default as hoverFeatureMethod } from "./hover-feature";
|
|
3
|
+
export { default as deleteFeatureMethod } from "./delete-feature";
|
|
4
|
+
export { default as selectAndDeselectFeatureMethod } from "./select-deselect-feature";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/methods/list/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default selectAndDeselectFeature;
|
|
2
|
+
/**
|
|
3
|
+
* Handles selecting and deselecting a feature on the map.
|
|
4
|
+
*
|
|
5
|
+
* @param {import("ol").Feature} feature - The selected feature.
|
|
6
|
+
* @param {import("../../components/list").EOxDrawToolsList} EoxDrawToolList - The list of drawn features.
|
|
7
|
+
*/
|
|
8
|
+
declare function selectAndDeselectFeature(feature: import("ol").Feature, EoxDrawToolList: import("../../components/list").EOxDrawToolsList): void;
|
|
9
|
+
//# sourceMappingURL=select-deselect-feature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-deselect-feature.d.ts","sourceRoot":"","sources":["../../../../../src/methods/list/select-deselect-feature.js"],"names":[],"mappings":";AAEA;;;;;GAKG;AACH,mDAHW,OAAO,IAAI,EAAE,OAAO,mBACpB,OAAO,uBAAuB,EAAE,gBAAgB,QAsB1D"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const styleEOX: "\n button.discard:before {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23FF5252' viewBox='0 0 24 24'%3E%3Ctitle%3Etrash-can-outline%3C/title%3E%3Cpath d='M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z' /%3E%3C/svg%3E\")\n }\n button.pointer:before {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Ecursor-default-click%3C/title%3E%3Cpath d='M10.76,8.69A0.76,0.76 0 0,0 10,9.45V20.9C10,21.32 10.34,21.66 10.76,21.66C10.95,21.66 11.11,21.6 11.24,21.5L13.15,19.95L14.81,23.57C14.94,23.84 15.21,24 15.5,24C15.61,24 15.72,24 15.83,23.92L18.59,22.64C18.97,22.46 19.15,22 18.95,21.63L17.28,18L19.69,17.55C19.85,17.5 20,17.43 20.12,17.29C20.39,16.97 20.35,16.5 20,16.21L11.26,8.86L11.25,8.87C11.12,8.76 10.95,8.69 10.76,8.69M15,10V8H20V10H15M13.83,4.76L16.66,1.93L18.07,3.34L15.24,6.17L13.83,4.76M10,0H12V5H10V0M3.93,14.66L6.76,11.83L8.17,13.24L5.34,16.07L3.93,14.66M3.93,3.34L5.34,1.93L8.17,4.76L6.76,6.17L3.93,3.34M7,10H2V8H7V10' /%3E%3C/svg%3E\");\n }\n button.polygon:before {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eshape-polygon-plus%3C/title%3E%3Cpath d='M17,15.7V13H19V17L10,21L3,14L7,5H11V7H8.3L5.4,13.6L10.4,18.6L17,15.7M22,5V7H19V10H17V7H14V5H17V2H19V5H22Z' /%3E%3C/svg%3E\");\n }\n button.import:before {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eupload%3C/title%3E%3Cpath fill='%23004170' d='M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z' /%3E%3C/svg%3E\");\n }\n .wrap-btn {\n display: flex;\n justify-content: space-between;\n }\n eox-drawtools-list {\n width: 100%;\n }\n .json-wrapper {\n margin: 0.4rem 0rem;\n padding: 0.75rem;\n background: var(--secondary-color-hover);\n position: relative;\n }\n .json-wrapper textarea {\n height: 200px;\n }\n .icon-copy {\n position: absolute;\n bottom: 26px;\n right: 26px;\n border-radius: 4px;\n height: 26px;\n padding: 4px 6px;\n }\n .icon-copy:before {\n width: 14px;\n min-width: 14px;\n height: 14px;\n display: flex margin-right: 6px;\n color: white;\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Econtent-copy%3C/title%3E%3Cpath d='M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z' fill='white' /%3E%3C/svg%3E\")\n }\n";
|
|
2
|
+
//# sourceMappingURL=style.eox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.eox.d.ts","sourceRoot":"","sources":["../../../src/style.eox.js"],"names":[],"mappings":"AAAA,qnFA6CE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom element for comparing two map layers or images using a slider.
|
|
3
|
+
* This component creates a split-screen view with an adjustable slider to compare two images or layers.
|
|
4
|
+
*/
|
|
5
|
+
export class EOxMapCompare extends LitElement {
|
|
6
|
+
static get properties(): {
|
|
7
|
+
value: {
|
|
8
|
+
attribute: string;
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
};
|
|
11
|
+
enabled: {
|
|
12
|
+
attribute: string;
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The current position of the comparison slider (0 to 100).
|
|
18
|
+
* @type {Number}
|
|
19
|
+
*/
|
|
20
|
+
value: number;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the comparison is enabled and which part is visible.
|
|
23
|
+
* Accepts values: "first", "second", or "true" (default).
|
|
24
|
+
* @type {String}
|
|
25
|
+
*/
|
|
26
|
+
enabled: string;
|
|
27
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
28
|
+
#private;
|
|
29
|
+
}
|
|
30
|
+
import { LitElement } from "lit";
|
|
31
|
+
//# sourceMappingURL=compare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../../../../map/src/components/compare.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH;IACE;;;;;;;;;MAKC;IAKC;;;OAGG;IACH,cAAe;IAEf;;;;OAIG;IACH,gBAAqB;IAYvB,+CAsHC;;CACF;2BAhKgC,KAAK"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom element that serves as a tooltip for the map.
|
|
3
|
+
* Displays information about map features in a styled format.
|
|
4
|
+
*/
|
|
5
|
+
export class EOxMapTooltip extends LitElement {
|
|
6
|
+
static get properties(): {
|
|
7
|
+
feature: {
|
|
8
|
+
attribute: boolean;
|
|
9
|
+
property: boolean;
|
|
10
|
+
type: ObjectConstructor;
|
|
11
|
+
};
|
|
12
|
+
propertyTransform: {
|
|
13
|
+
attribute: boolean;
|
|
14
|
+
property: boolean;
|
|
15
|
+
type: FunctionConstructor;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The rendered feature.
|
|
20
|
+
*
|
|
21
|
+
* @type {import("ol/Feature").default | import("ol/render/Feature").default}
|
|
22
|
+
*/
|
|
23
|
+
feature: import("ol/Feature").default | import("ol/render/Feature").default;
|
|
24
|
+
/**
|
|
25
|
+
* A function to transform properties before rendering.
|
|
26
|
+
*
|
|
27
|
+
* @type {Function}
|
|
28
|
+
* @param {{ key: string; value: unknown }} property
|
|
29
|
+
* @param {import("ol/Feature").default | import("ol/render/Feature").default} _feature
|
|
30
|
+
*/
|
|
31
|
+
propertyTransform: Function;
|
|
32
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
33
|
+
}
|
|
34
|
+
import { LitElement } from "lit";
|
|
35
|
+
import { nothing } from "lit";
|
|
36
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../../map/src/components/tooltip.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH;IACE;;;;;;;;;;;MAKC;IAKC;;;;OAIG;IACH,SAFU,OAAO,YAAY,EAAE,OAAO,GAAG,OAAO,mBAAmB,EAAE,OAAO,CAEzD;IAEnB;;;;;;OAMG;IACH,4BAAyD;IAG3D,gEA4BC;CACF;2BA/DyC,KAAK;wBAAL,KAAK"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds a control to the map and to the `mapControls` dictionary if it doesn't exist yet.
|
|
3
|
+
* Removes and remakes the control if the options differ; otherwise, leaves the control untouched.
|
|
4
|
+
*
|
|
5
|
+
* @param {import("../main").EOxMap} EOxMap - The map instance.
|
|
6
|
+
* @param {ControlDictionary} existingControls - Dictionary of existing controls.
|
|
7
|
+
* @param {ControlType} type - The type of control to add or update.
|
|
8
|
+
* @param {object} options - Options for the control.
|
|
9
|
+
*/
|
|
10
|
+
export function addOrUpdateControl(EOxMap: import("../main").EOxMap, existingControls: ControlDictionary, type: ControlType, options: object): void;
|
|
11
|
+
/**
|
|
12
|
+
* Adds a control to the map.
|
|
13
|
+
*
|
|
14
|
+
* @param {import("../main").EOxMap} EOxMap - The map instance.
|
|
15
|
+
* @param {ControlType} type - The type of control to add.
|
|
16
|
+
* @param {object} options - Options for the control.
|
|
17
|
+
*/
|
|
18
|
+
export function addControl(EOxMap: import("../main").EOxMap, type: ControlType, options: object): void;
|
|
19
|
+
/**
|
|
20
|
+
* Adds initial controls from web component properties, if any are given.
|
|
21
|
+
*
|
|
22
|
+
* @param {import("../main").EOxMap} EOxMap - The map instance.
|
|
23
|
+
*/
|
|
24
|
+
export function addInitialControls(EOxMap: import("../main").EOxMap): void;
|
|
25
|
+
export type ControlDictionary = import("../../types").ControlDictionary;
|
|
26
|
+
export type ControlType = import("../../types").ControlType;
|
|
27
|
+
//# sourceMappingURL=controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../../../map/src/controls/controls.js"],"names":[],"mappings":"AAgBA;;;;;;;;GAQG;AACH,2CALW,OAAO,SAAS,EAAE,MAAM,oBACxB,iBAAiB,QACjB,WAAW,WACX,MAAM,QAiBhB;AAED;;;;;;GAMG;AACH,mCAJW,OAAO,SAAS,EAAE,MAAM,QACxB,WAAW,WACX,MAAM,QAmBhB;AAED;;;;GAIG;AACH,2CAFW,OAAO,SAAS,EAAE,MAAM,QAsClC;gCAvGY,OAAO,aAAa,EAAE,iBAAiB;0BACvC,OAAO,aAAa,EAAE,WAAW"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import("../../types").GeolocationOptions} GeolocationOptions
|
|
3
|
+
*/
|
|
4
|
+
export default class GeolocationControl extends Control {
|
|
5
|
+
/**
|
|
6
|
+
* @param {GeolocationOptions} [opt_options] - Control options.
|
|
7
|
+
*/
|
|
8
|
+
constructor(opt_options?: GeolocationOptions);
|
|
9
|
+
_centerWhenReady: boolean;
|
|
10
|
+
_highAccuracy: boolean;
|
|
11
|
+
_trackAccuracy: boolean;
|
|
12
|
+
_trackHeading: boolean;
|
|
13
|
+
_positionFeature: Feature<Point>;
|
|
14
|
+
_source: VectorSource<Feature<Point>>;
|
|
15
|
+
_accuracyFeature: Feature<import("ol/geom").Geometry>;
|
|
16
|
+
_layer: VectorLayer<VectorSource<Feature<Point>>, Feature<Point>>;
|
|
17
|
+
/**
|
|
18
|
+
* Initializes the geolocation control.
|
|
19
|
+
* This will prompt the user for geolocation permissions in the browser.
|
|
20
|
+
*/
|
|
21
|
+
initGeolocation(): Promise<any>;
|
|
22
|
+
_geolocation: Geolocation;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the geolocation control element.
|
|
25
|
+
*
|
|
26
|
+
* @returns {HTMLElement} - The control element.
|
|
27
|
+
*/
|
|
28
|
+
getElement(): HTMLElement;
|
|
29
|
+
/**
|
|
30
|
+
* Centers the map on the position of the geolocation, if possible.
|
|
31
|
+
*/
|
|
32
|
+
centerOnPosition(): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
export type GeolocationOptions = import("../../types").GeolocationOptions;
|
|
35
|
+
import { Control } from "ol/control";
|
|
36
|
+
import Point from "ol/geom/Point";
|
|
37
|
+
import Feature from "ol/Feature";
|
|
38
|
+
import { Vector as VectorSource } from "ol/source";
|
|
39
|
+
import { Vector as VectorLayer } from "ol/layer";
|
|
40
|
+
import Geolocation from "ol/Geolocation";
|
|
41
|
+
//# sourceMappingURL=geo-location.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geo-location.d.ts","sourceRoot":"","sources":["../../../../../map/src/controls/geo-location.js"],"names":[],"mappings":"AAQA;;GAEG;AAEH;IACE;;OAEG;IACH,0BAFW,kBAAkB,EA4E5B;IAvCC,0BAA+C;IAC/C,uBAAyC;IACzC,wBAA2C;IAC3C,uBAAyC;IAGzC,iCAGE;IAGF,sCAEE;IAIA,sDAAqC;IAYvC,kEAAuD;IA6BzD;;;OAGG;IACH,gCA4CC;IAxCK,0BAIE;IAsCR;;;;OAIG;IACH,cAFa,WAAW,CAIvB;IAED;;OAEG;IACH,kCAUC;CACF;iCA9KY,OAAO,aAAa,EAAE,kBAAkB;wBAT7B,YAAY;kBAGlB,eAAe;oBAFb,YAAY;uCAGO,WAAW;sCACZ,UAAU;wBAHxB,gBAAgB"}
|