@eox/drawtools 1.3.0 → 1.4.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.
Files changed (179) hide show
  1. package/dist/eox-drawtools.js +4188 -7348
  2. package/dist/eox-drawtools.umd.cjs +57 -57
  3. package/package.json +7 -7
  4. package/src/main.js +50 -3
  5. package/src/methods/draw/index.js +5 -0
  6. package/src/methods/draw/on-key-down.js +16 -0
  7. package/src/methods/draw/remove-feature.js +27 -0
  8. package/src/methods/draw/start-drawing.js +0 -9
  9. package/types/components/controller.d.ts.map +1 -0
  10. package/types/{drawtools/src/components → components}/list.d.ts +3 -3
  11. package/types/components/list.d.ts.map +1 -0
  12. package/types/{drawtools/src/enums → enums}/draw.d.ts.map +1 -1
  13. package/types/{drawtools/src/enums → enums}/index.d.ts.map +1 -1
  14. package/types/enums/stories.d.ts.map +1 -0
  15. package/types/{drawtools/src/enums → enums}/test.d.ts.map +1 -1
  16. package/types/helpers/copy-text-to-clipboard.d.ts.map +1 -0
  17. package/types/helpers/features-to-geojson.d.ts.map +1 -0
  18. package/types/helpers/features-to-wkt.d.ts.map +1 -0
  19. package/types/{drawtools/src/helpers → helpers}/generate-upload-events.d.ts +1 -1
  20. package/types/helpers/generate-upload-events.d.ts.map +1 -0
  21. package/types/{drawtools/src/helpers → helpers}/index.d.ts.map +1 -1
  22. package/types/{drawtools/src/main.d.ts → main.d.ts} +34 -6
  23. package/types/main.d.ts.map +1 -0
  24. package/types/methods/controller/index.d.ts.map +1 -0
  25. package/types/methods/controller/update-button-states.d.ts.map +1 -0
  26. package/types/methods/draw/create-select-handler.d.ts.map +1 -0
  27. package/types/methods/draw/discard-drawing.d.ts.map +1 -0
  28. package/types/methods/draw/emit-drawn-features.d.ts.map +1 -0
  29. package/types/{drawtools/src/methods → methods}/draw/handle-layer-id.d.ts +1 -1
  30. package/types/methods/draw/handle-layer-id.d.ts.map +1 -0
  31. package/types/{drawtools/src/methods → methods}/draw/index.d.ts +2 -0
  32. package/types/{map/src/enums → methods/draw}/index.d.ts.map +1 -1
  33. package/types/{drawtools/src/methods → methods}/draw/init-layer.d.ts +2 -2
  34. package/types/methods/draw/init-layer.d.ts.map +1 -0
  35. package/types/methods/draw/init-measuring.d.ts.map +1 -0
  36. package/types/{drawtools/src/methods → methods}/draw/init-selection.d.ts +1 -1
  37. package/types/methods/draw/init-selection.d.ts.map +1 -0
  38. package/types/methods/draw/on-draw-end.d.ts.map +1 -0
  39. package/types/methods/draw/on-key-down.d.ts +10 -0
  40. package/types/methods/draw/on-key-down.d.ts.map +1 -0
  41. package/types/methods/draw/remove-feature.d.ts +15 -0
  42. package/types/methods/draw/remove-feature.d.ts.map +1 -0
  43. package/types/methods/draw/start-drawing.d.ts.map +1 -0
  44. package/types/methods/list/delete-feature.d.ts.map +1 -0
  45. package/types/methods/list/first-update.d.ts.map +1 -0
  46. package/types/methods/list/hover-feature.d.ts.map +1 -0
  47. package/types/{map/src/helpers → methods/list}/index.d.ts.map +1 -1
  48. package/types/methods/list/select-deselect-feature.d.ts.map +1 -0
  49. package/types/{drawtools/src/style.eox.d.ts.map → style.eox.d.ts.map} +1 -1
  50. package/types/drawtools/src/components/controller.d.ts.map +0 -1
  51. package/types/drawtools/src/components/list.d.ts.map +0 -1
  52. package/types/drawtools/src/enums/stories.d.ts.map +0 -1
  53. package/types/drawtools/src/helpers/copy-text-to-clipboard.d.ts.map +0 -1
  54. package/types/drawtools/src/helpers/features-to-geojson.d.ts.map +0 -1
  55. package/types/drawtools/src/helpers/features-to-wkt.d.ts.map +0 -1
  56. package/types/drawtools/src/helpers/generate-upload-events.d.ts.map +0 -1
  57. package/types/drawtools/src/main.d.ts.map +0 -1
  58. package/types/drawtools/src/methods/controller/index.d.ts.map +0 -1
  59. package/types/drawtools/src/methods/controller/update-button-states.d.ts.map +0 -1
  60. package/types/drawtools/src/methods/draw/create-select-handler.d.ts.map +0 -1
  61. package/types/drawtools/src/methods/draw/discard-drawing.d.ts.map +0 -1
  62. package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts.map +0 -1
  63. package/types/drawtools/src/methods/draw/handle-layer-id.d.ts.map +0 -1
  64. package/types/drawtools/src/methods/draw/index.d.ts.map +0 -1
  65. package/types/drawtools/src/methods/draw/init-layer.d.ts.map +0 -1
  66. package/types/drawtools/src/methods/draw/init-measuring.d.ts.map +0 -1
  67. package/types/drawtools/src/methods/draw/init-selection.d.ts.map +0 -1
  68. package/types/drawtools/src/methods/draw/on-draw-end.d.ts.map +0 -1
  69. package/types/drawtools/src/methods/draw/start-drawing.d.ts.map +0 -1
  70. package/types/drawtools/src/methods/list/delete-feature.d.ts.map +0 -1
  71. package/types/drawtools/src/methods/list/first-update.d.ts.map +0 -1
  72. package/types/drawtools/src/methods/list/hover-feature.d.ts.map +0 -1
  73. package/types/drawtools/src/methods/list/index.d.ts.map +0 -1
  74. package/types/drawtools/src/methods/list/select-deselect-feature.d.ts.map +0 -1
  75. package/types/map/src/components/compare.d.ts +0 -31
  76. package/types/map/src/components/compare.d.ts.map +0 -1
  77. package/types/map/src/components/tooltip.d.ts +0 -41
  78. package/types/map/src/components/tooltip.d.ts.map +0 -1
  79. package/types/map/src/controls/GlobeSwitcher.d.ts +0 -19
  80. package/types/map/src/controls/GlobeSwitcher.d.ts.map +0 -1
  81. package/types/map/src/controls/controls.d.ts +0 -20
  82. package/types/map/src/controls/controls.d.ts.map +0 -1
  83. package/types/map/src/controls/geo-location.d.ts +0 -51
  84. package/types/map/src/controls/geo-location.d.ts.map +0 -1
  85. package/types/map/src/controls/loading-indicator.d.ts +0 -20
  86. package/types/map/src/controls/loading-indicator.d.ts.map +0 -1
  87. package/types/map/src/custom/layers/MapboxStyle.d.ts +0 -13
  88. package/types/map/src/custom/layers/MapboxStyle.d.ts.map +0 -1
  89. package/types/map/src/custom/sources/Cluster.d.ts +0 -24
  90. package/types/map/src/custom/sources/Cluster.d.ts.map +0 -1
  91. package/types/map/src/custom/sources/FlatGeoBuf.d.ts +0 -30
  92. package/types/map/src/custom/sources/FlatGeoBuf.d.ts.map +0 -1
  93. package/types/map/src/custom/sources/WMTSCapabilities.d.ts +0 -35
  94. package/types/map/src/custom/sources/WMTSCapabilities.d.ts.map +0 -1
  95. package/types/map/src/enums/index.d.ts +0 -2
  96. package/types/map/src/enums/map.d.ts +0 -5
  97. package/types/map/src/enums/map.d.ts.map +0 -1
  98. package/types/map/src/helpers/add-new-feature.d.ts +0 -15
  99. package/types/map/src/helpers/add-new-feature.d.ts.map +0 -1
  100. package/types/map/src/helpers/cancel-animation.d.ts +0 -7
  101. package/types/map/src/helpers/cancel-animation.d.ts.map +0 -1
  102. package/types/map/src/helpers/center.d.ts +0 -12
  103. package/types/map/src/helpers/center.d.ts.map +0 -1
  104. package/types/map/src/helpers/cluster-explode.d.ts +0 -42
  105. package/types/map/src/helpers/cluster-explode.d.ts.map +0 -1
  106. package/types/map/src/helpers/coordinates-roughly-equals.d.ts +0 -12
  107. package/types/map/src/helpers/coordinates-roughly-equals.d.ts.map +0 -1
  108. package/types/map/src/helpers/draw.d.ts +0 -22
  109. package/types/map/src/helpers/draw.d.ts.map +0 -1
  110. package/types/map/src/helpers/generate.d.ts +0 -32
  111. package/types/map/src/helpers/generate.d.ts.map +0 -1
  112. package/types/map/src/helpers/index.d.ts +0 -17
  113. package/types/map/src/helpers/interactions.d.ts +0 -16
  114. package/types/map/src/helpers/interactions.d.ts.map +0 -1
  115. package/types/map/src/helpers/layer.d.ts +0 -26
  116. package/types/map/src/helpers/layer.d.ts.map +0 -1
  117. package/types/map/src/helpers/parse-feature.d.ts +0 -8
  118. package/types/map/src/helpers/parse-feature.d.ts.map +0 -1
  119. package/types/map/src/helpers/parse-text.d.ts +0 -45
  120. package/types/map/src/helpers/parse-text.d.ts.map +0 -1
  121. package/types/map/src/helpers/register-projection-from-code.d.ts +0 -8
  122. package/types/map/src/helpers/register-projection-from-code.d.ts.map +0 -1
  123. package/types/map/src/helpers/register-projection.d.ts +0 -11
  124. package/types/map/src/helpers/register-projection.d.ts.map +0 -1
  125. package/types/map/src/helpers/select.d.ts +0 -99
  126. package/types/map/src/helpers/select.d.ts.map +0 -1
  127. package/types/map/src/helpers/tile-grid.d.ts +0 -10
  128. package/types/map/src/helpers/tile-grid.d.ts.map +0 -1
  129. package/types/map/src/helpers/transform.d.ts +0 -19
  130. package/types/map/src/helpers/transform.d.ts.map +0 -1
  131. package/types/map/src/layers.d.ts +0 -126
  132. package/types/map/src/layers.d.ts.map +0 -1
  133. package/types/map/src/main.d.ts +0 -481
  134. package/types/map/src/main.d.ts.map +0 -1
  135. package/types/map/src/methods/map/add-update-layer.d.ts +0 -13
  136. package/types/map/src/methods/map/add-update-layer.d.ts.map +0 -1
  137. package/types/map/src/methods/map/animate-to-state.d.ts +0 -7
  138. package/types/map/src/methods/map/animate-to-state.d.ts.map +0 -1
  139. package/types/map/src/methods/map/first-updated.d.ts +0 -9
  140. package/types/map/src/methods/map/first-updated.d.ts.map +0 -1
  141. package/types/map/src/methods/map/getters.d.ts +0 -22
  142. package/types/map/src/methods/map/getters.d.ts.map +0 -1
  143. package/types/map/src/methods/map/index.d.ts +0 -7
  144. package/types/map/src/methods/map/index.d.ts.map +0 -1
  145. package/types/map/src/methods/map/remove.d.ts +0 -22
  146. package/types/map/src/methods/map/remove.d.ts.map +0 -1
  147. package/types/map/src/methods/map/setters.d.ts +0 -83
  148. package/types/map/src/methods/map/setters.d.ts.map +0 -1
  149. package/types/map/src/plugins/globe/index.d.ts +0 -6
  150. package/types/map/src/plugins/globe/index.d.ts.map +0 -1
  151. package/types/map/src/plugins/globe/methods.d.ts +0 -8
  152. package/types/map/src/plugins/globe/methods.d.ts.map +0 -1
  153. package/types/map/src/plugins/globe/openglobus.d.ts +0 -25
  154. package/types/map/src/plugins/globe/openglobus.d.ts.map +0 -1
  155. package/types/map/src/types.d.ts +0 -193
  156. package/types/map/src/types.d.ts.map +0 -1
  157. /package/types/{drawtools/src/components → components}/controller.d.ts +0 -0
  158. /package/types/{drawtools/src/enums → enums}/draw.d.ts +0 -0
  159. /package/types/{drawtools/src/enums → enums}/index.d.ts +0 -0
  160. /package/types/{drawtools/src/enums → enums}/stories.d.ts +0 -0
  161. /package/types/{drawtools/src/enums → enums}/test.d.ts +0 -0
  162. /package/types/{drawtools/src/helpers → helpers}/copy-text-to-clipboard.d.ts +0 -0
  163. /package/types/{drawtools/src/helpers → helpers}/features-to-geojson.d.ts +0 -0
  164. /package/types/{drawtools/src/helpers → helpers}/features-to-wkt.d.ts +0 -0
  165. /package/types/{drawtools/src/helpers → helpers}/index.d.ts +0 -0
  166. /package/types/{drawtools/src/methods → methods}/controller/index.d.ts +0 -0
  167. /package/types/{drawtools/src/methods → methods}/controller/update-button-states.d.ts +0 -0
  168. /package/types/{drawtools/src/methods → methods}/draw/create-select-handler.d.ts +0 -0
  169. /package/types/{drawtools/src/methods → methods}/draw/discard-drawing.d.ts +0 -0
  170. /package/types/{drawtools/src/methods → methods}/draw/emit-drawn-features.d.ts +0 -0
  171. /package/types/{drawtools/src/methods → methods}/draw/init-measuring.d.ts +0 -0
  172. /package/types/{drawtools/src/methods → methods}/draw/on-draw-end.d.ts +0 -0
  173. /package/types/{drawtools/src/methods → methods}/draw/start-drawing.d.ts +0 -0
  174. /package/types/{drawtools/src/methods → methods}/list/delete-feature.d.ts +0 -0
  175. /package/types/{drawtools/src/methods → methods}/list/first-update.d.ts +0 -0
  176. /package/types/{drawtools/src/methods → methods}/list/hover-feature.d.ts +0 -0
  177. /package/types/{drawtools/src/methods → methods}/list/index.d.ts +0 -0
  178. /package/types/{drawtools/src/methods → methods}/list/select-deselect-feature.d.ts +0 -0
  179. /package/types/{drawtools/src/style.eox.d.ts → style.eox.d.ts} +0 -0
@@ -1,481 +0,0 @@
1
- /**
2
- * @typedef {import("./layers").EoxLayer} EoxLayer
3
- * @typedef {import("./types").EOxAnimationOptions} EOxAnimationOptions
4
- * @typedef {import("./types").ControlDictionary} ControlDictionary
5
- * @typedef {import("./types").ConfigObject} ConfigObject
6
- * @typedef {import("./types").ProjectionLike} ProjectionLike
7
- * @typedef {import("./types").AnyLayerWithSource} AnyLayerWithSource
8
- * @typedef {import("./types").GlobeConfig} GlobeConfig
9
- * */
10
- /**
11
- * The `eox-map` element is a powerful wrapper around [OpenLayers](https://openlayers.org/) that provides a declarative, highly configurable map element for web applications. It supports a wide range of layer types, sources, controls, and advanced features, making it suitable for interactive mapping, data visualization, and geospatial analysis.
12
- *
13
- * ## Basic usage:
14
- *
15
- * ```
16
- * import "@eox/map"
17
- *
18
- * <eox-map [...]></eox-map>
19
- * ```
20
- *
21
- * Some basic layers, sources and formats are included in the default bundle, for advanced usage it is
22
- * required to import the `advancedLayersAndSources` plugin.
23
- *
24
- * Included in the base bundle:
25
- * - Formats: `GeoJSON`, `MVT`
26
- * - Layers: `Group`, `Image`, `Tile`, `Vector`, `VectorTile`
27
- * - Sources: `ImageWMS`, `OSM`, `Tile`, `TileWMS`, `Vector`, `VectorTile`, `WMTS`, `XYZ`
28
- *
29
- * In order to use the rest of the layers and sources provided by OpenLayers, import the plugin as well:
30
- *
31
- * ```
32
- * import "@eox/map/src/plugins/advancedLayersAndSources"
33
- * import "@eox/map"
34
- *
35
- * <eox-map [...]></eox-map>
36
- * ```
37
- * Included in the advanced plugin bundle:
38
- * - Layers:
39
- * - All OpenLayers layer types
40
- * - [`STAC`](https://github.com/m-mohr/ol-stac)
41
- * - Sources:
42
- * - All OpenLayers source types
43
- * - [`WMTSCapabilities`](https://github.com/EOX-A/EOxElements/tree/main/elements/map/src/custom/sources/WMTSCapabilities.ts)
44
- * - Reprojection through [proj4](https://github.com/proj4js/proj4js)
45
- *
46
- * For usage and story examples, see the Storybook stories in `/elements/map/stories`.
47
- *
48
- * ## Features
49
- *
50
- * - **Layer Support:** Easily add and configure layers such as Tile, Vector, VectorTile, Image, Group, and advanced types like STAC, GeoTIFF, MapboxStyle, and FlatGeoBuf. Layers are passed via the `layers` property as an array of configuration objects.
51
- * - **Source Formats:** Supports GeoJSON, MVT, OSM, TileWMS, WMTS, XYZ, ImageWMS, and more. Advanced sources (e.g., WMTSCapabilities) are available via plugin import.
52
- * - **Controls:** Add built-in or custom controls (Zoom, Geolocation, LoadingIndicator, etc.) using the `controls` property. Controls can be configured and styled for various use cases.
53
- * - **Interactions:** Enable feature selection, hover, click, cluster-explode, and highlight interactions. Interactions are configured per layer and can trigger custom events.
54
- * - **Tooltips:** Built-in tooltip support via `<eox-map-tooltip></eox-map-tooltip>`, with options for property transformation, custom tooltips, and pixel/band value display for raster layers.
55
- * - **Layer Groups:** Organize layers into groups for complex compositions and hierarchical management.
56
- * - **Animations:** Animate view changes (zoom, center, extent) using the `animationOptions` property.
57
- * - **Projection & Transformation:** Change map projection, register custom projections, and transform coordinates/extents using helper methods.
58
- * - **Sync & Compare:** Synchronize multiple maps using the `sync` property, and compare maps side-by-side with `<eox-map-compare>`.
59
- * - **Config Object:** Pass a configuration object for advanced map setup and dynamic updates.
60
- * - **Scroll Prevention:** Prevent scroll/drag interactions for embedded maps using the `preventScroll` property.
61
- * - **Globe View:** Interactive 3D globe by using "globe" projection property. Configure via the `globeConfig` object.
62
- *
63
- * ## Events
64
- *
65
- * - `clusterSelect`: Fired when a cluster is selected.
66
- * - `loadend`: Fired when the map has finished loading.
67
- * - `mapmounted`: Fired when the map is successfully mounted.
68
- * - `select`: Fired when a feature is selected.
69
- * - `layerschanged`: Fired when the layers have been changed.
70
- *
71
- * ## Methods
72
- *
73
- * - `registerProjection`, `registerProjectionFromCode`: Register custom or EPSG projections.
74
- * - `getLayerById`, `getFlatLayersArray`: Retrieve layers by ID or as a flat array.
75
- * - `addOrUpdateLayer`, `removeInteraction`, `removeSelect`, `removeControl`: Manage layers and interactions programmatically.
76
- * - `parseFeature`: Parses a feature from the input data.
77
- * - `parseTextToFeature`: Parses text into a feature.
78
- *
79
- * Usage: `document.querySelector("eox-map").registerProjection([...]);`
80
- *
81
- * ## Additional Helper Methods
82
- *
83
- * - `buffer`: Applies a buffer around an extent
84
- * - `transform`, `transformExtent`: Transform coordinates and extents between projections.
85
- *
86
- * Usage: `import { buffer, transform, transformExtent } from "@eox/map";`
87
- *
88
- * @element eox-map
89
- * @fires {CustomEvent} clusterSelect - A cluster is selected
90
- * @fires {CustomEvent} loadend - The map has finished loading
91
- * @fires {CustomEvent} mapmounted - The map has been successfully mounted
92
- * @fires {CustomEvent} select - A feature is selected
93
- * @fires {CustomEvent} layerschanged - The layers have been changed
94
- */
95
- export class EOxMap extends LitElement {
96
- static get properties(): {
97
- map: {
98
- attribute: boolean;
99
- state: boolean;
100
- };
101
- config: {
102
- attribute: boolean;
103
- type: ObjectConstructor;
104
- };
105
- center: {
106
- attribute: boolean;
107
- type: ArrayConstructor;
108
- };
109
- layers: {
110
- attribute: boolean;
111
- type: ArrayConstructor;
112
- };
113
- zoom: {
114
- attribute: boolean;
115
- type: NumberConstructor;
116
- };
117
- animationOptions: {
118
- attribute: boolean;
119
- type: ObjectConstructor;
120
- };
121
- controls: {
122
- attribute: boolean;
123
- type: ObjectConstructor;
124
- };
125
- interactions: {
126
- attribute: boolean;
127
- type: ObjectConstructor;
128
- };
129
- lonLatCenter: {
130
- attribute: boolean;
131
- type: ArrayConstructor;
132
- };
133
- lonLatExtent: {
134
- attribute: boolean;
135
- type: ArrayConstructor;
136
- };
137
- mapControls: {
138
- attribute: boolean;
139
- state: boolean;
140
- type: ObjectConstructor;
141
- };
142
- preventScroll: {
143
- attribute: string;
144
- type: BooleanConstructor;
145
- };
146
- projection: {
147
- attribute: string;
148
- type: StringConstructor;
149
- };
150
- selectInteractions: {
151
- attribute: boolean;
152
- state: boolean;
153
- type: ObjectConstructor;
154
- };
155
- sync: {
156
- attribute: string;
157
- type: StringConstructor;
158
- };
159
- zoomExtent: {
160
- attribute: boolean;
161
- type: ArrayConstructor;
162
- };
163
- globeConfig: {
164
- attribute: boolean;
165
- type: ObjectConstructor;
166
- };
167
- };
168
- /**
169
- * Stores the last 2D projection to switch back from globe view.
170
- * @type {ProjectionLike}
171
- */
172
- last2dProjection: ProjectionLike;
173
- /**
174
- * The OpenLayers map instance.
175
- *
176
- * @type {import("ol/Map").default}
177
- */
178
- map: import("ol/Map").default;
179
- /**
180
- * Object to store various map interactions (e.g., drag, zoom).
181
- *
182
- * @type {Object.<string, import("ol/interaction/Interaction").default>}
183
- */
184
- interactions: {
185
- [x: string]: import("ol/interaction").Interaction;
186
- };
187
- /**
188
- * Object to store selection interactions for the map.
189
- *
190
- * @type {Object.<string, import("./helpers/select").EOxSelectInteraction>}
191
- */
192
- selectInteractions: {
193
- [x: string]: import("./helpers").EOxSelectInteraction;
194
- };
195
- /**
196
- * Object to store map controls (e.g., custom buttons, geolocation).
197
- *
198
- * @type {Object.<string, import("ol/control/Control").default>}
199
- */
200
- mapControls: {
201
- [x: string]: import("ol/control").Control;
202
- };
203
- /**
204
- * The globe instance when using globe projection.
205
- * todo: define proper type
206
- * @type {any|null}
207
- */
208
- globe: any | null;
209
- /**
210
- * Sets the center of the map. If the new center is valid, updates the map's view.
211
- *
212
- * @param {Array<number>} center - The new center coordinates [x, y].
213
- */
214
- set center(center: Array<number>);
215
- /**
216
- * Gets the current center coordinates of the map.
217
- *
218
- * @type {Array<number>}
219
- * @returns {Array<number>} The current center of the map.
220
- */
221
- get center(): Array<number>;
222
- /**
223
- * Sets the configuration for the map.
224
- *
225
- * @param {ConfigObject} config - The configuration object.
226
- */
227
- set config(config: ConfigObject);
228
- /**
229
- * Gets the current configuration of the map.
230
- *
231
- * @type {ConfigObject}
232
- * @returns {ConfigObject} The map's configuration object.
233
- */
234
- get config(): ConfigObject;
235
- /**
236
- * Gets the current center of the map in longitude and latitude.
237
- *
238
- * @type {Array<number>}
239
- * @returns {Array<number>} The geographic center [longitude, latitude].
240
- */
241
- get lonLatCenter(): Array<number>;
242
- /**
243
- * Gets the current extent of the map in longitude and latitude.
244
- *
245
- * @type {Array<number>}
246
- * @returns {Array<number>} The geographic extent [minLon, minLat, maxLon, maxLat].
247
- */
248
- get lonLatExtent(): Array<number>;
249
- /**
250
- * Sets the zoom level of the map and animates the change.
251
- *
252
- * @param {number} zoom - The new zoom level.
253
- */
254
- set zoom(zoom: number);
255
- /**
256
- * Gets the current zoom level of the map.
257
- *
258
- * @type {number}
259
- * @returns {number} The current zoom level.
260
- */
261
- get zoom(): number;
262
- /**
263
- * Sets the zoom extent of the map.
264
- *
265
- * @param {import("ol/extent").Extent} extent - The new zoom extent.
266
- */
267
- set zoomExtent(extent: import("ol/extent").Extent);
268
- /**
269
- * Gets the current extent of the map.
270
- *
271
- * @type {Array<number>}
272
- * @returns {Array<number>} The extent in current map projection.
273
- */
274
- get zoomExtent(): Array<number>;
275
- /**
276
- * Sets the controls for the map.
277
- *
278
- * @param {ControlDictionary} controls - An array of control configurations.
279
- */
280
- set controls(controls: ControlDictionary);
281
- /**
282
- * Gets the current map controls.
283
- *
284
- * @type {ControlDictionary}
285
- * @returns {ControlDictionary} The current controls applied to the map.
286
- */
287
- get controls(): ControlDictionary;
288
- /**
289
- * Sets the layers for the map.
290
- *
291
- * @param {Array<EoxLayer>} layers - An array of layer configurations.
292
- */
293
- set layers(layers: Array<EoxLayer>);
294
- /**
295
- * Gets the current layers of the map
296
- *
297
- * @returns {Array<EoxLayer>} The current layers applied to the map.
298
- */
299
- get layers(): Array<EoxLayer>;
300
- /**
301
- * Enables or disables scroll interactions on the map.
302
- *
303
- * @param {boolean} preventScroll - Whether to prevent scroll interactions.
304
- */
305
- set preventScroll(preventScroll: boolean);
306
- /**
307
- * Gets the current scroll interaction state.
308
- *
309
- * @type {boolean}
310
- * @returns {boolean} `true` if scroll interactions are prevented, `false` otherwise.
311
- */
312
- get preventScroll(): boolean;
313
- /**
314
- * Sets animation options for map view changes.
315
- *
316
- * @param {EOxAnimationOptions} animationOptions - The animation options.
317
- */
318
- set animationOptions(animationOptions: EOxAnimationOptions);
319
- /**
320
- * Gets the current animation options.
321
- *
322
- * @type {EOxAnimationOptions}
323
- * @returns {EOxAnimationOptions} The current animation options for the map.
324
- */
325
- get animationOptions(): EOxAnimationOptions;
326
- /**
327
- * Sets the map's projection.
328
- *
329
- * @param {ProjectionLike} projection - The projection code (e.g., "EPSG:3857") or "globe".
330
- */
331
- set projection(projection: ProjectionLike);
332
- /**
333
- * Gets the current map projection.
334
- *
335
- * @type {ProjectionLike}
336
- * @returns {ProjectionLike} The map's projection code or "globe" if globe is enabled.
337
- */
338
- get projection(): ProjectionLike;
339
- /**
340
- * Gets the openlayer map projection.
341
- *
342
- * @type {ProjectionLike}
343
- * @returns {ProjectionLike} The map's openlayer code
344
- */
345
- get OLprojection(): ProjectionLike;
346
- /**
347
- * Sets the Whether the globe is enabled.
348
- *
349
- * @type {boolean}
350
- * @returns {boolean} Whether the globe is enabled.
351
- */
352
- set globeEnabled(globeEnabled: boolean);
353
- /**
354
- * Gets the Whether the globe is enabled.
355
- *
356
- * @type {boolean}
357
- * @returns {boolean} Whether the globe is enabled.
358
- */
359
- get globeEnabled(): boolean;
360
- /**
361
- * Sets the sync state for the map.
362
- *
363
- * @param {string} sync - The ID of the map to sync with.
364
- */
365
- set sync(sync: string);
366
- /**
367
- * Gets the current sync state of the map.
368
- *
369
- * @type {string}
370
- * @returns {string} The ID of the map that this map is synced with.
371
- */
372
- get sync(): string;
373
- /**
374
- * Sets the properties of the globe such as the terrain.
375
- *
376
- * @param {GlobeConfig} globeConfig - The globe configuration which contains the terrain boolean.
377
- */
378
- set globeConfig(globeConfig: GlobeConfig);
379
- /**
380
- * Gets the current globe configuration properties.
381
- * @returns {GlobeConfig}
382
- */
383
- get globeConfig(): GlobeConfig;
384
- /**
385
- * Adds or updates a layer on the map.
386
- *
387
- * @param {EoxLayer} json - The layer configuration in JSON format.
388
- * @returns {Object} The added or updated layer.
389
- */
390
- addOrUpdateLayer(json: EoxLayer): any;
391
- /**
392
- * Removes an interaction from the map by its ID.
393
- *
394
- * @param {string | number} id - The ID of the interaction to remove.
395
- */
396
- removeInteraction(id: string | number): void;
397
- /**
398
- * Removes a select interaction from the map by its ID.
399
- *
400
- * @param {string | number} id - The ID of the select interaction to remove.
401
- */
402
- removeSelect(id: string | number): void;
403
- /**
404
- * Removes a control from the map by its ID.
405
- *
406
- * @param {string} id - The ID of the control to remove.
407
- */
408
- removeControl(id: string): void;
409
- /**
410
- * Retrieves a layer from the map by its ID.
411
- *
412
- * @param {string} layerId - The ID of the layer to retrieve.
413
- * @returns {import("./types").AnyLayerWithSource} The layer object.
414
- */
415
- getLayerById(layerId: string): import("./types").AnyLayerWithSource;
416
- /**
417
- * Lifecycle method called after the component's first update.
418
- * Sets up initial configurations like zoom extent.
419
- */
420
- firstUpdated(): void;
421
- /**
422
- * Converts an array of OpenLayers features into a GeoJSON object.
423
- *
424
- * @param {Array<import("ol/Feature").default>} features - An array of OpenLayers features to be converted.
425
- * @returns {Object} - A GeoJSON object representing the provided features.
426
- */
427
- parseFeature(features: Array<import("ol/Feature").default>): any;
428
- /**
429
- * This function reads text and attempts to parse it as GeoJSON, KML, or TopoJSON.
430
- * If successful, it adds the parsed features to the map.
431
- *
432
- * @param {string} text - The string containing the geographic data to be parsed.
433
- * @param {import("ol/layer").Vector} vectorLayer - The vector layer to which the parsed features will be added.
434
- * @param {EOxMap} EOxMap - An instance of EOxMap, used here for context and potentially for further operations like event dispatching.
435
- * @param {boolean} replaceFeatures - Optional boolean flag indicating whether to replace the existing features with the new ones.
436
- * @param {boolean} animate - Optional boolean flag indicating whether to animate the map on feature change.
437
- * @return {void}
438
- */
439
- parseTextToFeature(text: string, vectorLayer: import("ol/layer").Vector, EOxMap: EOxMap, replaceFeatures: boolean, animate: boolean): void;
440
- /**
441
- * Fetches the projection definition for a given EPSG code from epsg.io and registers the projection using proj4.
442
- *
443
- * @param {string | number} code - The EPSG code (e.g., 4326 or 'EPSG:4326').
444
- * @returns {Promise<import("ol/proj/Projection").default>} - A promise that resolves to the registered projection.
445
- */
446
- registerProjectionFromCode(code: string | number): Promise<import("ol/proj/Projection").default>;
447
- /**
448
- * Registers a projection under a given name using a proj4 definition.
449
- * This allows OpenLayers to recognize and work with custom or predefined projections.
450
- *
451
- * @param {string} name - The name of the projection (e.g., "EPSG:4326").
452
- * @param {string | proj4.ProjectionDefinition} projection - The proj4 projection definition string or object.
453
- * @param {import("ol/extent").Extent} [extent=undefined] - Optional extent for the projection. Defines the coordinate system's valid area.
454
- */
455
- registerProjection(name: string, projection: string | proj4.ProjectionDefinition, extent?: import("ol/extent").Extent): void;
456
- /**
457
- * Returns a flat array of all map layers, including nested layers within groups.
458
- *
459
- * Note: If you want to get all layers without groups, use the native OpenLayers `getAllLayers` method:
460
- * https://openlayers.org/en/latest/apidoc/module-ol_Map-Map.html#getAllLayers
461
- *
462
- * @param {Array<import("./types").AnyLayer>} layers - Array of OpenLayers layers, possibly containing groups.
463
- * @returns {Array<import("./types").AnyLayer>} layers - Flattened array of input layers
464
- */
465
- getFlatLayersArray(layers: Array<import("./types").AnyLayer>): Array<import("./types").AnyLayer>;
466
- render(): import("lit-html").TemplateResult<1>;
467
- #private;
468
- }
469
- export type EoxLayer = import("./layers").EoxLayer;
470
- export type EOxAnimationOptions = import("./types").EOxAnimationOptions;
471
- export type ControlDictionary = import("./types").ControlDictionary;
472
- export type ConfigObject = import("./types").ConfigObject;
473
- export type ProjectionLike = import("./types").ProjectionLike;
474
- export type AnyLayerWithSource = import("./types").AnyLayerWithSource;
475
- export type GlobeConfig = import("./types").GlobeConfig;
476
- import { LitElement } from "lit";
477
- import { buffer } from "ol/extent";
478
- import { transform } from "./helpers";
479
- import { transformExtent } from "./helpers";
480
- export { buffer, transform, transformExtent };
481
- //# sourceMappingURL=main.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../map/src/main.js"],"names":[],"mappings":"AA8CA;;;;;;;;KAQK;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH;IAEE;;;;;;;;;;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,mBAAmB;gCACrC,OAAO,SAAS,EAAE,iBAAiB;2BACnC,OAAO,SAAS,EAAE,YAAY;6BAC9B,OAAO,SAAS,EAAE,cAAc;iCAChC,OAAO,SAAS,EAAE,kBAAkB;0BACpC,OAAO,SAAS,EAAE,WAAW;2BAnDT,KAAK;uBAMf,WAAW;0BAW3B,WAAW;gCAAX,WAAW"}
@@ -1,13 +0,0 @@
1
- /**
2
- * @typedef {import("../../layers").EoxLayer} EoxLayer
3
- * */
4
- /**
5
- * Adds a new layer to the map or updates an existing layer based on the provided JSON data.
6
- *
7
- * @param {EoxLayer} json - The JSON data containing layer properties and interactions.
8
- * @param {import("../../main").EOxMap} EOxMap - The map object where the layer will be added or updated.
9
- * @returns {Object} - The newly created or updated layer object.
10
- */
11
- export default function addOrUpdateLayerMethod(json: EoxLayer, EOxMap: import("../../main").EOxMap): any;
12
- export type EoxLayer = import("../../layers").EoxLayer;
13
- //# sourceMappingURL=add-update-layer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-update-layer.d.ts","sourceRoot":"","sources":["../../../../../../map/src/methods/map/add-update-layer.js"],"names":[],"mappings":"AAEA;;KAEK;AAEL;;;;;;GAMG;AACH,qDAJW,QAAQ,UACR,OAAO,YAAY,EAAE,MAAM,OA0BrC;uBAjCY,OAAO,cAAc,EAAE,QAAQ"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Animates the map view to a specified state using the provided animation options.
3
- *
4
- * @param {import("../../main").EOxMap} EOxMap - The map object containing the current map view, center, zoom, and animation options.
5
- */
6
- export default function animateToStateMethod(EOxMap: import("../../main").EOxMap): void;
7
- //# sourceMappingURL=animate-to-state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"animate-to-state.d.ts","sourceRoot":"","sources":["../../../../../../map/src/methods/map/animate-to-state.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qDAFW,OAAO,YAAY,EAAE,MAAM,QAuBrC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Sets up the initial state of the map and handles its first update, including setting the center,
3
- * zoom extent, and dispatching events when the map is loaded and mounted.
4
- *
5
- * @param {import("ol/extent").Extent} zoomExtent - Optional extent to fit the map view to a specific area.
6
- * @param {import("../../main").EOxMap} EOxMap - The map object containing the map instance, center, animation options, and other properties.
7
- */
8
- export default function firstUpdatedMethod(zoomExtent: import("ol/extent").Extent, EOxMap: import("../../main").EOxMap): void;
9
- //# sourceMappingURL=first-updated.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"first-updated.d.ts","sourceRoot":"","sources":["../../../../../../map/src/methods/map/first-updated.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,uDAHW,OAAO,WAAW,EAAE,MAAM,UAC1B,OAAO,YAAY,EAAE,MAAM,QAwBrC"}
@@ -1,22 +0,0 @@
1
- /**
2
- * Retrieves the current center of the map in longitude and latitude coordinates.
3
- *
4
- * @param {import("../../main").EOxMap} EOxMap - The map object containing the map instance and its projection information.
5
- * @returns {Array<number>} - The center coordinates of the map in longitude and latitude.
6
- */
7
- export function getLonLatCenterMethod(EOxMap: import("../../main").EOxMap): Array<number>;
8
- /**
9
- * Retrieves the current extent (bounding box) of the map in longitude and latitude coordinates.
10
- *
11
- * @param {import("../../main").EOxMap} EOxMap - The map object containing the map instance, projection information, and size.
12
- * @returns {Array<number>} - The extent of the map in longitude and latitude.
13
- */
14
- export function getLonLatExtentMethod(EOxMap: import("../../main").EOxMap): Array<number>;
15
- /**
16
- * Get the current map view extent.
17
- *
18
- * @param {import("../../main").EOxMap} EOxMap - The map object containing the map instance, projection information, and size.
19
- * @returns {import("ol/extent").Extent} - The extent of the map in map projection.
20
- */
21
- export function getZoomExtentMethod(EOxMap: import("../../main").EOxMap): import("ol/extent").Extent;
22
- //# sourceMappingURL=getters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getters.d.ts","sourceRoot":"","sources":["../../../../../../map/src/methods/map/getters.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,8CAHW,OAAO,YAAY,EAAE,MAAM,GACzB,KAAK,CAAC,MAAM,CAAC,CAazB;AAED;;;;;GAKG;AACH,8CAHW,OAAO,YAAY,EAAE,MAAM,GACzB,KAAK,CAAC,MAAM,CAAC,CAgCzB;AAED;;;;;GAKG;AACH,4CAHW,OAAO,YAAY,EAAE,MAAM,GACzB,OAAO,WAAW,EAAE,MAAM,CAMtC"}
@@ -1,7 +0,0 @@
1
- export { default as animateToStateMethod } from "./animate-to-state";
2
- export { default as addOrUpdateLayerMethod } from "./add-update-layer";
3
- export { default as firstUpdatedMethod } from "./first-updated";
4
- export { setCenterMethod, setZoomExtentMethod, setControlsMethod, setLayersMethod, setPreventScrollMethod, setConfigMethod, setProjectionMethod, setSyncMethod, setTerrainMethod } from "./setters";
5
- export { getLonLatCenterMethod, getLonLatExtentMethod, getZoomExtentMethod } from "./getters";
6
- export { removeInteractionMethod, removeSelectMethod, removeControlMethod } from "./remove.js";
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../map/src/methods/map/index.js"],"names":[],"mappings":""}
@@ -1,22 +0,0 @@
1
- /**
2
- * Removes an interaction from the map and deletes it from the interaction list in EOxMap.
3
- *
4
- * @param {string | number} id - The identifier for the interaction to be removed.
5
- * @param {import("../../main").EOxMap} EOxMap - The map object containing the map instance and interactions list.
6
- */
7
- export function removeInteractionMethod(id: string | number, EOxMap: import("../../main").EOxMap): void;
8
- /**
9
- * Removes a select interaction from the map and deletes it from the select interactions list in EOxMap.
10
- *
11
- * @param {string | number} id - The identifier for the select interaction to be removed.
12
- * @param {import("../../main").EOxMap} EOxMap - The map object containing the select interactions list.
13
- */
14
- export function removeSelectMethod(id: string | number, EOxMap: import("../../main").EOxMap): void;
15
- /**
16
- * Removes a control from the map and deletes it from the map controls list in EOxMap.
17
- *
18
- * @param {string} id - The identifier for the control to be removed.
19
- * @param {import("../../main").EOxMap} EOxMap - The map object containing the map instance and controls list.
20
- */
21
- export function removeControlMethod(id: string, EOxMap: import("../../main").EOxMap): void;
22
- //# sourceMappingURL=remove.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../../../../map/src/methods/map/remove.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,4CAHW,MAAM,GAAG,MAAM,UACf,OAAO,YAAY,EAAE,MAAM,QAcrC;AAED;;;;;GAKG;AACH,uCAHW,MAAM,GAAG,MAAM,UACf,OAAO,YAAY,EAAE,MAAM,QAQrC;AAED;;;;;GAKG;AACH,wCAHW,MAAM,UACN,OAAO,YAAY,EAAE,MAAM,QAQrC"}