@artstesh/maps 1.1.6 → 1.1.8

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 (132) hide show
  1. package/dist/bundles/maps-components-src-map.umd.js +488 -168
  2. package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
  3. package/dist/bundles/maps-components.umd.js +488 -168
  4. package/dist/bundles/maps-components.umd.js.map +1 -1
  5. package/dist/esm2015/map/helpers/marker-style.helper.js +27 -1
  6. package/dist/esm2015/map/helpers/polygon-style.helper.js +22 -1
  7. package/dist/esm2015/map/helpers/stringify-feature.helper.js +24 -21
  8. package/dist/esm2015/map/helpers/text-style.helper.js +12 -1
  9. package/dist/esm2015/map/map-plate/controls/map-control-zoom/map-control-zoom.component.js +18 -1
  10. package/dist/esm2015/map/map-plate/controls/map-control-zoom/zoom-control.settings.js +72 -1
  11. package/dist/esm2015/map/map-plate/features/markers/markers.component.js +11 -1
  12. package/dist/esm2015/map/map-plate/features/polygons/polygons.component.js +11 -1
  13. package/dist/esm2015/map/map-plate/layers/cluster-layer/cluster-layer.component.js +15 -7
  14. package/dist/esm2015/map/map-plate/layers/cluster-layer/cluster-layer.settings.js +79 -1
  15. package/dist/esm2015/map/map-plate/layers/feature-layer/feature-layer.component.js +7 -7
  16. package/dist/esm2015/map/map-plate/layers/feature-layer/feature-layer.settings.js +37 -17
  17. package/dist/esm2015/map/map-plate/layers/tile-layer/tile-layer.component.js +7 -7
  18. package/dist/esm2015/map/map-plate/layers/tile-layer/tile-layer.settings.js +76 -1
  19. package/dist/esm2015/map/map-plate/map-plate.component.js +2 -2
  20. package/dist/esm2015/map/map-plate/tooltips/tooltip/tooltip.component.js +15 -15
  21. package/dist/esm2015/map/map-plate/tooltips/tooltip/tooltip.settings.js +1 -1
  22. package/dist/esm2015/map/messages/commands/draw-selection-area.command.js +1 -1
  23. package/dist/esm2015/map/messages/commands/fit-to-polygons.command.js +13 -0
  24. package/dist/esm2015/map/messages/index.js +2 -1
  25. package/dist/esm2015/map/messages/queries/get-features-in-area.query.js +1 -1
  26. package/dist/esm2015/map/models/index.js +1 -2
  27. package/dist/esm2015/map/models/map-control.js +2 -2
  28. package/dist/esm2015/map/models/marker-model.js +1 -1
  29. package/dist/esm2015/map/models/polygon.model.js +4 -4
  30. package/dist/esm2015/map/services/drawing/drawing.service.js +3 -2
  31. package/dist/esm2015/map/services/feature.service.js +6 -6
  32. package/dist/esm2015/map/services/map-click.service.js +10 -10
  33. package/dist/esm2015/map/services/map-feature.service.js +17 -4
  34. package/dist/esm2015/map/services/map-management.service.js +2 -2
  35. package/dist/esm2015/map/services/map-state.service.js +2 -3
  36. package/dist/esm2015/map/services/message-registrator.service.js +3 -2
  37. package/dist/esm2015/src/map/helpers/marker-style.helper.js +27 -1
  38. package/dist/esm2015/src/map/helpers/polygon-style.helper.js +22 -1
  39. package/dist/esm2015/src/map/helpers/stringify-feature.helper.js +24 -21
  40. package/dist/esm2015/src/map/helpers/text-style.helper.js +12 -1
  41. package/dist/esm2015/src/map/map-plate/controls/map-control-zoom/map-control-zoom.component.js +18 -1
  42. package/dist/esm2015/src/map/map-plate/controls/map-control-zoom/zoom-control.settings.js +72 -1
  43. package/dist/esm2015/src/map/map-plate/features/markers/markers.component.js +11 -1
  44. package/dist/esm2015/src/map/map-plate/features/polygons/polygons.component.js +11 -1
  45. package/dist/esm2015/src/map/map-plate/layers/cluster-layer/cluster-layer.component.js +15 -7
  46. package/dist/esm2015/src/map/map-plate/layers/cluster-layer/cluster-layer.settings.js +79 -1
  47. package/dist/esm2015/src/map/map-plate/layers/feature-layer/feature-layer.component.js +7 -7
  48. package/dist/esm2015/src/map/map-plate/layers/feature-layer/feature-layer.settings.js +37 -17
  49. package/dist/esm2015/src/map/map-plate/layers/tile-layer/tile-layer.component.js +7 -7
  50. package/dist/esm2015/src/map/map-plate/layers/tile-layer/tile-layer.settings.js +76 -1
  51. package/dist/esm2015/src/map/map-plate/map-plate.component.js +2 -2
  52. package/dist/esm2015/src/map/map-plate/tooltips/tooltip/tooltip.component.js +15 -15
  53. package/dist/esm2015/src/map/map-plate/tooltips/tooltip/tooltip.settings.js +1 -1
  54. package/dist/esm2015/src/map/messages/commands/draw-selection-area.command.js +1 -1
  55. package/dist/esm2015/src/map/messages/commands/fit-to-polygons.command.js +13 -0
  56. package/dist/esm2015/src/map/messages/index.js +2 -1
  57. package/dist/esm2015/src/map/messages/queries/get-features-in-area.query.js +1 -1
  58. package/dist/esm2015/src/map/models/index.js +1 -2
  59. package/dist/esm2015/src/map/models/map-control.js +2 -2
  60. package/dist/esm2015/src/map/models/marker-model.js +1 -1
  61. package/dist/esm2015/src/map/models/polygon.model.js +4 -4
  62. package/dist/esm2015/src/map/services/drawing/drawing.service.js +3 -2
  63. package/dist/esm2015/src/map/services/feature.service.js +6 -6
  64. package/dist/esm2015/src/map/services/map-click.service.js +10 -10
  65. package/dist/esm2015/src/map/services/map-feature.service.js +17 -4
  66. package/dist/esm2015/src/map/services/map-management.service.js +2 -2
  67. package/dist/esm2015/src/map/services/map-state.service.js +2 -3
  68. package/dist/esm2015/src/map/services/message-registrator.service.js +3 -2
  69. package/dist/fesm2015/maps-components-src-map.js +468 -146
  70. package/dist/fesm2015/maps-components-src-map.js.map +1 -1
  71. package/dist/fesm2015/maps-components.js +468 -146
  72. package/dist/fesm2015/maps-components.js.map +1 -1
  73. package/dist/map/helpers/marker-style.helper.d.ts +26 -0
  74. package/dist/map/helpers/polygon-style.helper.d.ts +21 -0
  75. package/dist/map/helpers/stringify-feature.helper.d.ts +18 -0
  76. package/dist/map/helpers/text-style.helper.d.ts +11 -0
  77. package/dist/map/map-plate/controls/map-control-zoom/map-control-zoom.component.d.ts +20 -3
  78. package/dist/map/map-plate/controls/map-control-zoom/zoom-control.settings.d.ts +71 -0
  79. package/dist/map/map-plate/features/markers/markers.component.d.ts +10 -0
  80. package/dist/map/map-plate/features/polygons/polygons.component.d.ts +10 -0
  81. package/dist/map/map-plate/layers/cluster-layer/cluster-layer.component.d.ts +10 -2
  82. package/dist/map/map-plate/layers/cluster-layer/cluster-layer.settings.d.ts +78 -0
  83. package/dist/map/map-plate/layers/feature-layer/feature-layer.component.d.ts +2 -2
  84. package/dist/map/map-plate/layers/feature-layer/feature-layer.settings.d.ts +36 -16
  85. package/dist/map/map-plate/layers/tile-layer/tile-layer.component.d.ts +1 -1
  86. package/dist/map/map-plate/layers/tile-layer/tile-layer.settings.d.ts +75 -0
  87. package/dist/map/map-plate/map-plate.component.d.ts +2 -2
  88. package/dist/map/map-plate/tooltips/tooltip/tooltip.component.d.ts +5 -5
  89. package/dist/map/map-plate/tooltips/tooltip/tooltip.settings.d.ts +1 -1
  90. package/dist/map/messages/commands/draw-selection-area.command.d.ts +2 -1
  91. package/dist/map/messages/commands/fit-to-polygons.command.d.ts +9 -0
  92. package/dist/map/messages/index.d.ts +1 -0
  93. package/dist/map/messages/queries/get-features-in-area.query.d.ts +1 -1
  94. package/dist/map/models/index.d.ts +0 -1
  95. package/dist/map/models/map-control.d.ts +1 -1
  96. package/dist/map/models/polygon.model.d.ts +2 -2
  97. package/dist/map/services/feature.service.d.ts +1 -1
  98. package/dist/map/services/map-click.service.d.ts +1 -1
  99. package/dist/map/services/map-feature.service.d.ts +2 -0
  100. package/dist/package.json +2 -1
  101. package/dist/src/map/helpers/marker-style.helper.d.ts +26 -0
  102. package/dist/src/map/helpers/polygon-style.helper.d.ts +21 -0
  103. package/dist/src/map/helpers/stringify-feature.helper.d.ts +18 -0
  104. package/dist/src/map/helpers/text-style.helper.d.ts +11 -0
  105. package/dist/src/map/map-plate/controls/map-control-zoom/map-control-zoom.component.d.ts +20 -3
  106. package/dist/src/map/map-plate/controls/map-control-zoom/zoom-control.settings.d.ts +71 -0
  107. package/dist/src/map/map-plate/features/markers/markers.component.d.ts +10 -0
  108. package/dist/src/map/map-plate/features/polygons/polygons.component.d.ts +10 -0
  109. package/dist/src/map/map-plate/layers/cluster-layer/cluster-layer.component.d.ts +10 -2
  110. package/dist/src/map/map-plate/layers/cluster-layer/cluster-layer.settings.d.ts +78 -0
  111. package/dist/src/map/map-plate/layers/feature-layer/feature-layer.component.d.ts +2 -2
  112. package/dist/src/map/map-plate/layers/feature-layer/feature-layer.settings.d.ts +36 -16
  113. package/dist/src/map/map-plate/layers/tile-layer/tile-layer.component.d.ts +1 -1
  114. package/dist/src/map/map-plate/layers/tile-layer/tile-layer.settings.d.ts +75 -0
  115. package/dist/src/map/map-plate/map-plate.component.d.ts +2 -2
  116. package/dist/src/map/map-plate/tooltips/tooltip/tooltip.component.d.ts +5 -5
  117. package/dist/src/map/map-plate/tooltips/tooltip/tooltip.settings.d.ts +1 -1
  118. package/dist/src/map/messages/commands/draw-selection-area.command.d.ts +2 -1
  119. package/dist/src/map/messages/commands/fit-to-polygons.command.d.ts +9 -0
  120. package/dist/src/map/messages/index.d.ts +1 -0
  121. package/dist/src/map/messages/queries/get-features-in-area.query.d.ts +1 -1
  122. package/dist/src/map/models/index.d.ts +0 -1
  123. package/dist/src/map/models/map-control.d.ts +1 -1
  124. package/dist/src/map/models/polygon.model.d.ts +2 -2
  125. package/dist/src/map/services/feature.service.d.ts +1 -1
  126. package/dist/src/map/services/map-click.service.d.ts +1 -1
  127. package/dist/src/map/services/map-feature.service.d.ts +2 -0
  128. package/package.json +3 -2
  129. package/dist/esm2015/map/models/dictionary.js +0 -56
  130. package/dist/esm2015/src/map/models/dictionary.js +0 -56
  131. package/dist/map/models/dictionary.d.ts +0 -17
  132. package/dist/src/map/models/dictionary.d.ts +0 -17
@@ -3,7 +3,7 @@ import { Component, Injectable, ChangeDetectionStrategy, Input, ViewChild, NgMod
3
3
  import * as i6 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import { Feature, Collection } from 'ol';
6
- import { Point, LineString } from 'ol/geom';
6
+ import { Point } from 'ol/geom';
7
7
  import { GeoJSON, WKT } from 'ol/format';
8
8
  import { getCenter, createEmpty, extend } from 'ol/extent';
9
9
  import { Control, Zoom } from 'ol/control';
@@ -12,6 +12,7 @@ import { PostboyGenericMessage, PostboyCallbackMessage, PostboyExecutor, Postboy
12
12
  import { Draw, Modify, Translate } from 'ol/interaction';
13
13
  import { createRegularPolygon, createBox } from 'ol/interaction/Draw';
14
14
  import * as Sphere from 'ol/sphere';
15
+ import { Dictionary } from '@artstesh/collections';
15
16
  import { first, filter, auditTime } from 'rxjs/operators';
16
17
  import { Vector, XYZ } from 'ol/source';
17
18
  import TileLayer from 'ol/layer/Tile';
@@ -165,6 +166,9 @@ class PolygonModel {
165
166
  (_a = this._feature) === null || _a === void 0 ? void 0 : _a.set(MapConstants.FeatureInfo, this.info);
166
167
  [this.lng, this.lat] = getCenter((_b = this._feature.getGeometry()) === null || _b === void 0 ? void 0 : _b.getExtent());
167
168
  }
169
+ get feature() {
170
+ return this._feature;
171
+ }
168
172
  static fromGeoJson(id, json, info) {
169
173
  let feature = new GeoJSON().readFeature(json);
170
174
  feature.setId(id);
@@ -175,9 +179,6 @@ class PolygonModel {
175
179
  feature.setId(id);
176
180
  return new PolygonModel(feature, id, info);
177
181
  }
178
- get feature() {
179
- return this._feature;
180
- }
181
182
  }
182
183
 
183
184
  var DrawingType;
@@ -194,65 +195,9 @@ var FeatureOutputFormat;
194
195
  FeatureOutputFormat[FeatureOutputFormat["WKT"] = 2] = "WKT";
195
196
  })(FeatureOutputFormat || (FeatureOutputFormat = {}));
196
197
 
197
- class Dictionary {
198
- constructor() {
199
- this.collection = {};
200
- this._keys = new Set();
201
- this.has = (key) => this._keys.has(key);
202
- }
203
- get keys() {
204
- return Array.from(this._keys);
205
- }
206
- get size() {
207
- return this._keys.size;
208
- }
209
- static clone(dic, action) {
210
- return Dictionary.create(dic.collection, action);
211
- }
212
- static create(dic, action) {
213
- let keyList = Object.keys(dic);
214
- const result = new Dictionary();
215
- for (let i = 0; i < keyList.length; i++) {
216
- let key = keyList[i];
217
- result._keys.add(key);
218
- result.collection[key] = action ? action(dic[key], key) : dic[key];
219
- }
220
- return result;
221
- }
222
- find(predicate) {
223
- let result = null;
224
- this.forEach((e) => {
225
- if (result === null && predicate(e))
226
- result = e;
227
- });
228
- return result;
229
- }
230
- take(key) {
231
- return this._keys.has(key) ? this.collection[key] : null;
232
- }
233
- put(key, value) {
234
- if (value == null)
235
- return;
236
- this.collection[key] = value;
237
- this._keys.add(key);
238
- }
239
- rmv(key) {
240
- if (!this._keys.has(key))
241
- return;
242
- delete this.collection[key];
243
- this._keys.delete(key);
244
- }
245
- forEach(callback) {
246
- let keys = Object.keys(this.collection);
247
- for (let i = 0; i < keys.length; i++) {
248
- callback(this.collection[keys[i]], i);
249
- }
250
- }
251
- }
252
-
253
198
  /**
254
199
  *
255
- * A control is a visible widget with a DOM element in a fixed position on the screen. They can involve user input (buttons), or be informational only; the position is determined using CSS. By default these are placed in the container with CSS class name ol-overlaycontainer-stopevent, but can use any outside DOM element.
200
+ * A control is a visible widget with a DOM element in a fixed position on the screen. They can involve user input (buttons), or be informational only; the position is determined using CSS. By default, these are placed in the container with CSS class name ol-overlaycontainer-stopevent, but can use any outside DOM element.
256
201
  * This is the base class for controls. You can use it for simple custom controls by creating the element with listeners, creating an instance:
257
202
  * var myControl = new Control({element: myElement}); and then adding this to the map.
258
203
  * The main advantage of having this as a control rather than a simple separate DOM element is that preventing propagation is handled for you. Controls will also be objects in a module:ol/Collection~Collection, so you can use their methods.
@@ -419,6 +364,18 @@ class CalculateAreaExecutor extends PostboyExecutor {
419
364
  }
420
365
  CalculateAreaExecutor.ID = '172ecf46-86b5-4f46-a5f1-96ba2cbb1694';
421
366
 
367
+ class FitToPolygonsCommand extends PostboyGenericMessage {
368
+ constructor(features, zoomAfter = 0) {
369
+ super();
370
+ this.features = features;
371
+ this.zoomAfter = zoomAfter;
372
+ }
373
+ get id() {
374
+ return FitToPolygonsCommand.ID;
375
+ }
376
+ }
377
+ FitToPolygonsCommand.ID = 'a9e42b23-ffaf-4c46-8370-e0432cd14d60';
378
+
422
379
  class AddLayerCommand extends PostboyGenericMessage {
423
380
  constructor(layer) {
424
381
  super();
@@ -535,6 +492,11 @@ class FeatureService {
535
492
  static filterFeaturesInArea(query) {
536
493
  return query.features.filter((f) => FeatureService.booleanIntersects(query.area, f.getGeometry()));
537
494
  }
495
+ static calculateArea(g) {
496
+ if (!g)
497
+ return 0;
498
+ return Sphere.getArea(g, { projection: 'EPSG:4326' });
499
+ }
538
500
  static booleanIntersects(g1, g2) {
539
501
  if (g2.getType() === 'Point')
540
502
  return g1.intersectsCoordinate(g2.getCoordinates());
@@ -544,11 +506,6 @@ class FeatureService {
544
506
  return g1.intersectsCoordinate(g2.getInteriorPoint().getCoordinates());
545
507
  return false;
546
508
  }
547
- static calculateArea(g) {
548
- if (!g)
549
- return 0;
550
- return Sphere.getArea(g, { projection: 'EPSG:4326' });
551
- }
552
509
  }
553
510
 
554
511
  class GetFeaturesInAreaQuery extends PostboyCallbackMessage {
@@ -757,15 +714,28 @@ class MapFeatureService {
757
714
  up() {
758
715
  this.observeMapRender();
759
716
  this.observeFitToFeatures();
717
+ this.observeFitToPolygons();
760
718
  }
761
719
  observeMapRender() {
762
720
  this.postboy.subscribe(MapRenderedEvent.ID).subscribe((m) => {
763
721
  this.map = m.map;
722
+ if (this.fitPolygonsWaiting)
723
+ this.postboy.fire(this.fitPolygonsWaiting);
764
724
  });
765
725
  }
766
726
  observeFitToFeatures() {
767
- this.postboy.subscribe(FitToFeaturesCommand.ID).subscribe((m) => {
768
- this.fitToGeometries(m.features.map((f) => f.getGeometry()), m.zoomAfter);
727
+ this.postboy.subscribe(FitToFeaturesCommand.ID).subscribe((cmd) => {
728
+ this.fitToGeometries(cmd.features.map((f) => f.getGeometry()), cmd.zoomAfter);
729
+ });
730
+ }
731
+ observeFitToPolygons() {
732
+ this.postboy.subscribe(FitToPolygonsCommand.ID).subscribe((cmd) => {
733
+ if (!this.map) {
734
+ this.fitPolygonsWaiting = cmd;
735
+ return;
736
+ }
737
+ this.fitPolygonsWaiting = undefined;
738
+ this.fitToGeometries(cmd.features.map((f) => f.feature.getGeometry()), cmd.zoomAfter);
769
739
  });
770
740
  }
771
741
  fitToGeometries(geometries, zoomAfter) {
@@ -790,15 +760,6 @@ class MapClickService {
790
760
  up() {
791
761
  this.observeMapRender();
792
762
  }
793
- observeMapRender() {
794
- this.postboy.subscribe(MapRenderedEvent.ID).subscribe((m) => {
795
- var _a;
796
- this.map = m.map;
797
- (_a = this.map) === null || _a === void 0 ? void 0 : _a.on('singleclick', (e) => {
798
- this.postboy.fire(this.onClick(e));
799
- });
800
- });
801
- }
802
763
  onClick(ev) {
803
764
  var _a;
804
765
  const model = new MapClickEvent(ev.coordinate, {}, {});
@@ -817,6 +778,15 @@ class MapClickService {
817
778
  });
818
779
  return model;
819
780
  }
781
+ observeMapRender() {
782
+ this.postboy.subscribe(MapRenderedEvent.ID).subscribe((m) => {
783
+ var _a;
784
+ this.map = m.map;
785
+ (_a = this.map) === null || _a === void 0 ? void 0 : _a.on('singleclick', (e) => {
786
+ this.postboy.fire(this.onClick(e));
787
+ });
788
+ });
789
+ }
820
790
  getFeatureCollectionWithInner(features) {
821
791
  const result = [];
822
792
  features === null || features === void 0 ? void 0 : features.forEach((f) => {
@@ -1056,6 +1026,7 @@ class MessageRegistratorService extends PostboyAbstractRegistrator {
1056
1026
  this.registerSubject(MapClickEvent.ID);
1057
1027
  this.registerSubject(CloseTooltipCommand.ID);
1058
1028
  this.registerSubject(FitToFeaturesCommand.ID);
1029
+ this.registerSubject(FitToPolygonsCommand.ID);
1059
1030
  this.registerSubject(MapMoveEndEvent.ID);
1060
1031
  this.registerSubject(CancelDrawingCommand.ID);
1061
1032
  this.registerSubject(StartDrawingCommand.ID);
@@ -1080,14 +1051,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1080
1051
  type: Injectable
1081
1052
  }], ctorParameters: function () { return [{ type: MapPostboyService }, { type: MapManagementService }, { type: MapStateService }, { type: MapFeatureService }, { type: MapClickService }, { type: DrawingService }, { type: FeatureModificationService }, { type: ControlsService }]; } });
1082
1053
 
1054
+ /**
1055
+ * Class representing settings for a tile layer.
1056
+ */
1083
1057
  class TileLayerSettings {
1084
1058
  constructor() {
1059
+ /**
1060
+ * The maximum zoom level for a map view.
1061
+ *
1062
+ * @type {number}
1063
+ * @default 19
1064
+ */
1085
1065
  this.maxZoom = 19;
1066
+ /**
1067
+ * The minimum zoom level allowed.
1068
+ *
1069
+ * @type {number}
1070
+ */
1086
1071
  this.minZoom = 0;
1072
+ /**
1073
+ * The opacity of an element.
1074
+ *
1075
+ * @type {number}
1076
+ * @default 0.6
1077
+ */
1087
1078
  this.opacity = 0.6;
1079
+ /**
1080
+ * Represents the tiles URL.
1081
+ * @typedef {string} url
1082
+ *
1083
+ * @example
1084
+ * 'https://example.ex/{z}/{x}/{y}.png'
1085
+ */
1088
1086
  this.url = '';
1087
+ /**
1088
+ * The projection of the coordinate system.
1089
+ *
1090
+ * @type {string}
1091
+ * @default 'EPSG:3857'
1092
+ */
1089
1093
  this.projection = 'EPSG:3857';
1090
1094
  }
1095
+ /**
1096
+ * Creates a copy of the given tile layer settings.
1097
+ *
1098
+ * @param {TileLayerSettings} model - The tile layer settings to be copied.
1099
+ * @return {TileLayerSettings} - A new instance of TileLayerSettings with the same properties as the model.
1100
+ */
1091
1101
  static copy(model) {
1092
1102
  const result = new TileLayerSettings();
1093
1103
  result.maxZoom = model.maxZoom;
@@ -1097,21 +1107,57 @@ class TileLayerSettings {
1097
1107
  result.url = model.url;
1098
1108
  return result;
1099
1109
  }
1110
+ /**
1111
+ * Sets the URL of the TileLayerSettings object.
1112
+ *
1113
+ * @param {string} url - The URL to be set.
1114
+ * @return {TileLayerSettings} - The updated TileLayerSettings object.
1115
+ */
1100
1116
  setUrl(url) {
1101
1117
  return TileLayerSettings.copy(Object.assign(Object.assign({}, this), { url }));
1102
1118
  }
1119
+ /**
1120
+ * Sets the maximum zoom level for the tile layer.
1121
+ *
1122
+ * @param {number} maxZoom - The maximum zoom level.
1123
+ * @returns {TileLayerSettings} - The updated tile layer settings object.
1124
+ */
1103
1125
  setMaxZoom(maxZoom) {
1104
1126
  return TileLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom }));
1105
1127
  }
1128
+ /**
1129
+ * Sets the minimum zoom level for the Tile Layer.
1130
+ *
1131
+ * @param {number} minZoom - The minimum zoom level to be set.
1132
+ * @return {TileLayerSettings} The modified TileLayerSettings object with the updated minimum zoom level.
1133
+ */
1106
1134
  setMinZoom(minZoom) {
1107
1135
  return TileLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom }));
1108
1136
  }
1137
+ /**
1138
+ * Sets the opacity of the TileLayerSettings.
1139
+ *
1140
+ * @param {number} opacity - The opacity value to set. Must be a number between 0 and 1.
1141
+ * @return {TileLayerSettings} - A new instance of TileLayerSettings with the opacity set.
1142
+ */
1109
1143
  setOpacity(opacity) {
1110
1144
  return TileLayerSettings.copy(Object.assign(Object.assign({}, this), { opacity }));
1111
1145
  }
1146
+ /**
1147
+ * Sets the projection for the tile layer settings.
1148
+ *
1149
+ * @param {string} projection - The desired projection for the tile layer settings.
1150
+ * @return {TileLayerSettings} - The updated tile layer settings with the new projection.
1151
+ */
1112
1152
  setProjection(projection) {
1113
1153
  return TileLayerSettings.copy(Object.assign(Object.assign({}, this), { projection }));
1114
1154
  }
1155
+ /**
1156
+ * Checks if the current instance of TileLayerSettings is equal to the given model.
1157
+ * @param {TileLayerSettings} model - The model to compare against.
1158
+ * @return {boolean} - True if all properties of the current instance matches the properties of the model;
1159
+ * otherwise, false.
1160
+ */
1115
1161
  isSame(model) {
1116
1162
  if (this.maxZoom !== model.maxZoom)
1117
1163
  return false;
@@ -1180,18 +1226,18 @@ class TileLayerComponent extends DestructibleComponent {
1180
1226
  this._settings = new TileLayerSettings();
1181
1227
  this.onDestroy = () => this.removeLayer();
1182
1228
  }
1183
- ngOnInit() {
1184
- this.postboy
1185
- .subscribe(MapRenderedEvent.ID)
1186
- .pipe(filter((m) => !!m), first())
1187
- .subscribe((m) => this.initLayer());
1188
- }
1189
1229
  set settings(value) {
1190
1230
  if (!value || this._settings.isSame(value))
1191
1231
  return;
1192
1232
  this._settings = value;
1193
1233
  this.initLayer();
1194
1234
  }
1235
+ ngOnInit() {
1236
+ this.postboy
1237
+ .subscribe(MapRenderedEvent.ID)
1238
+ .pipe(filter((m) => !!m), first())
1239
+ .subscribe((m) => this.initLayer());
1240
+ }
1195
1241
  initLayer() {
1196
1242
  this.removeLayer();
1197
1243
  this.layer = this.factory.build(this._settings);
@@ -1286,17 +1332,24 @@ class FeatureLayerSettings {
1286
1332
  */
1287
1333
  this.zIndex = 1;
1288
1334
  /**
1289
- * The maximum zoom at which the layer is visible. 19 by default
1335
+ The maximum view zoom level (inclusive) at which this layer will be visible.
1336
+
1337
+ @type {number}
1338
+ @default 19
1290
1339
  */
1291
1340
  this.maxZoom = 19;
1292
1341
  /**
1293
- * The minimum zoom at which the layer is visible. 0 by default
1342
+ The minimum view zoom level (exclusive) at which this layer will be visible.
1343
+
1344
+ @type {number}
1294
1345
  */
1295
1346
  this.minZoom = 0;
1296
1347
  }
1297
1348
  /**
1298
- * Creates a clone of the existing settings
1299
- * @param model
1349
+ * Copies the given FeatureLayerSettings object
1350
+ *
1351
+ * @param {FeatureLayerSettings} model - The FeatureLayerSettings object to be copied
1352
+ * @returns {FeatureLayerSettings} - A copy of the FeatureLayerSettings object
1300
1353
  */
1301
1354
  static copy(model) {
1302
1355
  const result = new FeatureLayerSettings();
@@ -1308,43 +1361,56 @@ class FeatureLayerSettings {
1308
1361
  return result;
1309
1362
  }
1310
1363
  /**
1311
- Setter for {@link FeatureLayerSettings.zIndex}
1312
- * @param zIndex
1364
+ * Sets the z-index value for the FeatureLayerSettings object.
1365
+ *
1366
+ * @param {number} zIndex - The new z-index value.
1367
+ * @return {FeatureLayerSettings} - The updated FeatureLayerSettings object.
1313
1368
  */
1314
1369
  setZIndex(zIndex) {
1315
1370
  return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { zIndex }));
1316
1371
  }
1317
1372
  /**
1318
- * Setter for {@link FeatureLayerSettings.name}
1319
- * @param name
1373
+ * Sets the name of the FeatureLayerSettings.
1374
+ *
1375
+ * @param {string} name - The name to set for the FeatureLayerSettings.
1376
+ *
1377
+ * @return {FeatureLayerSettings} - The updated FeatureLayerSettings object with the new name.
1320
1378
  */
1321
1379
  setName(name) {
1322
1380
  return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { name }));
1323
1381
  }
1324
1382
  /**
1325
- * Setter for {@link FeatureLayerSettings.maxZoom}
1326
- * @param maxZoom
1383
+ * Sets the maximum zoom level for the FeatureLayerSettings.
1384
+ *
1385
+ * @param {number} maxZoom - The maximum zoom level.
1386
+ * @return {FeatureLayerSettings} - The updated FeatureLayerSettings object.
1327
1387
  */
1328
1388
  setMaxZoom(maxZoom) {
1329
1389
  return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom }));
1330
1390
  }
1331
1391
  /**
1332
- * Setter for {@link FeatureLayerSettings.minZoom}
1333
- * @param minZoom
1392
+ * Sets the minimum zoom level for the feature layer.
1393
+ *
1394
+ * @param {number} minZoom The minimum zoom level to be set.
1395
+ * @returns {FeatureLayerSettings} The updated feature layer settings object.
1334
1396
  */
1335
1397
  setMinZoom(minZoom) {
1336
1398
  return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom }));
1337
1399
  }
1338
1400
  /**
1339
- * Setter for {@link FeatureLayerSettings.style}
1340
- * @param style
1401
+ * Sets the style for the FeatureLayerSettings object.
1402
+ *
1403
+ * @param {Style | StyleFunction} style - The new style to set. It can be either a Style object or a StyleFunction.
1404
+ * @return {FeatureLayerSettings} - The updated FeatureLayerSettings object with the new style.
1341
1405
  */
1342
1406
  setStyle(style) {
1343
1407
  return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { style }));
1344
1408
  }
1345
1409
  /**
1346
- * Checks if the model has the same content
1347
- * @param model - the object to compare
1410
+ * Checks if the given FeatureLayerSettings object is identical to the current object.
1411
+ *
1412
+ * @param {FeatureLayerSettings} model - The FeatureLayerSettings object to compare with.
1413
+ * @return {boolean} - Returns true if the given object is identical to the current object, otherwise false.
1348
1414
  */
1349
1415
  isSame(model) {
1350
1416
  if (this.maxZoom !== model.maxZoom)
@@ -1394,18 +1460,18 @@ class FeatureLayerComponent extends DestructibleComponent {
1394
1460
  this._settings = new FeatureLayerSettings();
1395
1461
  this.onDestroy = () => this.removeLayer();
1396
1462
  }
1397
- ngOnInit() {
1398
- this.postboy
1399
- .subscribe(MapRenderedEvent.ID)
1400
- .pipe(filter((m) => !!m), first())
1401
- .subscribe((m) => this.initLayer());
1402
- }
1403
1463
  set settings(value) {
1404
1464
  if (!value || this._settings.isSame(value))
1405
1465
  return;
1406
1466
  this._settings = value;
1407
1467
  this.initLayer();
1408
1468
  }
1469
+ ngOnInit() {
1470
+ this.postboy
1471
+ .subscribe(MapRenderedEvent.ID)
1472
+ .pipe(filter((m) => !!m), first())
1473
+ .subscribe((m) => this.initLayer());
1474
+ }
1409
1475
  initLayer() {
1410
1476
  this.removeLayer();
1411
1477
  this.layer = this.factory.build(this._settings);
@@ -1434,12 +1500,34 @@ class ClusterLayerSettings {
1434
1500
  constructor() {
1435
1501
  this.name = IdGenerator.get();
1436
1502
  this.zIndex = 1;
1503
+ /**
1504
+ * The maximum view zoom level (inclusive) at which this layer will be visible.
1505
+ *
1506
+ * @type {number}
1507
+ * @default 19
1508
+ */
1437
1509
  this.maxZoom = 19;
1510
+ /**
1511
+ * The minimum view zoom level (exclusive) at which this layer will be visible.
1512
+ *
1513
+ * @type {number}
1514
+ */
1438
1515
  this.minZoom = 0;
1516
+ /**
1517
+ * Distance in pixels within which features will be clustered together.
1518
+ *
1519
+ * @type {number}
1520
+ */
1439
1521
  this.distance = 20;
1440
1522
  this.bbox = false;
1441
1523
  this.clusterCancel = 14;
1442
1524
  }
1525
+ /**
1526
+ * Creates a copy of the given ClusterLayerSettings object.
1527
+ *
1528
+ * @param {ClusterLayerSettings} model - The ClusterLayerSettings object to be copied.
1529
+ * @returns {ClusterLayerSettings} - A new ClusterLayerSettings object that is a copy of the original object.
1530
+ */
1443
1531
  static copy(model) {
1444
1532
  const result = new ClusterLayerSettings();
1445
1533
  result.name = model.name;
@@ -1452,30 +1540,86 @@ class ClusterLayerSettings {
1452
1540
  result.style = model.style;
1453
1541
  return result;
1454
1542
  }
1543
+ /**
1544
+ * Set the z-index for the ClusterLayer.
1545
+ *
1546
+ * @param {number} zIndex - The new z-index for the ClusterLayer.
1547
+ * @return {ClusterLayerSettings} - The updated ClusterLayerSettings object.
1548
+ */
1455
1549
  setZIndex(zIndex) {
1456
1550
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { zIndex }));
1457
1551
  }
1552
+ /**
1553
+ * Sets the distance value for ClusterLayerSettings.
1554
+ *
1555
+ * @param {number} distance - The distance value to be set.
1556
+ * @return {ClusterLayerSettings} - The modified ClusterLayerSettings object.
1557
+ */
1458
1558
  setDistance(distance) {
1459
1559
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { distance }));
1460
1560
  }
1561
+ /**
1562
+ * Sets the name of the ClusterLayerSettings object.
1563
+ *
1564
+ * @param {string} name - The name to set for the ClusterLayerSettings.
1565
+ * @return {ClusterLayerSettings} - A new ClusterLayerSettings object with the updated name.
1566
+ */
1461
1567
  setName(name) {
1462
1568
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { name }));
1463
1569
  }
1570
+ /**
1571
+ * Sets the maximum zoom level for the Cluster Layer.
1572
+ *
1573
+ * @param {number} maxZoom - The maximum zoom level to be set.
1574
+ * @return {ClusterLayerSettings} - The updated ClusterLayerSettings object.
1575
+ */
1464
1576
  setMaxZoom(maxZoom) {
1465
1577
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom }));
1466
1578
  }
1579
+ /**
1580
+ * Sets the minimum zoom level for the ClusterLayerSettings.
1581
+ *
1582
+ * @param {number} minZoom - The minimum zoom level to set.
1583
+ * @return {ClusterLayerSettings} - The updated ClusterLayerSettings object.
1584
+ */
1467
1585
  setMinZoom(minZoom) {
1468
1586
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom }));
1469
1587
  }
1588
+ /**
1589
+ * Sets the cluster cancel number for the ClusterLayerSettings.
1590
+ *
1591
+ * @param {number} clusterCancel - The new cluster cancel number.
1592
+ * @returns {ClusterLayerSettings} - The updated ClusterLayerSettings object.
1593
+ */
1470
1594
  setClusterCancel(clusterCancel) {
1471
1595
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { clusterCancel }));
1472
1596
  }
1597
+ /**
1598
+ * Sets the value of 'bbox' property in the ClusterLayerSettings object.
1599
+ *
1600
+ * @param {boolean} bbox - A boolean value indicating whether to include bounding box calculation in the cluster layer settings.
1601
+ * @returns {ClusterLayerSettings} - The updated ClusterLayerSettings object with the newly set 'bbox' value.
1602
+ */
1473
1603
  setBbox(bbox) {
1474
1604
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { bbox }));
1475
1605
  }
1606
+ /**
1607
+ * Sets the style for the ClusterLayerSettings.
1608
+ *
1609
+ * @param {function} style - A function that takes an array of identified features as input and returns a Style or StyleFunction.
1610
+ *
1611
+ * @return {ClusterLayerSettings} - The updated ClusterLayerSettings object with the new style applied.
1612
+ */
1476
1613
  setStyle(style) {
1477
1614
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { style }));
1478
1615
  }
1616
+ /**
1617
+ * Checks if the current ClusterLayerSettings object is the same as the specified model.
1618
+ *
1619
+ * @param {ClusterLayerSettings} model - The model to compare with the current object.
1620
+ *
1621
+ * @return {boolean} - Returns true if the current ClusterLayerSettings object is the same as the specified model, otherwise false.
1622
+ */
1479
1623
  isSame(model) {
1480
1624
  if (this.maxZoom !== model.maxZoom)
1481
1625
  return false;
@@ -1580,6 +1724,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1580
1724
  }]
1581
1725
  }] });
1582
1726
 
1727
+ /**
1728
+ * Represents a cluster layer component.
1729
+ */
1583
1730
  class ClusterLayerComponent extends DestructibleComponent {
1584
1731
  constructor(postboy, factory) {
1585
1732
  super();
@@ -1589,18 +1736,23 @@ class ClusterLayerComponent extends DestructibleComponent {
1589
1736
  this._settings = new ClusterLayerSettings();
1590
1737
  this.onDestroy = () => this.removeLayer();
1591
1738
  }
1592
- ngOnInit() {
1593
- this.postboy
1594
- .subscribe(MapRenderedEvent.ID)
1595
- .pipe(filter((m) => !!m), first())
1596
- .subscribe((m) => this.initLayer());
1597
- }
1739
+ /**
1740
+ * Sets the settings for the cluster layer.
1741
+ *
1742
+ * @param {ClusterLayerSettings | undefined} value - The settings for the cluster layer.
1743
+ */
1598
1744
  set settings(value) {
1599
1745
  if (!value || this._settings.isSame(value))
1600
1746
  return;
1601
1747
  this._settings = value;
1602
1748
  this.initLayer();
1603
1749
  }
1750
+ ngOnInit() {
1751
+ this.postboy
1752
+ .subscribe(MapRenderedEvent.ID)
1753
+ .pipe(filter((m) => !!m), first())
1754
+ .subscribe((m) => this.initLayer());
1755
+ }
1604
1756
  initLayer() {
1605
1757
  this.removeLayer();
1606
1758
  this.manager = this.factory.build(this._settings, this.postboy);
@@ -1658,8 +1810,8 @@ class MapPlateComponent extends DestructibleComponent {
1658
1810
  this.registrator = registrator;
1659
1811
  this.detector = detector;
1660
1812
  this.osmUrl = '';
1661
- this._settings = new MapSettings();
1662
1813
  this.drawingLayerSettings = new FeatureLayerSettings().setName(MapConstants.DrawingLayerId);
1814
+ this._settings = new MapSettings();
1663
1815
  this.onDestroy = () => {
1664
1816
  this.registrator.down();
1665
1817
  };
@@ -1727,6 +1879,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1727
1879
  type: Input
1728
1880
  }] } });
1729
1881
 
1882
+ /**
1883
+ * MarkersComponent is a component that displays markers on a map.
1884
+ * It listens for changes in the `markers` input property and
1885
+ * automatically puts the markers on the map using the MapPostboyService.
1886
+ */
1730
1887
  class MarkersComponent extends DestructibleComponent {
1731
1888
  constructor(postboy) {
1732
1889
  super();
@@ -1734,6 +1891,11 @@ class MarkersComponent extends DestructibleComponent {
1734
1891
  this.layerName = '';
1735
1892
  this._markers = [];
1736
1893
  }
1894
+ /**
1895
+ * Sets the markers property.
1896
+ *
1897
+ * @param {MarkerModel[]} value - The array of MarkerModel objects to set as markers.
1898
+ */
1737
1899
  set markers(value) {
1738
1900
  this._markers = value !== null && value !== void 0 ? value : [];
1739
1901
  this.putMarkers();
@@ -1800,13 +1962,8 @@ class TooltipComponent extends DestructibleComponent {
1800
1962
  super();
1801
1963
  this.postboy = postboy;
1802
1964
  this.detector = detector;
1803
- this._settings = new TooltipSettings();
1804
1965
  this.show = false;
1805
- this.removeOverlay = () => {
1806
- var _a;
1807
- !!this.overlay && ((_a = this.map) === null || _a === void 0 ? void 0 : _a.removeOverlay(this.overlay));
1808
- this.show = false;
1809
- };
1966
+ this._settings = new TooltipSettings();
1810
1967
  this.options = (coordinates) => {
1811
1968
  var _a;
1812
1969
  return {
@@ -1816,6 +1973,11 @@ class TooltipComponent extends DestructibleComponent {
1816
1973
  position: coordinates,
1817
1974
  };
1818
1975
  };
1976
+ this.removeOverlay = () => {
1977
+ var _a;
1978
+ !!this.overlay && ((_a = this.map) === null || _a === void 0 ? void 0 : _a.removeOverlay(this.overlay));
1979
+ this.show = false;
1980
+ };
1819
1981
  }
1820
1982
  set settings(value) {
1821
1983
  if (!value || this._settings.isSame(value))
@@ -1828,6 +1990,14 @@ class TooltipComponent extends DestructibleComponent {
1828
1990
  this.subs.push(this.observeMapClick());
1829
1991
  this.subs.push(this.observeClose());
1830
1992
  }
1993
+ addOverlay(coordinates) {
1994
+ var _a;
1995
+ this.removeOverlay();
1996
+ this.overlay = new Overlay(this.options(coordinates));
1997
+ (_a = this.map) === null || _a === void 0 ? void 0 : _a.addOverlay(this.overlay);
1998
+ this.show = true;
1999
+ this.detector.detectChanges();
2000
+ }
1831
2001
  observeMapClick() {
1832
2002
  return this.postboy.subscribe(MapClickEvent.ID).subscribe((ev) => {
1833
2003
  this._settings.show(ev) ? this.addOverlay(ev.coordinates) : this.removeOverlay();
@@ -1844,14 +2014,6 @@ class TooltipComponent extends DestructibleComponent {
1844
2014
  this.map = m.map;
1845
2015
  });
1846
2016
  }
1847
- addOverlay(coordinates) {
1848
- var _a;
1849
- this.removeOverlay();
1850
- this.overlay = new Overlay(this.options(coordinates));
1851
- (_a = this.map) === null || _a === void 0 ? void 0 : _a.addOverlay(this.overlay);
1852
- this.show = true;
1853
- this.detector.detectChanges();
1854
- }
1855
2017
  }
1856
2018
  TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TooltipComponent, deps: [{ token: MapPostboyService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1857
2019
  TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TooltipComponent, selector: "art-tooltip", inputs: { settings: "settings" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["tip"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div #tip [class]=\"['tooltip-wrapper', _settings.containerClass]\" [hidden]=\"!show\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".tooltip-wrapper{position:absolute}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
@@ -1870,6 +2032,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1870
2032
  type: Input
1871
2033
  }] } });
1872
2034
 
2035
+ /**
2036
+ * Component for rendering polygons on a map.
2037
+ * It listens for changes in the `polygons` input property and
2038
+ * automatically puts the polygons on the map using the MapPostboyService.
2039
+ */
1873
2040
  class PolygonsComponent extends DestructibleComponent {
1874
2041
  constructor(postboy) {
1875
2042
  super();
@@ -1877,6 +2044,11 @@ class PolygonsComponent extends DestructibleComponent {
1877
2044
  this.layerName = '';
1878
2045
  this._polygons = [];
1879
2046
  }
2047
+ /**
2048
+ * Sets the value of polygons.
2049
+ *
2050
+ * @param {PolygonModel[]} value - The new value for polygons.
2051
+ */
1880
2052
  set polygons(value) {
1881
2053
  this._polygons = value !== null && value !== void 0 ? value : [];
1882
2054
  this.putPolygons();
@@ -1909,14 +2081,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
1909
2081
  type: Input
1910
2082
  }] } });
1911
2083
 
2084
+ /**
2085
+ * Represents the settings for a zoom control.
2086
+ */
1912
2087
  class ZoomControlSettings {
1913
2088
  constructor() {
2089
+ /**
2090
+ * The CSS class name of the control element.
2091
+ *
2092
+ * @type {string}
2093
+ */
1914
2094
  this.controlClass = 'ol-zoom';
2095
+ /**
2096
+ * The CSS class name for zoom in button.
2097
+ * @type {string}
2098
+ */
1915
2099
  this.zoomInClass = 'ol-zoom-in';
2100
+ /**
2101
+ * The CSS class name for the zoom out button element.
2102
+ *
2103
+ * @type {string}
2104
+ */
1916
2105
  this.zoomOutClass = 'ol-zoom-out';
2106
+ /**
2107
+ * The label for the zoom in action.
2108
+ *
2109
+ * @type {string}
2110
+ */
1917
2111
  this.zoomInLabel = 'Zoom In';
2112
+ /**
2113
+ * The label for the zoom out control.
2114
+ *
2115
+ * @type {string}
2116
+ */
1918
2117
  this.zoomOutLabel = 'Zoom Out';
1919
2118
  }
2119
+ /**
2120
+ * Copies the provided ZoomControlSettings object.
2121
+ *
2122
+ * @param {ZoomControlSettings} model - The ZoomControlSettings object to be copied.
2123
+ * @return {ZoomControlSettings} - The copied ZoomControlSettings object.
2124
+ */
1920
2125
  static copy(model) {
1921
2126
  const result = new ZoomControlSettings();
1922
2127
  result.controlClass = model.controlClass;
@@ -1926,6 +2131,13 @@ class ZoomControlSettings {
1926
2131
  result.zoomOutLabel = model.zoomOutLabel;
1927
2132
  return result;
1928
2133
  }
2134
+ /**
2135
+ * Checks if the current ZoomControlSettings object is equal to the given model.
2136
+ *
2137
+ * @param {ZoomControlSettings} model - The ZoomControlSettings object to compare with.
2138
+ *
2139
+ * @return {boolean} - true if the current object is equal to the given model, false otherwise.
2140
+ */
1929
2141
  isSame(model) {
1930
2142
  if (this.zoomInClass !== model.zoomInClass)
1931
2143
  return false;
@@ -1939,23 +2151,60 @@ class ZoomControlSettings {
1939
2151
  return false;
1940
2152
  return true;
1941
2153
  }
2154
+ /**
2155
+ * Sets the zoom in label of the Zoom Control Settings.
2156
+ *
2157
+ * @param {string} zoomInLabel - The label for the zoom in button.
2158
+ * @return {ZoomControlSettings} - The new Zoom Control Settings object with the updated zoom in label.
2159
+ */
1942
2160
  setZoomInLabel(zoomInLabel) {
1943
2161
  return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomInLabel }));
1944
2162
  }
2163
+ /**
2164
+ * Sets the zoomOutClass property of the ZoomControlSettings object.
2165
+ *
2166
+ * @param {string} zoomOutClass - The CSS class to be assigned to the zoom out button.
2167
+ * @return {ZoomControlSettings} - The updated ZoomControlSettings object with the new zoomOutClass value.
2168
+ */
1945
2169
  setZoomOutClass(zoomOutClass) {
1946
2170
  return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomOutClass }));
1947
2171
  }
2172
+ /**
2173
+ * Sets the zoom in class for the zoom control settings.
2174
+ *
2175
+ * @param {string} zoomInClass - The new zoom in class to be set.
2176
+ * @return {ZoomControlSettings} - The updated zoom control settings.
2177
+ */
1948
2178
  setZoomInClass(zoomInClass) {
1949
2179
  return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomInClass }));
1950
2180
  }
2181
+ /**
2182
+ * Set the label for the zoom out control.
2183
+ *
2184
+ * @param {string} zoomOutLabel - The label for the zoom out control.
2185
+ * @returns {ZoomControlSettings} - The updated zoom control settings.
2186
+ */
1951
2187
  setZoomOutLabel(zoomOutLabel) {
1952
2188
  return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomOutLabel }));
1953
2189
  }
2190
+ /**
2191
+ * Sets the control class for the ZoomControlSettings.
2192
+ *
2193
+ * @param {string} controlClass - The class name of the control to be set.
2194
+ *
2195
+ * @return {ZoomControlSettings} - The modified ZoomControlSettings object.
2196
+ */
1954
2197
  setControlClass(controlClass) {
1955
2198
  return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { controlClass }));
1956
2199
  }
1957
2200
  }
1958
2201
 
2202
+ /**
2203
+ * @class
2204
+ * @classdesc Represents a component for the Zoom control on a map.
2205
+ * @extends DestructibleComponent
2206
+ * @implements OnInit
2207
+ */
1959
2208
  class MapControlZoomComponent extends DestructibleComponent {
1960
2209
  constructor(postboy) {
1961
2210
  super();
@@ -1966,6 +2215,17 @@ class MapControlZoomComponent extends DestructibleComponent {
1966
2215
  };
1967
2216
  this.eliminate = () => !!this.map && !!this.control && this.map.removeControl(this.control);
1968
2217
  }
2218
+ /**
2219
+ * Sets the settings for the Zoom Control.
2220
+ *
2221
+ * @param {ZoomControlSettings | undefined} value - The new settings for the Zoom Control.
2222
+ *
2223
+ * @description
2224
+ * This method sets the settings for the Zoom Control. It takes a parameter `value` which should be an object of type `ZoomControlSettings` or `undefined`.
2225
+ *
2226
+ * If the `value` is `undefined` or the same as the current settings, the method will return without making any changes.
2227
+ *
2228
+ */
1969
2229
  set settings(value) {
1970
2230
  if (!value || this._settings.isSame(value))
1971
2231
  return;
@@ -2052,7 +2312,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
2052
2312
  }]
2053
2313
  }] });
2054
2314
 
2315
+ /**
2316
+ * Helper class to create and modify marker styles.
2317
+ */
2055
2318
  class MarkerStyleHelper {
2319
+ /**
2320
+ * Creates a new Style object from an SVG.
2321
+ * @param {string} svg - The SVG string.
2322
+ * @param {Array<number>} [size=[30, 30]] - The size of the icon image.
2323
+ * @param {number} [zIndex=400] - The zIndex of the style.
2324
+ * @returns {Style} A new Style object.
2325
+ */
2056
2326
  static fromSvg(svg, size = [30, 30], zIndex = 400) {
2057
2327
  let image = new Image();
2058
2328
  image.src = 'data:image/svg+xml,' + escape(svg);
@@ -2064,6 +2334,15 @@ class MarkerStyleHelper {
2064
2334
  zIndex,
2065
2335
  });
2066
2336
  }
2337
+ /**
2338
+ * Returns a Style object with a circle style.
2339
+ *
2340
+ * @param {number} radius - The radius of the circle.
2341
+ * @param {string} fill - The fill color of the circle. Format: '#RRGGBB' or 'rgba(R, G, B, A)'.
2342
+ * @param {string} strokeColor - The stroke color of the circle. Format: '#RRGGBB' or 'rgba(R, G, B, A)'.
2343
+ * @param {number} [strokeWidth=1] - The width of the stroke. Default is 1.
2344
+ * @returns {Style} - A Style object with a Circle image.
2345
+ */
2067
2346
  static circle(radius, fill, strokeColor, strokeWidth = 1) {
2068
2347
  return new Style({
2069
2348
  image: new Circle({
@@ -2073,13 +2352,32 @@ class MarkerStyleHelper {
2073
2352
  }),
2074
2353
  });
2075
2354
  }
2355
+ /**
2356
+ * Applies the given Text to the provided Style.
2357
+ *
2358
+ * @param {Style} style - The Style to modify.
2359
+ * @param {Text} text - The Text to apply to the Style.
2360
+ * @return {Style} - The modified Style with the applied Text.
2361
+ */
2076
2362
  static withText(style, text) {
2077
2363
  style.setText(text);
2078
2364
  return style;
2079
2365
  }
2080
2366
  }
2081
2367
 
2368
+ /**
2369
+ * A helper class for creating polygon styles.
2370
+ * @class
2371
+ */
2082
2372
  class PolygonStyleHelper {
2373
+ /**
2374
+ * Creates a Style object with the given fill color, stroke color, and stroke width.
2375
+ *
2376
+ * @param {string} fill - The fill color in hexadecimal or RGB format.
2377
+ * @param {string} stroke - The stroke color in hexadecimal or RGB format.
2378
+ * @param {number} [strokeWidth=1] - The width of the stroke. Defaults to 1.
2379
+ * @return {Style} The created Style object.
2380
+ */
2083
2381
  static simple(fill, stroke, strokeWidth = 1) {
2084
2382
  return new Style({
2085
2383
  fill: new Fill({
@@ -2091,6 +2389,15 @@ class PolygonStyleHelper {
2091
2389
  }),
2092
2390
  });
2093
2391
  }
2392
+ /**
2393
+ * Creates a new Style object with the given fill, stroke, stroke width, and pin radius.
2394
+ *
2395
+ * @param {string} fill - The color to use for the fill of the style.
2396
+ * @param {string} stroke - The color to use for the stroke of the style.
2397
+ * @param {number} [strokeWidth=1] - The width of the stroke. Defaults to 1.
2398
+ * @param {number} [pinRadius=5] - The radius of the circle used as the image for the style. Defaults to 5.
2399
+ * @returns {Style} - The newly created Style object.
2400
+ */
2094
2401
  static edit(fill, stroke, strokeWidth = 1, pinRadius = 5) {
2095
2402
  return new Style({
2096
2403
  image: new Circle({
@@ -2110,7 +2417,18 @@ class PolygonStyleHelper {
2110
2417
  }
2111
2418
  }
2112
2419
 
2420
+ /**
2421
+ * Helper class for creating text styles.
2422
+ */
2113
2423
  class TextStyleHelper {
2424
+ /**
2425
+ * Creates a new instance of the Text class with the specified properties.
2426
+ *
2427
+ * @param {string} text - The text content of the Text object.
2428
+ * @param {string} font - The font style of the Text object.
2429
+ * @param {string} color - The color of the Text object.
2430
+ * @return {Text} A new instance of the Text class.
2431
+ */
2114
2432
  static get(text, font, color) {
2115
2433
  return new Text({
2116
2434
  text: text,
@@ -2123,37 +2441,41 @@ class TextStyleHelper {
2123
2441
  }
2124
2442
  }
2125
2443
 
2444
+ /**
2445
+ * A helper class for converting and stringify features.
2446
+ */
2126
2447
  class StringifyFeatureHelper {
2127
2448
  static polygon(feature, format = FeatureOutputFormat.GeoJson) {
2128
2449
  return format === FeatureOutputFormat.GeoJson
2129
2450
  ? new GeoJSON().writeFeature(feature)
2130
2451
  : new WKT().writeFeature(feature);
2131
2452
  }
2453
+ /**
2454
+ * Creates a polygon feature representing a circle based on a given feature with a circle geometry.
2455
+ *
2456
+ * @param {Feature<Geometry>} feature - The input feature with a circle geometry.
2457
+ * @param {FeatureOutputFormat} format - The format for outputting the polygon feature. (default: FeatureOutputFormat.GeoJson)
2458
+ *
2459
+ * @return {string} - The string representation of the polygon feature.
2460
+ */
2132
2461
  static circle(feature, format = FeatureOutputFormat.GeoJson) {
2133
- // const clone = feature.clone();
2134
- // clone.setGeometry(fromCircle(feature.getGeometry()! as Circle));
2135
- const tetemp = feature.getGeometryName();
2136
2462
  const circle = feature.getGeometry();
2137
- // const temp = StringifyFeatureHelper.drawCircle(circle.getCenter(), circle.getRadius());
2138
- const ttt = feature.getGeometry().getExtent();
2139
- const eastPoint = [ttt[2], (ttt[1] + ttt[3]) / 2];
2140
- const aaa = [
2141
- ...transform([ttt[0], ttt[1]], 'EPSG:4326', 'EPSG:3857'),
2142
- ...transform([ttt[2], ttt[3]], 'EPSG:4326', 'EPSG:3857'),
2463
+ const ext = feature.getGeometry().getExtent();
2464
+ const coords = [
2465
+ ...transform([ext[0], ext[1]], 'EPSG:4326', 'EPSG:3857'),
2466
+ ...transform([ext[2], ext[3]], 'EPSG:4326', 'EPSG:3857'),
2143
2467
  ];
2144
- const radius = (aaa[2] - aaa[0]) / 2;
2145
- const radius2 = new LineString([circle.getCenter(), eastPoint]).getLength();
2468
+ const radius = (coords[2] - coords[0]) / 2;
2146
2469
  const polygonGeom = new Polygon(StringifyFeatureHelper.drawCircle(circle.getCenter(), radius));
2147
- // var edgeCoordinate = [circle.getCenter()[0] + radius, circle.getCenter()[1]];
2148
- // var wgs84Sphere = new Sphere(6378137);
2149
2470
  return StringifyFeatureHelper.polygon(new Feature(polygonGeom), format);
2150
- // const rad = circle.getRadius();
2151
- // const degrees = 180 / Math.PI; // radians to degrees
2152
- // const radians = Math.PI / 180; // degrees to radians
2153
- // const rlat = rad * degrees * 1000;
2154
- // const rlng = rad * radians;
2155
- // return StringifyFeatureHelper.polygon(new Feature<Geometry>(circular(circle.getCenter(),circle.getRadius() * METERS_PER_UNIT)), format);
2156
2471
  }
2472
+ /**
2473
+ * Draw a circle based on a center point and radius.
2474
+ *
2475
+ * @param {number[]} point - The center point coordinates in EPSG:4326 format.
2476
+ * @param {number} radius - The radius of the circle in meters.
2477
+ * @return {Coordinate[][]} - The coordinates of the circle boundary in EPSG:4326 format.
2478
+ */
2157
2479
  static drawCircle(point, radius) {
2158
2480
  const tetetemp = transform(point, 'EPSG:4326', 'EPSG:3857');
2159
2481
  // const tetetemp = point;
@@ -2182,5 +2504,5 @@ class StringifyFeatureHelper {
2182
2504
  * Generated bundle index. Do not edit.
2183
2505
  */
2184
2506
 
2185
- export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, Dictionary, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, MapClickEvent, MapControl, MapControlZoomComponent, MapLyrs, MapLyrsLabel, MapModule, MapMoveEndEvent, MapPlateComponent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonStyleHelper, PolygonsComponent, RemoveControlCommand, SetMapCenterCommand, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings, ZoomControlSettings };
2507
+ export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FitToPolygonsCommand, MapClickEvent, MapControl, MapControlZoomComponent, MapLyrs, MapLyrsLabel, MapModule, MapMoveEndEvent, MapPlateComponent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonStyleHelper, PolygonsComponent, RemoveControlCommand, SetMapCenterCommand, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings, ZoomControlSettings };
2186
2508
  //# sourceMappingURL=maps-components-src-map.js.map