@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.
Files changed (130) hide show
  1. package/dist/eox-drawtools.js +6395 -562
  2. package/dist/eox-drawtools.umd.cjs +38 -37
  3. package/package.json +17 -4
  4. package/src/helpers/features-to-geojson.js +14 -0
  5. package/src/helpers/features-to-wkt.js +13 -0
  6. package/src/helpers/index.js +2 -0
  7. package/src/main.js +24 -8
  8. package/src/methods/draw/emit-drawn-features.js +42 -3
  9. package/types/drawtools/src/components/controller.d.ts +99 -0
  10. package/types/drawtools/src/components/controller.d.ts.map +1 -0
  11. package/types/drawtools/src/components/list.d.ts +118 -0
  12. package/types/drawtools/src/components/list.d.ts.map +1 -0
  13. package/types/drawtools/src/enums/draw.d.ts +8 -0
  14. package/types/drawtools/src/enums/draw.d.ts.map +1 -0
  15. package/types/drawtools/src/enums/index.d.ts +4 -0
  16. package/types/drawtools/src/enums/index.d.ts.map +1 -0
  17. package/types/drawtools/src/enums/stories.d.ts +30 -0
  18. package/types/drawtools/src/enums/stories.d.ts.map +1 -0
  19. package/types/drawtools/src/enums/test.d.ts +8 -0
  20. package/types/drawtools/src/enums/test.d.ts.map +1 -0
  21. package/types/drawtools/src/helpers/copy-text-to-clipboard.d.ts +7 -0
  22. package/types/drawtools/src/helpers/copy-text-to-clipboard.d.ts.map +1 -0
  23. package/types/drawtools/src/helpers/features-to-geojson.d.ts +11 -0
  24. package/types/drawtools/src/helpers/features-to-geojson.d.ts.map +1 -0
  25. package/types/drawtools/src/helpers/features-to-wkt.d.ts +9 -0
  26. package/types/drawtools/src/helpers/features-to-wkt.d.ts.map +1 -0
  27. package/types/drawtools/src/helpers/generate-upload-events.d.ts +17 -0
  28. package/types/drawtools/src/helpers/generate-upload-events.d.ts.map +1 -0
  29. package/types/drawtools/src/helpers/index.d.ts +4 -0
  30. package/types/drawtools/src/helpers/index.d.ts.map +1 -0
  31. package/types/drawtools/src/main.d.ts +204 -0
  32. package/types/drawtools/src/main.d.ts.map +1 -0
  33. package/types/drawtools/src/methods/controller/index.d.ts +2 -0
  34. package/types/drawtools/src/methods/controller/index.d.ts.map +1 -0
  35. package/types/drawtools/src/methods/controller/update-button-states.d.ts +12 -0
  36. package/types/drawtools/src/methods/controller/update-button-states.d.ts.map +1 -0
  37. package/types/drawtools/src/methods/draw/create-select-handler.d.ts +10 -0
  38. package/types/drawtools/src/methods/draw/create-select-handler.d.ts.map +1 -0
  39. package/types/drawtools/src/methods/draw/discard-drawing.d.ts +9 -0
  40. package/types/drawtools/src/methods/draw/discard-drawing.d.ts.map +1 -0
  41. package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts +20 -0
  42. package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts.map +1 -0
  43. package/types/drawtools/src/methods/draw/handle-layer-id.d.ts +12 -0
  44. package/types/drawtools/src/methods/draw/handle-layer-id.d.ts.map +1 -0
  45. package/types/drawtools/src/methods/draw/index.d.ts +9 -0
  46. package/types/drawtools/src/methods/draw/index.d.ts.map +1 -0
  47. package/types/drawtools/src/methods/draw/init-layer.d.ts +13 -0
  48. package/types/drawtools/src/methods/draw/init-layer.d.ts.map +1 -0
  49. package/types/drawtools/src/methods/draw/init-selection.d.ts +9 -0
  50. package/types/drawtools/src/methods/draw/init-selection.d.ts.map +1 -0
  51. package/types/drawtools/src/methods/draw/on-draw-end.d.ts +9 -0
  52. package/types/drawtools/src/methods/draw/on-draw-end.d.ts.map +1 -0
  53. package/types/drawtools/src/methods/draw/start-drawing.d.ts +9 -0
  54. package/types/drawtools/src/methods/draw/start-drawing.d.ts.map +1 -0
  55. package/types/drawtools/src/methods/list/delete-feature.d.ts +11 -0
  56. package/types/drawtools/src/methods/list/delete-feature.d.ts.map +1 -0
  57. package/types/drawtools/src/methods/list/first-update.d.ts +8 -0
  58. package/types/drawtools/src/methods/list/first-update.d.ts.map +1 -0
  59. package/types/drawtools/src/methods/list/hover-feature.d.ts +10 -0
  60. package/types/drawtools/src/methods/list/hover-feature.d.ts.map +1 -0
  61. package/types/drawtools/src/methods/list/index.d.ts +5 -0
  62. package/types/drawtools/src/methods/list/index.d.ts.map +1 -0
  63. package/types/drawtools/src/methods/list/select-deselect-feature.d.ts +9 -0
  64. package/types/drawtools/src/methods/list/select-deselect-feature.d.ts.map +1 -0
  65. package/types/drawtools/src/style.eox.d.ts +2 -0
  66. package/types/drawtools/src/style.eox.d.ts.map +1 -0
  67. package/types/map/src/components/compare.d.ts +31 -0
  68. package/types/map/src/components/compare.d.ts.map +1 -0
  69. package/types/map/src/components/tooltip.d.ts +36 -0
  70. package/types/map/src/components/tooltip.d.ts.map +1 -0
  71. package/types/map/src/controls/controls.d.ts +27 -0
  72. package/types/map/src/controls/controls.d.ts.map +1 -0
  73. package/types/map/src/controls/geo-location.d.ts +41 -0
  74. package/types/map/src/controls/geo-location.d.ts.map +1 -0
  75. package/types/map/src/controls/loading-indicator.d.ts +20 -0
  76. package/types/map/src/controls/loading-indicator.d.ts.map +1 -0
  77. package/types/map/src/enums/index.d.ts +2 -0
  78. package/types/map/src/enums/index.d.ts.map +1 -0
  79. package/types/map/src/enums/map.d.ts +5 -0
  80. package/types/map/src/enums/map.d.ts.map +1 -0
  81. package/types/map/src/helpers/add-new-feature.d.ts +14 -0
  82. package/types/map/src/helpers/add-new-feature.d.ts.map +1 -0
  83. package/types/map/src/helpers/cancel-animation.d.ts +7 -0
  84. package/types/map/src/helpers/cancel-animation.d.ts.map +1 -0
  85. package/types/map/src/helpers/center.d.ts +12 -0
  86. package/types/map/src/helpers/center.d.ts.map +1 -0
  87. package/types/map/src/helpers/coordinates-roughly-equals.d.ts +12 -0
  88. package/types/map/src/helpers/coordinates-roughly-equals.d.ts.map +1 -0
  89. package/types/map/src/helpers/draw.d.ts +22 -0
  90. package/types/map/src/helpers/draw.d.ts.map +1 -0
  91. package/types/map/src/helpers/generate.d.ts +30 -0
  92. package/types/map/src/helpers/generate.d.ts.map +1 -0
  93. package/types/map/src/helpers/index.d.ts +16 -0
  94. package/types/map/src/helpers/index.d.ts.map +1 -0
  95. package/types/map/src/helpers/interactions.d.ts +16 -0
  96. package/types/map/src/helpers/interactions.d.ts.map +1 -0
  97. package/types/map/src/helpers/layer.d.ts +24 -0
  98. package/types/map/src/helpers/layer.d.ts.map +1 -0
  99. package/types/map/src/helpers/parse-feature.d.ts +8 -0
  100. package/types/map/src/helpers/parse-feature.d.ts.map +1 -0
  101. package/types/map/src/helpers/parse-text.d.ts +33 -0
  102. package/types/map/src/helpers/parse-text.d.ts.map +1 -0
  103. package/types/map/src/helpers/register-projection-from-code.d.ts +8 -0
  104. package/types/map/src/helpers/register-projection-from-code.d.ts.map +1 -0
  105. package/types/map/src/helpers/register-projection.d.ts +11 -0
  106. package/types/map/src/helpers/register-projection.d.ts.map +1 -0
  107. package/types/map/src/helpers/select.d.ts +86 -0
  108. package/types/map/src/helpers/select.d.ts.map +1 -0
  109. package/types/map/src/helpers/tile-grid.d.ts +14 -0
  110. package/types/map/src/helpers/tile-grid.d.ts.map +1 -0
  111. package/types/map/src/helpers/transform.d.ts +19 -0
  112. package/types/map/src/helpers/transform.d.ts.map +1 -0
  113. package/types/map/src/main.d.ts +337 -0
  114. package/types/map/src/main.d.ts.map +1 -0
  115. package/types/map/src/methods/map/add-update-layer.d.ts +13 -0
  116. package/types/map/src/methods/map/add-update-layer.d.ts.map +1 -0
  117. package/types/map/src/methods/map/animate-to-state.d.ts +7 -0
  118. package/types/map/src/methods/map/animate-to-state.d.ts.map +1 -0
  119. package/types/map/src/methods/map/first-updated.d.ts +9 -0
  120. package/types/map/src/methods/map/first-updated.d.ts.map +1 -0
  121. package/types/map/src/methods/map/getters.d.ts +15 -0
  122. package/types/map/src/methods/map/getters.d.ts.map +1 -0
  123. package/types/map/src/methods/map/index.d.ts +7 -0
  124. package/types/map/src/methods/map/index.d.ts.map +1 -0
  125. package/types/map/src/methods/map/remove.d.ts +22 -0
  126. package/types/map/src/methods/map/remove.d.ts.map +1 -0
  127. package/types/map/src/methods/map/setters.d.ts +82 -0
  128. package/types/map/src/methods/map/setters.d.ts.map +1 -0
  129. package/types/map/types.d.ts +148 -0
  130. package/types/map/types.d.ts.map +1 -0
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @typedef {import("../../types").LoadingIndicatorOptions} LoadingIndicatorOptions
3
+ */
4
+ export default class LoadingIndicatorControl extends Control {
5
+ /**
6
+ * Creates a loading indicator control to show when map loading events occur.
7
+ *
8
+ * @param {LoadingIndicatorOptions} [opt_options] - Options for configuring the loading indicator control.
9
+ */
10
+ constructor(opt_options?: LoadingIndicatorOptions);
11
+ /**
12
+ * Returns the loading indicator element.
13
+ *
14
+ * @returns {HTMLElement} - The control element.
15
+ */
16
+ getElement(): HTMLElement;
17
+ }
18
+ export type LoadingIndicatorOptions = import("../../types").LoadingIndicatorOptions;
19
+ import { Control } from "ol/control.js";
20
+ //# sourceMappingURL=loading-indicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading-indicator.d.ts","sourceRoot":"","sources":["../../../../../map/src/controls/loading-indicator.js"],"names":[],"mappings":"AAEA;;GAEG;AAEH;IACE;;;;OAIG;IACH,0BAFW,uBAAuB,EAsCjC;IAuBD;;;;OAIG;IACH,cAFa,WAAW,CAIvB;CACF;sCA5EY,OAAO,aAAa,EAAE,uBAAuB;wBAHlC,eAAe"}
@@ -0,0 +1,2 @@
1
+ export { READ_FEATURES_OPTIONS } from "./map";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../map/src/enums/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export namespace READ_FEATURES_OPTIONS {
2
+ let dataProjection: string;
3
+ let featureProjection: string;
4
+ }
5
+ //# sourceMappingURL=map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../../../map/src/enums/map.js"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Adds new features to a specified vector layer from drawing/upload/input change events.
3
+ * This function supports handling both single and multiple features.
4
+ *
5
+ * @param {import("ol/interaction/Draw").DrawEvent | import("ol/interaction/DragAndDrop").DragAndDropEvent | { features: Array<import("ol/Feature").default> }} e - The event object from drawing or drag-and-drop actions, containing the features.
6
+ * @param {import("ol/layer").Vector} vectorLayer - The vector layer to which features will be added.
7
+ * @param {import("../main").EOxMap} EOxMap - The EOxMap instance for dispatching custom events and adjusting the view.
8
+ * @param {boolean} isDraw - Optional. If true, indicates the features come from a drawing event.
9
+ * @param {boolean} replaceFeatures - Optional. If true, existing features in the layer are cleared before adding new ones.
10
+ */
11
+ export default function addNewFeature(e: import("ol/interaction/Draw").DrawEvent | import("ol/interaction/DragAndDrop").DragAndDropEvent | {
12
+ features: Array<import("ol/Feature").default>;
13
+ }, vectorLayer: import("ol/layer").Vector, EOxMap: import("../main").EOxMap, isDraw?: boolean, replaceFeatures?: boolean): void;
14
+ //# sourceMappingURL=add-new-feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-new-feature.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/add-new-feature.js"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,yCANW,OAAO,qBAAqB,EAAE,SAAS,GAAG,OAAO,4BAA4B,EAAE,gBAAgB,GAAG;IAAE,QAAQ,EAAE,MAAM,OAAO,YAAY,EAAE,OAAO,CAAC,CAAA;CAAE,eACnJ,OAAO,UAAU,EAAE,MAAM,UACzB,OAAO,SAAS,EAAE,MAAM,WACxB,OAAO,oBACP,OAAO,QAgEjB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * cancels any animation of the given view
3
+ *
4
+ * @param {import("ol/View").default} view - The OpenLayers view object whose animations need to be canceled.
5
+ */
6
+ export default function cancelAnimation(view: import("ol/View").default): void;
7
+ //# sourceMappingURL=cancel-animation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-animation.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/cancel-animation.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,8CAFW,OAAO,SAAS,EAAE,OAAO,QAMnC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * returns an ol-coordinate from a given center property.
3
+ * the coordinate expected coordinate system is EPSG:3857, however,
4
+ * if both parts of the coordinate are between -180 and 180, the coordinate
5
+ * system EPSG:4326 is assumed.
6
+ * use `map.getView().setCenter()` to manually set the center of the view.
7
+ *
8
+ * @param {Array<number>} centerProperty - The input coordinate as [longitude, latitude].
9
+ * @returns {import("ol/coordinate").Coordinate} - The converted coordinate in EPSG:3857.
10
+ */
11
+ export function getCenterFromProperty(centerProperty: Array<number>): import("ol/coordinate").Coordinate;
12
+ //# sourceMappingURL=center.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"center.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/center.js"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,sDAHW,MAAM,MAAM,CAAC,GACX,OAAO,eAAe,EAAE,UAAU,CAyB9C"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * A helper function to determine approximate equality between two coordinates.
3
+ * This function is based on OpenLayers' "equals" method but includes a tolerance (epsilon).
4
+ *
5
+ * @param {import("ol/coordinate").Coordinate} coordinate1 - The first coordinate to compare.
6
+ * @param {import("ol/coordinate").Coordinate} coordinate2 - The first coordinate to compare.
7
+ * @param {number?} [epsilon] - The first coordinate to compare.
8
+ *
9
+ * @return {boolean} - True if the coordinates are approximately equal, false otherwise.
10
+ */
11
+ export default function coordinatesRoughlyEquals(coordinate1: import("ol/coordinate").Coordinate, coordinate2: import("ol/coordinate").Coordinate, epsilon?: number | null): boolean;
12
+ //# sourceMappingURL=coordinates-roughly-equals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinates-roughly-equals.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/coordinates-roughly-equals.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,8DANW,OAAO,eAAe,EAAE,UAAU,eAClC,OAAO,eAAe,EAAE,UAAU,YAClC,MAAM,UAEL,OAAO,CAoBlB"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @typedef {import("../../types").DrawOptions} DrawOptions
3
+ * @typedef {import("../../types").SelectOptions} SelectOptions
4
+ * @typedef {import("../../types").SelectLayer} SelectLayer
5
+ * @typedef {import("ol/layer").Vector} VectorLayer
6
+ * */
7
+ /**
8
+ * Adds a `draw` interaction to the map. If `options.modify` is set, it also adds a `modify` interaction.
9
+ * The `modify` interaction's name follows the convention `${DrawOptions.id}_modify`.
10
+ *
11
+ * @param {import("../main").EOxMap} EOxMap - The map object where the interactions will be added.
12
+ * @param {import("ol/layer").Vector<import("ol/source").Vector>} drawLayer - The map object where the interactions will be added.
13
+ * @param {DrawOptions} options - The map object where the interactions will be added.
14
+ *
15
+ * @throws Will throw an error if an interaction with the given ID already exists.
16
+ */
17
+ export function addDraw(EOxMap: import("../main").EOxMap, drawLayer: import("ol/layer").Vector<import("ol/source").Vector>, options: DrawOptions): void;
18
+ export type DrawOptions = import("../../types").DrawOptions;
19
+ export type SelectOptions = import("../../types").SelectOptions;
20
+ export type SelectLayer = import("../../types").SelectLayer;
21
+ export type VectorLayer = import("ol/layer").Vector;
22
+ //# sourceMappingURL=draw.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draw.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/draw.js"],"names":[],"mappings":"AAIA;;;;;KAKK;AAEL;;;;;;;;;GASG;AACH,gCANW,OAAO,SAAS,EAAE,MAAM,aACxB,OAAO,UAAU,EAAE,MAAM,CAAC,OAAO,WAAW,EAAE,MAAM,CAAC,WACrD,WAAW,QA6DrB;0BAzEY,OAAO,aAAa,EAAE,WAAW;4BACjC,OAAO,aAAa,EAAE,aAAa;0BACnC,OAAO,aAAa,EAAE,WAAW;0BACjC,OAAO,UAAU,EAAE,MAAM"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Creates an OpenLayers layer from a given EoxLayer definition object.
3
+ *
4
+ * @param {import("../main").EOxMap} EOxMap - The map instance.
5
+ * @param {EoxLayer} layer - The layer definition.
6
+ * @param {boolean=} createInteractions - Whether to create interactions for the layer (default: true).
7
+ * @throws Will throw an error if the specified layer or source type is not supported.
8
+ */
9
+ export function createLayer(EOxMap: import("../main").EOxMap, layer: EoxLayer, createInteractions?: boolean | undefined): any;
10
+ /**
11
+ * Updates an existing layer with a new definition.
12
+ *
13
+ * @param {import("../main").EOxMap} EOxMap - The map instance.
14
+ * @param {EoxLayer} newLayerDefinition - The new layer definition.
15
+ * @param {import("ol/layer/Base").default} existingLayer - The existing layer to be updated.
16
+ * @returns {import("ol/layer/Base").default} - The updated layer.
17
+ *
18
+ * @throws Will throw an error if the new layer is not compatible with the existing one.
19
+ */
20
+ export function updateLayer(EOxMap: import("../main").EOxMap, newLayerDefinition: EoxLayer, existingLayer: import("ol/layer/Base").default): import("ol/layer/Base").default;
21
+ export function generateLayers(EOxMap: import("../main").EOxMap, layerArray: Array<EoxLayer>): Array<EoxLayer>;
22
+ export type AnyLayer = import("../../types").AnyLayer;
23
+ export type EoxLayer = import("../../types").EoxLayer;
24
+ export type SelectLayer = import("../../types").SelectLayer;
25
+ export type EOxInteraction = import("../../types").EOxInteraction;
26
+ export type DrawOptions = import("../../types").DrawOptions;
27
+ export type SelectOptions = import("../../types").SelectOptions;
28
+ export type AnyLayerWithSource = import("../../types").AnyLayerWithSource;
29
+ export type VectorOrVectorTileLayer = import("../../types").VectorOrVectorTileLayer;
30
+ //# sourceMappingURL=generate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/generate.js"],"names":[],"mappings":"AAkEA;;;;;;;GAOG;AACH,oCALW,OAAO,SAAS,EAAE,MAAM,SACxB,QAAQ,uBACR,OAAO,mBAkGjB;AAyBD;;;;;;;;;GASG;AACH,oCAPW,OAAO,SAAS,EAAE,MAAM,sBACxB,QAAQ,iBACR,OAAO,eAAe,EAAE,OAAO,GAC7B,OAAO,eAAe,EAAE,OAAO,CA8L3C;AASM,uCAJI,OAAO,SAAS,EAAE,MAAM,cACxB,MAAM,QAAQ,CAAC,GACb,MAAM,QAAQ,CAAC,CAO3B;uBA7XY,OAAO,aAAa,EAAE,QAAQ;uBAC9B,OAAO,aAAa,EAAE,QAAQ;0BAC9B,OAAO,aAAa,EAAE,WAAW;6BACjC,OAAO,aAAa,EAAE,cAAc;0BACpC,OAAO,aAAa,EAAE,WAAW;4BACjC,OAAO,aAAa,EAAE,aAAa;iCACnC,OAAO,aAAa,EAAE,kBAAkB;sCACxC,OAAO,aAAa,EAAE,uBAAuB"}
@@ -0,0 +1,16 @@
1
+ export { default as addNewFeature } from "./add-new-feature";
2
+ export { default as cancelAnimation } from "./cancel-animation";
3
+ export { default as parseTextToFeature } from "./parse-text";
4
+ export { default as registerProjection } from "./register-projection";
5
+ export { default as registerProjectionFromCode } from "./register-projection-from-code";
6
+ export { default as parseFeature } from "./parse-feature";
7
+ export { default as coordinatesRoughlyEquals } from "./coordinates-roughly-equals";
8
+ export { getCenterFromProperty } from "./center";
9
+ export { addDraw } from "./draw";
10
+ export { generateTileGrid } from "./tile-grid";
11
+ export { transform, transformExtent } from "./transform";
12
+ export { addScrollInteractions, removeDefaultScrollInteractions } from "./interactions";
13
+ export { EOxSelectInteraction, addSelect } from "./select";
14
+ export { getLayerById, getFlatLayersArray } from "./layer";
15
+ export { createLayer, updateLayer } from "./generate";
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Adds interactions to control scroll behavior on the specified OpenLayers map.
3
+ * If `customInteraction` is true, enables zooming only with a platform-specific modifier key (e.g., `Ctrl` on Windows).
4
+ * On touch devices, allows dragging with two fingers or a modifier key.
5
+ *
6
+ * @param {import("ol").Map} map - The OpenLayers map to which the interactions should be added.
7
+ * @param {boolean} customInteraction - Indicates whether to use custom interactions (default: false).
8
+ */
9
+ export function addScrollInteractions(map: import("ol").Map, customInteraction?: boolean): void;
10
+ /**
11
+ * Removes interactions that prevent scroll behavior from the specified OpenLayers map.
12
+ *
13
+ * @param {import("ol").Map} map - The OpenLayers map from which the interactions should be removed.
14
+ */
15
+ export function removeDefaultScrollInteractions(map: import("ol").Map): void;
16
+ //# sourceMappingURL=interactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/interactions.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,2CAHW,OAAO,IAAI,EAAE,GAAG,sBAChB,OAAO,QA+BjB;AAED;;;;GAIG;AACH,qDAFW,OAAO,IAAI,EAAE,GAAG,QAc1B"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @typedef {import("../../types").AnyLayerWithSource} AnyLayerWithSource
3
+ * @typedef {import("../../types").AnyLayer} AnyLayer
4
+ */
5
+ /**
6
+ * Retrieves a layer by its ID from the EOxMap instance.
7
+ *
8
+ * @param {import("../main").EOxMap} EOxMap - Instance of the EOxMap class.
9
+ * @param {string} layerId - The ID of the OpenLayers layer to find.
10
+ * @returns {AnyLayerWithSource} - The layer with the specified ID, or `undefined` if it does not exist.
11
+ */
12
+ export function getLayerById(EOxMap: import("../main").EOxMap, layerId: string): AnyLayerWithSource;
13
+ /**
14
+ * Returns a flat array of all map layers, including nested layers within groups.
15
+ *
16
+ * Note: If you want to get all layers without groups, use the native OpenLayers `getAllLayers` method:
17
+ * https://openlayers.org/en/latest/apidoc/module-ol_Map-Map.html#getAllLayers
18
+ *
19
+ * @param {Array<AnyLayer>} layers - Array of OpenLayers layers, possibly containing groups.
20
+ */
21
+ export function getFlatLayersArray(layers: Array<AnyLayer>): any[];
22
+ export type AnyLayerWithSource = import("../../types").AnyLayerWithSource;
23
+ export type AnyLayer = import("../../types").AnyLayer;
24
+ //# sourceMappingURL=layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/layer.js"],"names":[],"mappings":"AAEA;;;GAGG;AAEH;;;;;;GAMG;AACH,qCAJW,OAAO,SAAS,EAAE,MAAM,WACxB,MAAM,GACJ,kBAAkB,CAQ9B;AAED;;;;;;;GAOG;AACH,2CAFW,MAAM,QAAQ,CAAC,SAiCzB;iCA1DY,OAAO,aAAa,EAAE,kBAAkB;uBACxC,OAAO,aAAa,EAAE,QAAQ"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Converts an array of OpenLayers features into a GeoJSON object.
3
+ *
4
+ * @param {Array<import("ol/Feature").default>} features - An array of OpenLayers features to be converted.
5
+ * @returns {Object} - A GeoJSON object representing the provided features.
6
+ */
7
+ export default function parseFeature(features: Array<import("ol/Feature").default>): any;
8
+ //# sourceMappingURL=parse-feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-feature.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/parse-feature.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,+CAHW,MAAM,OAAO,YAAY,EAAE,OAAO,CAAC,OAS7C"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * This function reads text and attempts to parse it as GeoJSON, KML, or TopoJSON.
3
+ * If successful, it adds the parsed features to the map.
4
+ *
5
+ * @param {string} text - The string containing the geographic data to be parsed.
6
+ * @param {import("ol/layer").Vector} vectorLayer - The vector layer to which the parsed features will be added.
7
+ * @param {import("../main").EOxMap} EOxMap - An instance of EOxMap, used here for context and potentially for further operations like event dispatching.
8
+ * @param {boolean} replaceFeatures - Optional boolean flag indicating whether to replace the existing features with the new ones.
9
+ * @return {void}
10
+ */
11
+ export default function parseTextToFeature(text: string, vectorLayer: import("ol/layer").Vector, EOxMap: import("../main").EOxMap, replaceFeatures?: boolean): void;
12
+ /**
13
+ * Function to check if a string is valid GeoJSON
14
+ *
15
+ * @param {string} text - The string to be checked.
16
+ * @returns {boolean} - `true` if the string is a valid GeoJSON object, `false` otherwise.
17
+ */
18
+ export function isGeoJSON(text: string): boolean;
19
+ /**
20
+ * Function to check if a string is valid KML
21
+ *
22
+ * @param {string} text - The string to be checked.
23
+ * @returns {boolean} - `true` if the string contains KML tags, `false` otherwise.
24
+ */
25
+ export function isKML(text: string): boolean;
26
+ /**
27
+ * Function to check if a string is valid TopoJSON
28
+ *
29
+ * @param {string} text - The string to be checked.
30
+ * @returns {boolean} - `true` if the string is a valid TopoJSON object, `false` otherwise.
31
+ */
32
+ export function isTopoJSON(text: string): boolean;
33
+ //# sourceMappingURL=parse-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-text.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/parse-text.js"],"names":[],"mappings":"AAMA;;;;;;;;;GASG;AACH,iDANW,MAAM,eACN,OAAO,UAAU,EAAE,MAAM,UACzB,OAAO,SAAS,EAAE,MAAM,oBACxB,OAAO,GACN,IAAI,CA8Bf;AAmBD;;;;;GAKG;AACH,gCAHW,MAAM,GACJ,OAAO,CAWnB;AAED;;;;;GAKG;AACH,4BAHW,MAAM,GACJ,OAAO,CAKnB;AAED;;;;;GAKG;AACH,iCAHW,MAAM,GACJ,OAAO,CAWnB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Fetches the projection definition for a given EPSG code from epsg.io and registers the projection using proj4.
3
+ *
4
+ * @param {string | number} code - The EPSG code (e.g., 4326 or 'EPSG:4326').
5
+ * @returns {Promise<import("ol/proj/Projection").default>} - A promise that resolves to the registered projection.
6
+ */
7
+ export default function registerProjectionFromCode(code: string | number): Promise<import("ol/proj/Projection").default>;
8
+ //# sourceMappingURL=register-projection-from-code.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-projection-from-code.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/register-projection-from-code.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,yDAHW,MAAM,GAAG,MAAM,GACb,QAAQ,OAAO,oBAAoB,EAAE,OAAO,CAAC,CAQzD"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Registers a projection under a given name using a proj4 definition.
3
+ * This allows OpenLayers to recognize and work with custom or predefined projections.
4
+ *
5
+ * @param {string} name - The name of the projection (e.g., "EPSG:4326").
6
+ * @param {string | proj4.ProjectionDefinition} projection - The proj4 projection definition string or object.
7
+ * @param {import("ol/extent").Extent} [extent=undefined] - Optional extent for the projection. Defines the coordinate system's valid area.
8
+ */
9
+ export default function registerProjection(name: string, projection: string | proj4.ProjectionDefinition, extent?: import("ol/extent").Extent): void;
10
+ import proj4 from "proj4";
11
+ //# sourceMappingURL=register-projection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-projection.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/register-projection.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,iDAJW,MAAM,cACN,MAAM,GAAG,MAAM,oBAAoB,WACnC,OAAO,WAAW,EAAE,MAAM,QAepC;kBAzBiB,OAAO"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Adds a `select` interaction to the map.
3
+ *
4
+ * @param {EOxMap} EOxMap - Instance of EOxMap class.
5
+ * @param {SelectLayer} selectLayer - Layer to be selected.
6
+ * @param {SelectOptions | DrawOptions} options - Options for the select interaction.
7
+ * @returns {EOxSelectInteraction} - The created selection interaction instance.
8
+ *
9
+ * @throws Will throw an error if an interaction with the specified ID already exists.
10
+ */
11
+ export function addSelect(EOxMap: EOxMap, selectLayer: SelectLayer, options: SelectOptions | DrawOptions): EOxSelectInteraction;
12
+ /**
13
+ * @typedef {import('../main').EOxMap} EOxMap
14
+ * @typedef {import("../../types").EoxLayer} EoxLayer
15
+ * @typedef {import("../../types").SelectLayer} SelectLayer
16
+ * @typedef {import("../../types").SelectOptions} SelectOptions
17
+ * @typedef {import("../../types").DrawOptions} DrawOptions
18
+ */
19
+ /**
20
+ * Class representing the EOxSelectInteraction.
21
+ * Handles the selection interaction for a specified layer, including highlighting features,
22
+ * displaying tooltips, and panning into selected features.
23
+ */
24
+ export class EOxSelectInteraction {
25
+ /**
26
+ * @param {EOxMap} eoxMap - Instance of the EOxMap class.
27
+ * @param {SelectLayer} selectLayer - Layer for selection.
28
+ * @param {SelectOptions} options - Options for the selection interaction.
29
+ */
30
+ constructor(eoxMap: EOxMap, selectLayer: SelectLayer, options: SelectOptions);
31
+ eoxMap: import("../main").EOxMap;
32
+ selectLayer: import("../../types").SelectLayer;
33
+ options: import("../../types").SelectOptions;
34
+ active: boolean;
35
+ panIn: boolean;
36
+ /** @type {Array<string|number>} **/
37
+ selectedFids: Array<string | number>;
38
+ tooltip: Element;
39
+ selectStyleLayer: any;
40
+ /**
41
+ * Listener to handle selection events
42
+ * @param {import("ol/MapBrowserEvent").default<UIEvent>} event
43
+ * **/
44
+ listener: (event: import("ol/MapBrowserEvent").default<UIEvent>) => void;
45
+ changeSourceListener: () => void;
46
+ /**
47
+ * Adds a listener on pointermove
48
+ */
49
+ pointerMoveListener: (e: any) => void;
50
+ /**
51
+ * Sets the active state of the interaction.
52
+ * @param {boolean} active - Whether the interaction should be active.
53
+ */
54
+ setActive(active: boolean): void;
55
+ /**
56
+ * Pans the map to the specified feature or extent.
57
+ * @param {Feature | RenderFeature | import("ol/extent").Extent} featureOrExtent - The feature or extent to pan to.
58
+ * @param {Object} [options] - Additional options for the panning animation.
59
+ */
60
+ panIntoFeature: (featureOrExtent: Feature | RenderFeature | import("ol/extent").Extent, options?: any) => void;
61
+ /**
62
+ * Highlights features by their IDs and optionally pans into their extent.
63
+ * @param {Array<string | number>} ids - Array of feature IDs to highlight.
64
+ * @param {Object} [fitOptions] - Options for panning into the highlighted features.
65
+ */
66
+ highlightById(ids: Array<string | number>, fitOptions?: any): void;
67
+ /**
68
+ * Removes the selection interaction and associated layers from the map.
69
+ */
70
+ remove(): void;
71
+ /**
72
+ * Retrieves the ID of the given feature.
73
+ * @param {Feature | RenderFeature} feature - The feature whose ID is to be retrieved.
74
+ * @returns {string | number} - The ID of the feature.
75
+ * @throws Will throw an error if no valid ID is found.
76
+ */
77
+ getId(feature: Feature | RenderFeature): string | number;
78
+ }
79
+ export type EOxMap = import('../main').EOxMap;
80
+ export type EoxLayer = import("../../types").EoxLayer;
81
+ export type SelectLayer = import("../../types").SelectLayer;
82
+ export type SelectOptions = import("../../types").SelectOptions;
83
+ export type DrawOptions = import("../../types").DrawOptions;
84
+ import Feature from "ol/Feature";
85
+ import RenderFeature from "ol/render/Feature";
86
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/select.js"],"names":[],"mappings":"AA4UA;;;;;;;;;GASG;AACH,kCAPW,MAAM,eACN,WAAW,WACX,aAAa,GAAG,WAAW,GACzB,oBAAoB,CAgBhC;AA1VD;;;;;;GAMG;AAEH;;;;GAIG;AACH;IACE;;;;OAIG;IACH,oBAJW,MAAM,eACN,WAAW,WACX,aAAa,EAsNvB;IAnNC,iCAAoB;IACpB,+CAA8B;IAC9B,6CAAsB;IACtB,gBAAwD;IACxD,eAAmC;IACnC,oCAAoC;IACpC,cADW,MAAM,MAAM,GAAC,MAAM,CAAC,CACT;IASpB,iBAA2C;IA2D7C,sBAA4D;IAuB5D;;;UAGM;IACN,kBAFW,OAAO,oBAAoB,EAAE,OAAO,CAAC,OAAO,CAAC,UAmDvD;IAiBD,iCAEC;IAqBD;;OAEG;IACH,sCAgBC;IAIH;;;OAGG;IACH,kBAFW,OAAO,QAIjB;IAED;;;;OAIG;IACH,kCAHW,OAAO,GAAG,aAAa,GAAG,OAAO,WAAW,EAAE,MAAM,yBAU7D;IAEF;;;;OAIG;IACH,mBAHW,MAAM,MAAM,GAAG,MAAM,CAAC,0BAgChC;IAED;;OAEG;IACH,eAMC;IAED;;;;;OAKG;IACH,eAJW,OAAO,GAAG,aAAa,GACrB,MAAM,GAAG,MAAM,CAgB3B;CACF;qBAjUY,OAAO,SAAS,EAAE,MAAM;uBACxB,OAAO,aAAa,EAAE,QAAQ;0BAC9B,OAAO,aAAa,EAAE,WAAW;4BACjC,OAAO,aAAa,EAAE,aAAa;0BACnC,OAAO,aAAa,EAAE,WAAW;oBAV1B,YAAY;0BACN,mBAAmB"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @typedef {import("../../types").EoxLayer} EoxLayer
3
+ * */
4
+ /**
5
+ * Generates a tile grid for the specified layer. If the layer's source type is "WMTS",
6
+ * a `WMTSTileGrid` is generated. Otherwise, an `XYZ` tile grid is generated using the
7
+ * OpenLayers `createXYZ` function. Returns `undefined` if the layer's tile grid is not defined.
8
+ *
9
+ * @param {EoxLayer} layer - The layer configuration object, containing source and tile grid information.
10
+ * @returns {import("ol/tilegrid/WMTS").default | import("ol/tilegrid/TileGrid").default | undefined} - The generated tile grid or `undefined` if not applicable.
11
+ */
12
+ export function generateTileGrid(layer: EoxLayer): import("ol/tilegrid/WMTS").default | import("ol/tilegrid/TileGrid").default | undefined;
13
+ export type EoxLayer = import("../../types").EoxLayer;
14
+ //# sourceMappingURL=tile-grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tile-grid.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/tile-grid.js"],"names":[],"mappings":"AAKA;;KAEK;AAEL;;;;;;;GAOG;AACH,wCAHW,QAAQ,GACN,OAAO,kBAAkB,EAAE,OAAO,GAAG,OAAO,sBAAsB,EAAE,OAAO,GAAG,SAAS,CAkDnG;uBA3DY,OAAO,aAAa,EAAE,QAAQ"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Transforms coordinates to a given projection.
3
+ * If no `destination` is defined, the coordinate is transformed to EPSG:4326
4
+ * @param {import('ol/coordinate').Coordinate} coordinate
5
+ * @param {import('ol/proj').ProjectionLike} source
6
+ * @param {import('ol/proj').ProjectionLike} destination
7
+ * @returns {import('ol/coordinate').Coordinate}
8
+ */
9
+ export function transform(coordinate: import('ol/coordinate').Coordinate, source: import('ol/proj').ProjectionLike, destination?: import('ol/proj').ProjectionLike): import('ol/coordinate').Coordinate;
10
+ /**
11
+ * Transforms an extent to a given projection.
12
+ * Uf no `destination` is defined, the extent is transformed to EPSG:4326.
13
+ * @param {import('ol/extent').Extent} extent
14
+ * @param {import('ol/proj').ProjectionLike} source
15
+ * @param {import('ol/proj').ProjectionLike=} destination
16
+ * @returns {import('ol/extent').Extent}
17
+ */
18
+ export function transformExtent(extent: import('ol/extent').Extent, source: import('ol/proj').ProjectionLike, destination?: import('ol/proj').ProjectionLike | undefined): import('ol/extent').Extent;
19
+ //# sourceMappingURL=transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/transform.js"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,sCALW,OAAO,eAAe,EAAE,UAAU,UAClC,OAAO,SAAS,EAAE,cAAc,gBAChC,OAAO,SAAS,EAAE,cAAc,GAC9B,OAAO,eAAe,EAAE,UAAU,CAO9C;AAED;;;;;;;GAOG;AACH,wCALW,OAAO,WAAW,EAAE,MAAM,UAC1B,OAAO,SAAS,EAAE,cAAc,gBAChC,OAAO,SAAS,EAAE,cAAc,eAC9B,OAAO,WAAW,EAAE,MAAM,CAOtC"}