@artstesh/maps 1.1.7 → 1.1.9

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 (127) hide show
  1. package/dist/bundles/maps-components-src-map.umd.js +479 -99
  2. package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
  3. package/dist/bundles/maps-components.umd.js +479 -99
  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/fit-to-polygons.command.js +1 -1
  23. package/dist/esm2015/map/messages/events/map-move-end.event.js +3 -4
  24. package/dist/esm2015/map/messages/executors/get-map-position.executor.js +16 -0
  25. package/dist/esm2015/map/messages/index.js +2 -1
  26. package/dist/esm2015/map/models/index.js +2 -1
  27. package/dist/esm2015/map/models/map-control.js +2 -2
  28. package/dist/esm2015/map/models/map-position.model.js +2 -0
  29. package/dist/esm2015/map/models/marker-model.js +1 -1
  30. package/dist/esm2015/map/models/polygon.model.js +4 -4
  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 +1 -1
  34. package/dist/esm2015/map/services/map-state.service.js +11 -7
  35. package/dist/esm2015/map/services/message-registrator.service.js +4 -1
  36. package/dist/esm2015/src/map/helpers/marker-style.helper.js +27 -1
  37. package/dist/esm2015/src/map/helpers/polygon-style.helper.js +22 -1
  38. package/dist/esm2015/src/map/helpers/stringify-feature.helper.js +24 -21
  39. package/dist/esm2015/src/map/helpers/text-style.helper.js +12 -1
  40. package/dist/esm2015/src/map/map-plate/controls/map-control-zoom/map-control-zoom.component.js +18 -1
  41. package/dist/esm2015/src/map/map-plate/controls/map-control-zoom/zoom-control.settings.js +72 -1
  42. package/dist/esm2015/src/map/map-plate/features/markers/markers.component.js +11 -1
  43. package/dist/esm2015/src/map/map-plate/features/polygons/polygons.component.js +11 -1
  44. package/dist/esm2015/src/map/map-plate/layers/cluster-layer/cluster-layer.component.js +15 -7
  45. package/dist/esm2015/src/map/map-plate/layers/cluster-layer/cluster-layer.settings.js +79 -1
  46. package/dist/esm2015/src/map/map-plate/layers/feature-layer/feature-layer.component.js +7 -7
  47. package/dist/esm2015/src/map/map-plate/layers/feature-layer/feature-layer.settings.js +37 -17
  48. package/dist/esm2015/src/map/map-plate/layers/tile-layer/tile-layer.component.js +7 -7
  49. package/dist/esm2015/src/map/map-plate/layers/tile-layer/tile-layer.settings.js +76 -1
  50. package/dist/esm2015/src/map/map-plate/map-plate.component.js +2 -2
  51. package/dist/esm2015/src/map/map-plate/tooltips/tooltip/tooltip.component.js +15 -15
  52. package/dist/esm2015/src/map/map-plate/tooltips/tooltip/tooltip.settings.js +1 -1
  53. package/dist/esm2015/src/map/messages/commands/fit-to-polygons.command.js +1 -1
  54. package/dist/esm2015/src/map/messages/events/map-move-end.event.js +3 -4
  55. package/dist/esm2015/src/map/messages/executors/get-map-position.executor.js +16 -0
  56. package/dist/esm2015/src/map/messages/index.js +2 -1
  57. package/dist/esm2015/src/map/models/index.js +2 -1
  58. package/dist/esm2015/src/map/models/map-control.js +2 -2
  59. package/dist/esm2015/src/map/models/map-position.model.js +2 -0
  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/feature.service.js +6 -6
  63. package/dist/esm2015/src/map/services/map-click.service.js +10 -10
  64. package/dist/esm2015/src/map/services/map-feature.service.js +1 -1
  65. package/dist/esm2015/src/map/services/map-state.service.js +11 -7
  66. package/dist/esm2015/src/map/services/message-registrator.service.js +4 -1
  67. package/dist/fesm2015/maps-components-src-map.js +467 -95
  68. package/dist/fesm2015/maps-components-src-map.js.map +1 -1
  69. package/dist/fesm2015/maps-components.js +467 -95
  70. package/dist/fesm2015/maps-components.js.map +1 -1
  71. package/dist/map/helpers/marker-style.helper.d.ts +26 -0
  72. package/dist/map/helpers/polygon-style.helper.d.ts +21 -0
  73. package/dist/map/helpers/stringify-feature.helper.d.ts +18 -0
  74. package/dist/map/helpers/text-style.helper.d.ts +11 -0
  75. package/dist/map/map-plate/controls/map-control-zoom/map-control-zoom.component.d.ts +20 -3
  76. package/dist/map/map-plate/controls/map-control-zoom/zoom-control.settings.d.ts +71 -0
  77. package/dist/map/map-plate/features/markers/markers.component.d.ts +10 -0
  78. package/dist/map/map-plate/features/polygons/polygons.component.d.ts +10 -0
  79. package/dist/map/map-plate/layers/cluster-layer/cluster-layer.component.d.ts +10 -2
  80. package/dist/map/map-plate/layers/cluster-layer/cluster-layer.settings.d.ts +78 -0
  81. package/dist/map/map-plate/layers/feature-layer/feature-layer.component.d.ts +2 -2
  82. package/dist/map/map-plate/layers/feature-layer/feature-layer.settings.d.ts +36 -16
  83. package/dist/map/map-plate/layers/tile-layer/tile-layer.component.d.ts +1 -1
  84. package/dist/map/map-plate/layers/tile-layer/tile-layer.settings.d.ts +75 -0
  85. package/dist/map/map-plate/map-plate.component.d.ts +2 -2
  86. package/dist/map/map-plate/tooltips/tooltip/tooltip.component.d.ts +5 -5
  87. package/dist/map/map-plate/tooltips/tooltip/tooltip.settings.d.ts +1 -1
  88. package/dist/map/messages/events/map-move-end.event.d.ts +3 -3
  89. package/dist/map/messages/executors/get-map-position.executor.d.ts +12 -0
  90. package/dist/map/messages/index.d.ts +1 -0
  91. package/dist/map/models/index.d.ts +1 -0
  92. package/dist/map/models/map-control.d.ts +1 -1
  93. package/dist/map/models/map-position.model.d.ts +6 -0
  94. package/dist/map/models/polygon.model.d.ts +2 -2
  95. package/dist/map/services/feature.service.d.ts +1 -1
  96. package/dist/map/services/map-click.service.d.ts +1 -1
  97. package/dist/map/services/map-state.service.d.ts +2 -0
  98. package/dist/map/services/message-registrator.service.d.ts +1 -0
  99. package/dist/src/map/helpers/marker-style.helper.d.ts +26 -0
  100. package/dist/src/map/helpers/polygon-style.helper.d.ts +21 -0
  101. package/dist/src/map/helpers/stringify-feature.helper.d.ts +18 -0
  102. package/dist/src/map/helpers/text-style.helper.d.ts +11 -0
  103. package/dist/src/map/map-plate/controls/map-control-zoom/map-control-zoom.component.d.ts +20 -3
  104. package/dist/src/map/map-plate/controls/map-control-zoom/zoom-control.settings.d.ts +71 -0
  105. package/dist/src/map/map-plate/features/markers/markers.component.d.ts +10 -0
  106. package/dist/src/map/map-plate/features/polygons/polygons.component.d.ts +10 -0
  107. package/dist/src/map/map-plate/layers/cluster-layer/cluster-layer.component.d.ts +10 -2
  108. package/dist/src/map/map-plate/layers/cluster-layer/cluster-layer.settings.d.ts +78 -0
  109. package/dist/src/map/map-plate/layers/feature-layer/feature-layer.component.d.ts +2 -2
  110. package/dist/src/map/map-plate/layers/feature-layer/feature-layer.settings.d.ts +36 -16
  111. package/dist/src/map/map-plate/layers/tile-layer/tile-layer.component.d.ts +1 -1
  112. package/dist/src/map/map-plate/layers/tile-layer/tile-layer.settings.d.ts +75 -0
  113. package/dist/src/map/map-plate/map-plate.component.d.ts +2 -2
  114. package/dist/src/map/map-plate/tooltips/tooltip/tooltip.component.d.ts +5 -5
  115. package/dist/src/map/map-plate/tooltips/tooltip/tooltip.settings.d.ts +1 -1
  116. package/dist/src/map/messages/events/map-move-end.event.d.ts +3 -3
  117. package/dist/src/map/messages/executors/get-map-position.executor.d.ts +12 -0
  118. package/dist/src/map/messages/index.d.ts +1 -0
  119. package/dist/src/map/models/index.d.ts +1 -0
  120. package/dist/src/map/models/map-control.d.ts +1 -1
  121. package/dist/src/map/models/map-position.model.d.ts +6 -0
  122. package/dist/src/map/models/polygon.model.d.ts +2 -2
  123. package/dist/src/map/services/feature.service.d.ts +1 -1
  124. package/dist/src/map/services/map-click.service.d.ts +1 -1
  125. package/dist/src/map/services/map-state.service.d.ts +2 -0
  126. package/dist/src/map/services/message-registrator.service.d.ts +1 -0
  127. package/package.json +1 -1
@@ -655,6 +655,13 @@
655
655
  (_a = this._feature) === null || _a === void 0 ? void 0 : _a.set(MapConstants.FeatureInfo, this.info);
656
656
  _c = __read(extent.getCenter((_b = this._feature.getGeometry()) === null || _b === void 0 ? void 0 : _b.getExtent()), 2), this.lng = _c[0], this.lat = _c[1];
657
657
  }
658
+ Object.defineProperty(PolygonModel.prototype, "feature", {
659
+ get: function () {
660
+ return this._feature;
661
+ },
662
+ enumerable: false,
663
+ configurable: true
664
+ });
658
665
  PolygonModel.fromGeoJson = function (id, json, info) {
659
666
  var feature = new format.GeoJSON().readFeature(json);
660
667
  feature.setId(id);
@@ -665,13 +672,6 @@
665
672
  feature.setId(id);
666
673
  return new PolygonModel(feature, id, info);
667
674
  };
668
- Object.defineProperty(PolygonModel.prototype, "feature", {
669
- get: function () {
670
- return this._feature;
671
- },
672
- enumerable: false,
673
- configurable: true
674
- });
675
675
  return PolygonModel;
676
676
  }());
677
677
 
@@ -691,7 +691,7 @@
691
691
 
692
692
  /**
693
693
  *
694
- * 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.
694
+ * 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.
695
695
  * This is the base class for controls. You can use it for simple custom controls by creating the element with listeners, creating an instance:
696
696
  * var myControl = new Control({element: myElement}); and then adding this to the map.
697
697
  * 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.
@@ -745,10 +745,9 @@
745
745
 
746
746
  var MapMoveEndEvent = /** @class */ (function (_super) {
747
747
  __extends(MapMoveEndEvent, _super);
748
- function MapMoveEndEvent(zoom, extent) {
748
+ function MapMoveEndEvent(position) {
749
749
  var _this = _super.call(this) || this;
750
- _this.zoom = zoom;
751
- _this.extent = extent;
750
+ _this.position = position;
752
751
  return _this;
753
752
  }
754
753
  Object.defineProperty(MapMoveEndEvent.prototype, "id", {
@@ -978,6 +977,27 @@
978
977
  }(postboy.PostboyGenericMessage));
979
978
  FitToPolygonsCommand.ID = 'a9e42b23-ffaf-4c46-8370-e0432cd14d60';
980
979
 
980
+ /**
981
+ * A message that allows to get the current state of the map.
982
+ * If the map's state is not defined yet, the executor would return null
983
+ * @returns {MapPosition | null}
984
+ */
985
+ var GetMapPositionExecutor = /** @class */ (function (_super) {
986
+ __extends(GetMapPositionExecutor, _super);
987
+ function GetMapPositionExecutor() {
988
+ return _super.call(this) || this;
989
+ }
990
+ Object.defineProperty(GetMapPositionExecutor.prototype, "id", {
991
+ get: function () {
992
+ return GetMapPositionExecutor.ID;
993
+ },
994
+ enumerable: false,
995
+ configurable: true
996
+ });
997
+ return GetMapPositionExecutor;
998
+ }(postboy.PostboyExecutor));
999
+ GetMapPositionExecutor.ID = '52c95689-d09b-4082-ba58-9183ea96a213';
1000
+
981
1001
  var AddLayerCommand = /** @class */ (function (_super) {
982
1002
  __extends(AddLayerCommand, _super);
983
1003
  function AddLayerCommand(layer) {
@@ -1154,6 +1174,11 @@
1154
1174
  FeatureService.filterFeaturesInArea = function (query) {
1155
1175
  return query.features.filter(function (f) { return FeatureService.booleanIntersects(query.area, f.getGeometry()); });
1156
1176
  };
1177
+ FeatureService.calculateArea = function (g) {
1178
+ if (!g)
1179
+ return 0;
1180
+ return Sphere__namespace.getArea(g, { projection: 'EPSG:4326' });
1181
+ };
1157
1182
  FeatureService.booleanIntersects = function (g1, g2) {
1158
1183
  if (g2.getType() === 'Point')
1159
1184
  return g1.intersectsCoordinate(g2.getCoordinates());
@@ -1163,11 +1188,6 @@
1163
1188
  return g1.intersectsCoordinate(g2.getInteriorPoint().getCoordinates());
1164
1189
  return false;
1165
1190
  };
1166
- FeatureService.calculateArea = function (g) {
1167
- if (!g)
1168
- return 0;
1169
- return Sphere__namespace.getArea(g, { projection: 'EPSG:4326' });
1170
- };
1171
1191
  return FeatureService;
1172
1192
  }());
1173
1193
 
@@ -1384,6 +1404,14 @@
1384
1404
  this.observeMapRendering();
1385
1405
  this.observeCenter();
1386
1406
  };
1407
+ MapStateService.prototype.getMapPosition = function () {
1408
+ if (!this.map)
1409
+ return null;
1410
+ var _c = __read(this.map.getView().getCenter(), 2), longitude = _c[0], latitude = _c[1];
1411
+ var zoom = Math.floor(this.map.getView().getZoom());
1412
+ var extent = this.map.getView().calculateExtent();
1413
+ return { longitude: longitude, latitude: latitude, zoom: zoom, extent: extent };
1414
+ };
1387
1415
  MapStateService.prototype.observeMapRendering = function () {
1388
1416
  var _this = this;
1389
1417
  this.postboy
@@ -1393,10 +1421,7 @@
1393
1421
  var _a;
1394
1422
  _this.map = ev.map;
1395
1423
  (_a = _this.map) === null || _a === void 0 ? void 0 : _a.on('moveend', function () {
1396
- var _a, _b;
1397
- var zoom = Math.floor(((_a = _this.map) === null || _a === void 0 ? void 0 : _a.getView().getZoom()) || -1);
1398
- var extent = ((_b = _this.map) === null || _b === void 0 ? void 0 : _b.getView().calculateExtent()) || [];
1399
- _this.postboy.fire(new MapMoveEndEvent(zoom, extent));
1424
+ _this.postboy.fire(new MapMoveEndEvent(_this.getMapPosition()));
1400
1425
  });
1401
1426
  });
1402
1427
  };
@@ -1474,16 +1499,6 @@
1474
1499
  MapClickService.prototype.up = function () {
1475
1500
  this.observeMapRender();
1476
1501
  };
1477
- MapClickService.prototype.observeMapRender = function () {
1478
- var _this = this;
1479
- this.postboy.subscribe(MapRenderedEvent.ID).subscribe(function (m) {
1480
- var _a;
1481
- _this.map = m.map;
1482
- (_a = _this.map) === null || _a === void 0 ? void 0 : _a.on('singleclick', function (e) {
1483
- _this.postboy.fire(_this.onClick(e));
1484
- });
1485
- });
1486
- };
1487
1502
  MapClickService.prototype.onClick = function (ev) {
1488
1503
  var _this = this;
1489
1504
  var _a;
@@ -1503,6 +1518,16 @@
1503
1518
  });
1504
1519
  return model;
1505
1520
  };
1521
+ MapClickService.prototype.observeMapRender = function () {
1522
+ var _this = this;
1523
+ this.postboy.subscribe(MapRenderedEvent.ID).subscribe(function (m) {
1524
+ var _a;
1525
+ _this.map = m.map;
1526
+ (_a = _this.map) === null || _a === void 0 ? void 0 : _a.on('singleclick', function (e) {
1527
+ _this.postboy.fire(_this.onClick(e));
1528
+ });
1529
+ });
1530
+ };
1506
1531
  MapClickService.prototype.getFeatureCollectionWithInner = function (features) {
1507
1532
  var result = [];
1508
1533
  features === null || features === void 0 ? void 0 : features.forEach(function (f) {
@@ -1745,6 +1770,7 @@
1745
1770
  __extends(MessageRegistratorService, _super);
1746
1771
  function MessageRegistratorService(service, management, state, mapFeature, interaction, drawing, featureModification, controls) {
1747
1772
  var _this = _super.call(this, service) || this;
1773
+ _this.state = state;
1748
1774
  _this.registerServices([management, state, interaction, mapFeature, drawing, featureModification, controls]);
1749
1775
  return _this;
1750
1776
  }
@@ -1774,10 +1800,12 @@
1774
1800
  this.setExecutors();
1775
1801
  };
1776
1802
  MessageRegistratorService.prototype.setExecutors = function () {
1803
+ var _this = this;
1777
1804
  this.registerExecutor(FilterFeaturesInAreaExecutor.ID, function (e) { return FeatureService.filterFeaturesInArea(e); });
1778
1805
  this.registerExecutor(CalculateAreaExecutor.ID, function (e) { var _a, _b; return FeatureService.calculateArea((_b = (_a = e.polygon) === null || _a === void 0 ? void 0 : _a.feature) === null || _b === void 0 ? void 0 : _b.getGeometry()); });
1779
1806
  this.registerExecutor(GenerateDrawExecutor.ID, function (e) { return DrawingGenerationService.getDraw(e); });
1780
1807
  this.registerExecutor(GenerateZoomControlExecutor.ID, function (e) { return ZoomControlFactory.build(e.settings); });
1808
+ this.registerExecutor(GetMapPositionExecutor.ID, function () { return _this.state.getMapPosition(); });
1781
1809
  };
1782
1810
  return MessageRegistratorService;
1783
1811
  }(postboy.PostboyAbstractRegistrator));
@@ -1787,14 +1815,53 @@
1787
1815
  type: i0.Injectable
1788
1816
  }], ctorParameters: function () { return [{ type: MapPostboyService }, { type: MapManagementService }, { type: MapStateService }, { type: MapFeatureService }, { type: MapClickService }, { type: DrawingService }, { type: FeatureModificationService }, { type: ControlsService }]; } });
1789
1817
 
1818
+ /**
1819
+ * Class representing settings for a tile layer.
1820
+ */
1790
1821
  var TileLayerSettings = /** @class */ (function () {
1791
1822
  function TileLayerSettings() {
1823
+ /**
1824
+ * The maximum zoom level for a map view.
1825
+ *
1826
+ * @type {number}
1827
+ * @default 19
1828
+ */
1792
1829
  this.maxZoom = 19;
1830
+ /**
1831
+ * The minimum zoom level allowed.
1832
+ *
1833
+ * @type {number}
1834
+ */
1793
1835
  this.minZoom = 0;
1836
+ /**
1837
+ * The opacity of an element.
1838
+ *
1839
+ * @type {number}
1840
+ * @default 0.6
1841
+ */
1794
1842
  this.opacity = 0.6;
1843
+ /**
1844
+ * Represents the tiles URL.
1845
+ * @typedef {string} url
1846
+ *
1847
+ * @example
1848
+ * 'https://example.ex/{z}/{x}/{y}.png'
1849
+ */
1795
1850
  this.url = '';
1851
+ /**
1852
+ * The projection of the coordinate system.
1853
+ *
1854
+ * @type {string}
1855
+ * @default 'EPSG:3857'
1856
+ */
1796
1857
  this.projection = 'EPSG:3857';
1797
1858
  }
1859
+ /**
1860
+ * Creates a copy of the given tile layer settings.
1861
+ *
1862
+ * @param {TileLayerSettings} model - The tile layer settings to be copied.
1863
+ * @return {TileLayerSettings} - A new instance of TileLayerSettings with the same properties as the model.
1864
+ */
1798
1865
  TileLayerSettings.copy = function (model) {
1799
1866
  var result = new TileLayerSettings();
1800
1867
  result.maxZoom = model.maxZoom;
@@ -1804,21 +1871,57 @@
1804
1871
  result.url = model.url;
1805
1872
  return result;
1806
1873
  };
1874
+ /**
1875
+ * Sets the URL of the TileLayerSettings object.
1876
+ *
1877
+ * @param {string} url - The URL to be set.
1878
+ * @return {TileLayerSettings} - The updated TileLayerSettings object.
1879
+ */
1807
1880
  TileLayerSettings.prototype.setUrl = function (url) {
1808
1881
  return TileLayerSettings.copy(Object.assign(Object.assign({}, this), { url: url }));
1809
1882
  };
1883
+ /**
1884
+ * Sets the maximum zoom level for the tile layer.
1885
+ *
1886
+ * @param {number} maxZoom - The maximum zoom level.
1887
+ * @returns {TileLayerSettings} - The updated tile layer settings object.
1888
+ */
1810
1889
  TileLayerSettings.prototype.setMaxZoom = function (maxZoom) {
1811
1890
  return TileLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom: maxZoom }));
1812
1891
  };
1892
+ /**
1893
+ * Sets the minimum zoom level for the Tile Layer.
1894
+ *
1895
+ * @param {number} minZoom - The minimum zoom level to be set.
1896
+ * @return {TileLayerSettings} The modified TileLayerSettings object with the updated minimum zoom level.
1897
+ */
1813
1898
  TileLayerSettings.prototype.setMinZoom = function (minZoom) {
1814
1899
  return TileLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom: minZoom }));
1815
1900
  };
1901
+ /**
1902
+ * Sets the opacity of the TileLayerSettings.
1903
+ *
1904
+ * @param {number} opacity - The opacity value to set. Must be a number between 0 and 1.
1905
+ * @return {TileLayerSettings} - A new instance of TileLayerSettings with the opacity set.
1906
+ */
1816
1907
  TileLayerSettings.prototype.setOpacity = function (opacity) {
1817
1908
  return TileLayerSettings.copy(Object.assign(Object.assign({}, this), { opacity: opacity }));
1818
1909
  };
1910
+ /**
1911
+ * Sets the projection for the tile layer settings.
1912
+ *
1913
+ * @param {string} projection - The desired projection for the tile layer settings.
1914
+ * @return {TileLayerSettings} - The updated tile layer settings with the new projection.
1915
+ */
1819
1916
  TileLayerSettings.prototype.setProjection = function (projection) {
1820
1917
  return TileLayerSettings.copy(Object.assign(Object.assign({}, this), { projection: projection }));
1821
1918
  };
1919
+ /**
1920
+ * Checks if the current instance of TileLayerSettings is equal to the given model.
1921
+ * @param {TileLayerSettings} model - The model to compare against.
1922
+ * @return {boolean} - True if all properties of the current instance matches the properties of the model;
1923
+ * otherwise, false.
1924
+ */
1822
1925
  TileLayerSettings.prototype.isSame = function (model) {
1823
1926
  if (this.maxZoom !== model.maxZoom)
1824
1927
  return false;
@@ -1894,13 +1997,6 @@
1894
1997
  _this.onDestroy = function () { return _this.removeLayer(); };
1895
1998
  return _this;
1896
1999
  }
1897
- TileLayerComponent.prototype.ngOnInit = function () {
1898
- var _this = this;
1899
- this.postboy
1900
- .subscribe(MapRenderedEvent.ID)
1901
- .pipe(operators.filter(function (m) { return !!m; }), operators.first())
1902
- .subscribe(function (m) { return _this.initLayer(); });
1903
- };
1904
2000
  Object.defineProperty(TileLayerComponent.prototype, "settings", {
1905
2001
  set: function (value) {
1906
2002
  if (!value || this._settings.isSame(value))
@@ -1911,6 +2007,13 @@
1911
2007
  enumerable: false,
1912
2008
  configurable: true
1913
2009
  });
2010
+ TileLayerComponent.prototype.ngOnInit = function () {
2011
+ var _this = this;
2012
+ this.postboy
2013
+ .subscribe(MapRenderedEvent.ID)
2014
+ .pipe(operators.filter(function (m) { return !!m; }), operators.first())
2015
+ .subscribe(function (m) { return _this.initLayer(); });
2016
+ };
1914
2017
  TileLayerComponent.prototype.initLayer = function () {
1915
2018
  this.removeLayer();
1916
2019
  this.layer = this.factory.build(this._settings);
@@ -2017,17 +2120,24 @@
2017
2120
  */
2018
2121
  this.zIndex = 1;
2019
2122
  /**
2020
- * The maximum zoom at which the layer is visible. 19 by default
2123
+ The maximum view zoom level (inclusive) at which this layer will be visible.
2124
+
2125
+ @type {number}
2126
+ @default 19
2021
2127
  */
2022
2128
  this.maxZoom = 19;
2023
2129
  /**
2024
- * The minimum zoom at which the layer is visible. 0 by default
2130
+ The minimum view zoom level (exclusive) at which this layer will be visible.
2131
+
2132
+ @type {number}
2025
2133
  */
2026
2134
  this.minZoom = 0;
2027
2135
  }
2028
2136
  /**
2029
- * Creates a clone of the existing settings
2030
- * @param model
2137
+ * Copies the given FeatureLayerSettings object
2138
+ *
2139
+ * @param {FeatureLayerSettings} model - The FeatureLayerSettings object to be copied
2140
+ * @returns {FeatureLayerSettings} - A copy of the FeatureLayerSettings object
2031
2141
  */
2032
2142
  FeatureLayerSettings.copy = function (model) {
2033
2143
  var result = new FeatureLayerSettings();
@@ -2039,43 +2149,56 @@
2039
2149
  return result;
2040
2150
  };
2041
2151
  /**
2042
- Setter for {@link FeatureLayerSettings.zIndex}
2043
- * @param zIndex
2152
+ * Sets the z-index value for the FeatureLayerSettings object.
2153
+ *
2154
+ * @param {number} zIndex - The new z-index value.
2155
+ * @return {FeatureLayerSettings} - The updated FeatureLayerSettings object.
2044
2156
  */
2045
2157
  FeatureLayerSettings.prototype.setZIndex = function (zIndex) {
2046
2158
  return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { zIndex: zIndex }));
2047
2159
  };
2048
2160
  /**
2049
- * Setter for {@link FeatureLayerSettings.name}
2050
- * @param name
2161
+ * Sets the name of the FeatureLayerSettings.
2162
+ *
2163
+ * @param {string} name - The name to set for the FeatureLayerSettings.
2164
+ *
2165
+ * @return {FeatureLayerSettings} - The updated FeatureLayerSettings object with the new name.
2051
2166
  */
2052
2167
  FeatureLayerSettings.prototype.setName = function (name) {
2053
2168
  return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { name: name }));
2054
2169
  };
2055
2170
  /**
2056
- * Setter for {@link FeatureLayerSettings.maxZoom}
2057
- * @param maxZoom
2171
+ * Sets the maximum zoom level for the FeatureLayerSettings.
2172
+ *
2173
+ * @param {number} maxZoom - The maximum zoom level.
2174
+ * @return {FeatureLayerSettings} - The updated FeatureLayerSettings object.
2058
2175
  */
2059
2176
  FeatureLayerSettings.prototype.setMaxZoom = function (maxZoom) {
2060
2177
  return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom: maxZoom }));
2061
2178
  };
2062
2179
  /**
2063
- * Setter for {@link FeatureLayerSettings.minZoom}
2064
- * @param minZoom
2180
+ * Sets the minimum zoom level for the feature layer.
2181
+ *
2182
+ * @param {number} minZoom The minimum zoom level to be set.
2183
+ * @returns {FeatureLayerSettings} The updated feature layer settings object.
2065
2184
  */
2066
2185
  FeatureLayerSettings.prototype.setMinZoom = function (minZoom) {
2067
2186
  return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom: minZoom }));
2068
2187
  };
2069
2188
  /**
2070
- * Setter for {@link FeatureLayerSettings.style}
2071
- * @param style
2189
+ * Sets the style for the FeatureLayerSettings object.
2190
+ *
2191
+ * @param {Style | StyleFunction} style - The new style to set. It can be either a Style object or a StyleFunction.
2192
+ * @return {FeatureLayerSettings} - The updated FeatureLayerSettings object with the new style.
2072
2193
  */
2073
2194
  FeatureLayerSettings.prototype.setStyle = function (style) {
2074
2195
  return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { style: style }));
2075
2196
  };
2076
2197
  /**
2077
- * Checks if the model has the same content
2078
- * @param model - the object to compare
2198
+ * Checks if the given FeatureLayerSettings object is identical to the current object.
2199
+ *
2200
+ * @param {FeatureLayerSettings} model - The FeatureLayerSettings object to compare with.
2201
+ * @return {boolean} - Returns true if the given object is identical to the current object, otherwise false.
2079
2202
  */
2080
2203
  FeatureLayerSettings.prototype.isSame = function (model) {
2081
2204
  if (this.maxZoom !== model.maxZoom)
@@ -2131,13 +2254,6 @@
2131
2254
  _this.onDestroy = function () { return _this.removeLayer(); };
2132
2255
  return _this;
2133
2256
  }
2134
- FeatureLayerComponent.prototype.ngOnInit = function () {
2135
- var _this = this;
2136
- this.postboy
2137
- .subscribe(MapRenderedEvent.ID)
2138
- .pipe(operators.filter(function (m) { return !!m; }), operators.first())
2139
- .subscribe(function (m) { return _this.initLayer(); });
2140
- };
2141
2257
  Object.defineProperty(FeatureLayerComponent.prototype, "settings", {
2142
2258
  set: function (value) {
2143
2259
  if (!value || this._settings.isSame(value))
@@ -2148,6 +2264,13 @@
2148
2264
  enumerable: false,
2149
2265
  configurable: true
2150
2266
  });
2267
+ FeatureLayerComponent.prototype.ngOnInit = function () {
2268
+ var _this = this;
2269
+ this.postboy
2270
+ .subscribe(MapRenderedEvent.ID)
2271
+ .pipe(operators.filter(function (m) { return !!m; }), operators.first())
2272
+ .subscribe(function (m) { return _this.initLayer(); });
2273
+ };
2151
2274
  FeatureLayerComponent.prototype.initLayer = function () {
2152
2275
  this.removeLayer();
2153
2276
  this.layer = this.factory.build(this._settings);
@@ -2177,12 +2300,34 @@
2177
2300
  function ClusterLayerSettings() {
2178
2301
  this.name = IdGenerator.get();
2179
2302
  this.zIndex = 1;
2303
+ /**
2304
+ * The maximum view zoom level (inclusive) at which this layer will be visible.
2305
+ *
2306
+ * @type {number}
2307
+ * @default 19
2308
+ */
2180
2309
  this.maxZoom = 19;
2310
+ /**
2311
+ * The minimum view zoom level (exclusive) at which this layer will be visible.
2312
+ *
2313
+ * @type {number}
2314
+ */
2181
2315
  this.minZoom = 0;
2316
+ /**
2317
+ * Distance in pixels within which features will be clustered together.
2318
+ *
2319
+ * @type {number}
2320
+ */
2182
2321
  this.distance = 20;
2183
2322
  this.bbox = false;
2184
2323
  this.clusterCancel = 14;
2185
2324
  }
2325
+ /**
2326
+ * Creates a copy of the given ClusterLayerSettings object.
2327
+ *
2328
+ * @param {ClusterLayerSettings} model - The ClusterLayerSettings object to be copied.
2329
+ * @returns {ClusterLayerSettings} - A new ClusterLayerSettings object that is a copy of the original object.
2330
+ */
2186
2331
  ClusterLayerSettings.copy = function (model) {
2187
2332
  var result = new ClusterLayerSettings();
2188
2333
  result.name = model.name;
@@ -2195,30 +2340,86 @@
2195
2340
  result.style = model.style;
2196
2341
  return result;
2197
2342
  };
2343
+ /**
2344
+ * Set the z-index for the ClusterLayer.
2345
+ *
2346
+ * @param {number} zIndex - The new z-index for the ClusterLayer.
2347
+ * @return {ClusterLayerSettings} - The updated ClusterLayerSettings object.
2348
+ */
2198
2349
  ClusterLayerSettings.prototype.setZIndex = function (zIndex) {
2199
2350
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { zIndex: zIndex }));
2200
2351
  };
2352
+ /**
2353
+ * Sets the distance value for ClusterLayerSettings.
2354
+ *
2355
+ * @param {number} distance - The distance value to be set.
2356
+ * @return {ClusterLayerSettings} - The modified ClusterLayerSettings object.
2357
+ */
2201
2358
  ClusterLayerSettings.prototype.setDistance = function (distance) {
2202
2359
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { distance: distance }));
2203
2360
  };
2361
+ /**
2362
+ * Sets the name of the ClusterLayerSettings object.
2363
+ *
2364
+ * @param {string} name - The name to set for the ClusterLayerSettings.
2365
+ * @return {ClusterLayerSettings} - A new ClusterLayerSettings object with the updated name.
2366
+ */
2204
2367
  ClusterLayerSettings.prototype.setName = function (name) {
2205
2368
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { name: name }));
2206
2369
  };
2370
+ /**
2371
+ * Sets the maximum zoom level for the Cluster Layer.
2372
+ *
2373
+ * @param {number} maxZoom - The maximum zoom level to be set.
2374
+ * @return {ClusterLayerSettings} - The updated ClusterLayerSettings object.
2375
+ */
2207
2376
  ClusterLayerSettings.prototype.setMaxZoom = function (maxZoom) {
2208
2377
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom: maxZoom }));
2209
2378
  };
2379
+ /**
2380
+ * Sets the minimum zoom level for the ClusterLayerSettings.
2381
+ *
2382
+ * @param {number} minZoom - The minimum zoom level to set.
2383
+ * @return {ClusterLayerSettings} - The updated ClusterLayerSettings object.
2384
+ */
2210
2385
  ClusterLayerSettings.prototype.setMinZoom = function (minZoom) {
2211
2386
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom: minZoom }));
2212
2387
  };
2388
+ /**
2389
+ * Sets the cluster cancel number for the ClusterLayerSettings.
2390
+ *
2391
+ * @param {number} clusterCancel - The new cluster cancel number.
2392
+ * @returns {ClusterLayerSettings} - The updated ClusterLayerSettings object.
2393
+ */
2213
2394
  ClusterLayerSettings.prototype.setClusterCancel = function (clusterCancel) {
2214
2395
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { clusterCancel: clusterCancel }));
2215
2396
  };
2397
+ /**
2398
+ * Sets the value of 'bbox' property in the ClusterLayerSettings object.
2399
+ *
2400
+ * @param {boolean} bbox - A boolean value indicating whether to include bounding box calculation in the cluster layer settings.
2401
+ * @returns {ClusterLayerSettings} - The updated ClusterLayerSettings object with the newly set 'bbox' value.
2402
+ */
2216
2403
  ClusterLayerSettings.prototype.setBbox = function (bbox) {
2217
2404
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { bbox: bbox }));
2218
2405
  };
2406
+ /**
2407
+ * Sets the style for the ClusterLayerSettings.
2408
+ *
2409
+ * @param {function} style - A function that takes an array of identified features as input and returns a Style or StyleFunction.
2410
+ *
2411
+ * @return {ClusterLayerSettings} - The updated ClusterLayerSettings object with the new style applied.
2412
+ */
2219
2413
  ClusterLayerSettings.prototype.setStyle = function (style) {
2220
2414
  return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { style: style }));
2221
2415
  };
2416
+ /**
2417
+ * Checks if the current ClusterLayerSettings object is the same as the specified model.
2418
+ *
2419
+ * @param {ClusterLayerSettings} model - The model to compare with the current object.
2420
+ *
2421
+ * @return {boolean} - Returns true if the current ClusterLayerSettings object is the same as the specified model, otherwise false.
2422
+ */
2222
2423
  ClusterLayerSettings.prototype.isSame = function (model) {
2223
2424
  if (this.maxZoom !== model.maxZoom)
2224
2425
  return false;
@@ -2331,6 +2532,9 @@
2331
2532
  }]
2332
2533
  }] });
2333
2534
 
2535
+ /**
2536
+ * Represents a cluster layer component.
2537
+ */
2334
2538
  var ClusterLayerComponent = /** @class */ (function (_super) {
2335
2539
  __extends(ClusterLayerComponent, _super);
2336
2540
  function ClusterLayerComponent(postboy, factory) {
@@ -2342,14 +2546,12 @@
2342
2546
  _this.onDestroy = function () { return _this.removeLayer(); };
2343
2547
  return _this;
2344
2548
  }
2345
- ClusterLayerComponent.prototype.ngOnInit = function () {
2346
- var _this = this;
2347
- this.postboy
2348
- .subscribe(MapRenderedEvent.ID)
2349
- .pipe(operators.filter(function (m) { return !!m; }), operators.first())
2350
- .subscribe(function (m) { return _this.initLayer(); });
2351
- };
2352
2549
  Object.defineProperty(ClusterLayerComponent.prototype, "settings", {
2550
+ /**
2551
+ * Sets the settings for the cluster layer.
2552
+ *
2553
+ * @param {ClusterLayerSettings | undefined} value - The settings for the cluster layer.
2554
+ */
2353
2555
  set: function (value) {
2354
2556
  if (!value || this._settings.isSame(value))
2355
2557
  return;
@@ -2359,6 +2561,13 @@
2359
2561
  enumerable: false,
2360
2562
  configurable: true
2361
2563
  });
2564
+ ClusterLayerComponent.prototype.ngOnInit = function () {
2565
+ var _this = this;
2566
+ this.postboy
2567
+ .subscribe(MapRenderedEvent.ID)
2568
+ .pipe(operators.filter(function (m) { return !!m; }), operators.first())
2569
+ .subscribe(function (m) { return _this.initLayer(); });
2570
+ };
2362
2571
  ClusterLayerComponent.prototype.initLayer = function () {
2363
2572
  this.removeLayer();
2364
2573
  this.manager = this.factory.build(this._settings, this.postboy);
@@ -2421,8 +2630,8 @@
2421
2630
  _this.registrator = registrator;
2422
2631
  _this.detector = detector;
2423
2632
  _this.osmUrl = '';
2424
- _this._settings = new MapSettings();
2425
2633
  _this.drawingLayerSettings = new FeatureLayerSettings().setName(MapConstants.DrawingLayerId);
2634
+ _this._settings = new MapSettings();
2426
2635
  _this.onDestroy = function () {
2427
2636
  _this.registrator.down();
2428
2637
  };
@@ -2497,6 +2706,11 @@
2497
2706
  type: i0.Input
2498
2707
  }] } });
2499
2708
 
2709
+ /**
2710
+ * MarkersComponent is a component that displays markers on a map.
2711
+ * It listens for changes in the `markers` input property and
2712
+ * automatically puts the markers on the map using the MapPostboyService.
2713
+ */
2500
2714
  var MarkersComponent = /** @class */ (function (_super) {
2501
2715
  __extends(MarkersComponent, _super);
2502
2716
  function MarkersComponent(postboy) {
@@ -2507,6 +2721,11 @@
2507
2721
  return _this;
2508
2722
  }
2509
2723
  Object.defineProperty(MarkersComponent.prototype, "markers", {
2724
+ /**
2725
+ * Sets the markers property.
2726
+ *
2727
+ * @param {MarkerModel[]} value - The array of MarkerModel objects to set as markers.
2728
+ */
2510
2729
  set: function (value) {
2511
2730
  this._markers = value !== null && value !== void 0 ? value : [];
2512
2731
  this.putMarkers();
@@ -2580,13 +2799,8 @@
2580
2799
  var _this = _super.call(this) || this;
2581
2800
  _this.postboy = postboy;
2582
2801
  _this.detector = detector;
2583
- _this._settings = new TooltipSettings();
2584
2802
  _this.show = false;
2585
- _this.removeOverlay = function () {
2586
- var _a;
2587
- !!_this.overlay && ((_a = _this.map) === null || _a === void 0 ? void 0 : _a.removeOverlay(_this.overlay));
2588
- _this.show = false;
2589
- };
2803
+ _this._settings = new TooltipSettings();
2590
2804
  _this.options = function (coordinates) {
2591
2805
  var _a;
2592
2806
  return {
@@ -2596,6 +2810,11 @@
2596
2810
  position: coordinates,
2597
2811
  };
2598
2812
  };
2813
+ _this.removeOverlay = function () {
2814
+ var _a;
2815
+ !!_this.overlay && ((_a = _this.map) === null || _a === void 0 ? void 0 : _a.removeOverlay(_this.overlay));
2816
+ _this.show = false;
2817
+ };
2599
2818
  return _this;
2600
2819
  }
2601
2820
  Object.defineProperty(TooltipComponent.prototype, "settings", {
@@ -2613,6 +2832,14 @@
2613
2832
  this.subs.push(this.observeMapClick());
2614
2833
  this.subs.push(this.observeClose());
2615
2834
  };
2835
+ TooltipComponent.prototype.addOverlay = function (coordinates) {
2836
+ var _a;
2837
+ this.removeOverlay();
2838
+ this.overlay = new Overlay__default["default"](this.options(coordinates));
2839
+ (_a = this.map) === null || _a === void 0 ? void 0 : _a.addOverlay(this.overlay);
2840
+ this.show = true;
2841
+ this.detector.detectChanges();
2842
+ };
2616
2843
  TooltipComponent.prototype.observeMapClick = function () {
2617
2844
  var _this = this;
2618
2845
  return this.postboy.subscribe(MapClickEvent.ID).subscribe(function (ev) {
@@ -2632,14 +2859,6 @@
2632
2859
  _this.map = m.map;
2633
2860
  });
2634
2861
  };
2635
- TooltipComponent.prototype.addOverlay = function (coordinates) {
2636
- var _a;
2637
- this.removeOverlay();
2638
- this.overlay = new Overlay__default["default"](this.options(coordinates));
2639
- (_a = this.map) === null || _a === void 0 ? void 0 : _a.addOverlay(this.overlay);
2640
- this.show = true;
2641
- this.detector.detectChanges();
2642
- };
2643
2862
  return TooltipComponent;
2644
2863
  }(DestructibleComponent));
2645
2864
  TooltipComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TooltipComponent, deps: [{ token: MapPostboyService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
@@ -2659,6 +2878,11 @@
2659
2878
  type: i0.Input
2660
2879
  }] } });
2661
2880
 
2881
+ /**
2882
+ * Component for rendering polygons on a map.
2883
+ * It listens for changes in the `polygons` input property and
2884
+ * automatically puts the polygons on the map using the MapPostboyService.
2885
+ */
2662
2886
  var PolygonsComponent = /** @class */ (function (_super) {
2663
2887
  __extends(PolygonsComponent, _super);
2664
2888
  function PolygonsComponent(postboy) {
@@ -2669,6 +2893,11 @@
2669
2893
  return _this;
2670
2894
  }
2671
2895
  Object.defineProperty(PolygonsComponent.prototype, "polygons", {
2896
+ /**
2897
+ * Sets the value of polygons.
2898
+ *
2899
+ * @param {PolygonModel[]} value - The new value for polygons.
2900
+ */
2672
2901
  set: function (value) {
2673
2902
  this._polygons = value !== null && value !== void 0 ? value : [];
2674
2903
  this.putPolygons();
@@ -2706,14 +2935,47 @@
2706
2935
  type: i0.Input
2707
2936
  }] } });
2708
2937
 
2938
+ /**
2939
+ * Represents the settings for a zoom control.
2940
+ */
2709
2941
  var ZoomControlSettings = /** @class */ (function () {
2710
2942
  function ZoomControlSettings() {
2943
+ /**
2944
+ * The CSS class name of the control element.
2945
+ *
2946
+ * @type {string}
2947
+ */
2711
2948
  this.controlClass = 'ol-zoom';
2949
+ /**
2950
+ * The CSS class name for zoom in button.
2951
+ * @type {string}
2952
+ */
2712
2953
  this.zoomInClass = 'ol-zoom-in';
2954
+ /**
2955
+ * The CSS class name for the zoom out button element.
2956
+ *
2957
+ * @type {string}
2958
+ */
2713
2959
  this.zoomOutClass = 'ol-zoom-out';
2960
+ /**
2961
+ * The label for the zoom in action.
2962
+ *
2963
+ * @type {string}
2964
+ */
2714
2965
  this.zoomInLabel = 'Zoom In';
2966
+ /**
2967
+ * The label for the zoom out control.
2968
+ *
2969
+ * @type {string}
2970
+ */
2715
2971
  this.zoomOutLabel = 'Zoom Out';
2716
2972
  }
2973
+ /**
2974
+ * Copies the provided ZoomControlSettings object.
2975
+ *
2976
+ * @param {ZoomControlSettings} model - The ZoomControlSettings object to be copied.
2977
+ * @return {ZoomControlSettings} - The copied ZoomControlSettings object.
2978
+ */
2717
2979
  ZoomControlSettings.copy = function (model) {
2718
2980
  var result = new ZoomControlSettings();
2719
2981
  result.controlClass = model.controlClass;
@@ -2723,6 +2985,13 @@
2723
2985
  result.zoomOutLabel = model.zoomOutLabel;
2724
2986
  return result;
2725
2987
  };
2988
+ /**
2989
+ * Checks if the current ZoomControlSettings object is equal to the given model.
2990
+ *
2991
+ * @param {ZoomControlSettings} model - The ZoomControlSettings object to compare with.
2992
+ *
2993
+ * @return {boolean} - true if the current object is equal to the given model, false otherwise.
2994
+ */
2726
2995
  ZoomControlSettings.prototype.isSame = function (model) {
2727
2996
  if (this.zoomInClass !== model.zoomInClass)
2728
2997
  return false;
@@ -2736,24 +3005,61 @@
2736
3005
  return false;
2737
3006
  return true;
2738
3007
  };
3008
+ /**
3009
+ * Sets the zoom in label of the Zoom Control Settings.
3010
+ *
3011
+ * @param {string} zoomInLabel - The label for the zoom in button.
3012
+ * @return {ZoomControlSettings} - The new Zoom Control Settings object with the updated zoom in label.
3013
+ */
2739
3014
  ZoomControlSettings.prototype.setZoomInLabel = function (zoomInLabel) {
2740
3015
  return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomInLabel: zoomInLabel }));
2741
3016
  };
3017
+ /**
3018
+ * Sets the zoomOutClass property of the ZoomControlSettings object.
3019
+ *
3020
+ * @param {string} zoomOutClass - The CSS class to be assigned to the zoom out button.
3021
+ * @return {ZoomControlSettings} - The updated ZoomControlSettings object with the new zoomOutClass value.
3022
+ */
2742
3023
  ZoomControlSettings.prototype.setZoomOutClass = function (zoomOutClass) {
2743
3024
  return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomOutClass: zoomOutClass }));
2744
3025
  };
3026
+ /**
3027
+ * Sets the zoom in class for the zoom control settings.
3028
+ *
3029
+ * @param {string} zoomInClass - The new zoom in class to be set.
3030
+ * @return {ZoomControlSettings} - The updated zoom control settings.
3031
+ */
2745
3032
  ZoomControlSettings.prototype.setZoomInClass = function (zoomInClass) {
2746
3033
  return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomInClass: zoomInClass }));
2747
3034
  };
3035
+ /**
3036
+ * Set the label for the zoom out control.
3037
+ *
3038
+ * @param {string} zoomOutLabel - The label for the zoom out control.
3039
+ * @returns {ZoomControlSettings} - The updated zoom control settings.
3040
+ */
2748
3041
  ZoomControlSettings.prototype.setZoomOutLabel = function (zoomOutLabel) {
2749
3042
  return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomOutLabel: zoomOutLabel }));
2750
3043
  };
3044
+ /**
3045
+ * Sets the control class for the ZoomControlSettings.
3046
+ *
3047
+ * @param {string} controlClass - The class name of the control to be set.
3048
+ *
3049
+ * @return {ZoomControlSettings} - The modified ZoomControlSettings object.
3050
+ */
2751
3051
  ZoomControlSettings.prototype.setControlClass = function (controlClass) {
2752
3052
  return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { controlClass: controlClass }));
2753
3053
  };
2754
3054
  return ZoomControlSettings;
2755
3055
  }());
2756
3056
 
3057
+ /**
3058
+ * @class
3059
+ * @classdesc Represents a component for the Zoom control on a map.
3060
+ * @extends DestructibleComponent
3061
+ * @implements OnInit
3062
+ */
2757
3063
  var MapControlZoomComponent = /** @class */ (function (_super) {
2758
3064
  __extends(MapControlZoomComponent, _super);
2759
3065
  function MapControlZoomComponent(postboy) {
@@ -2767,6 +3073,17 @@
2767
3073
  return _this;
2768
3074
  }
2769
3075
  Object.defineProperty(MapControlZoomComponent.prototype, "settings", {
3076
+ /**
3077
+ * Sets the settings for the Zoom Control.
3078
+ *
3079
+ * @param {ZoomControlSettings | undefined} value - The new settings for the Zoom Control.
3080
+ *
3081
+ * @description
3082
+ * This method sets the settings for the Zoom Control. It takes a parameter `value` which should be an object of type `ZoomControlSettings` or `undefined`.
3083
+ *
3084
+ * If the `value` is `undefined` or the same as the current settings, the method will return without making any changes.
3085
+ *
3086
+ */
2770
3087
  set: function (value) {
2771
3088
  if (!value || this._settings.isSame(value))
2772
3089
  return;
@@ -2861,9 +3178,19 @@
2861
3178
  }]
2862
3179
  }] });
2863
3180
 
3181
+ /**
3182
+ * Helper class to create and modify marker styles.
3183
+ */
2864
3184
  var MarkerStyleHelper = /** @class */ (function () {
2865
3185
  function MarkerStyleHelper() {
2866
3186
  }
3187
+ /**
3188
+ * Creates a new Style object from an SVG.
3189
+ * @param {string} svg - The SVG string.
3190
+ * @param {Array<number>} [size=[30, 30]] - The size of the icon image.
3191
+ * @param {number} [zIndex=400] - The zIndex of the style.
3192
+ * @returns {Style} A new Style object.
3193
+ */
2867
3194
  MarkerStyleHelper.fromSvg = function (svg, size, zIndex) {
2868
3195
  if (size === void 0) { size = [30, 30]; }
2869
3196
  if (zIndex === void 0) { zIndex = 400; }
@@ -2877,6 +3204,15 @@
2877
3204
  zIndex: zIndex,
2878
3205
  });
2879
3206
  };
3207
+ /**
3208
+ * Returns a Style object with a circle style.
3209
+ *
3210
+ * @param {number} radius - The radius of the circle.
3211
+ * @param {string} fill - The fill color of the circle. Format: '#RRGGBB' or 'rgba(R, G, B, A)'.
3212
+ * @param {string} strokeColor - The stroke color of the circle. Format: '#RRGGBB' or 'rgba(R, G, B, A)'.
3213
+ * @param {number} [strokeWidth=1] - The width of the stroke. Default is 1.
3214
+ * @returns {Style} - A Style object with a Circle image.
3215
+ */
2880
3216
  MarkerStyleHelper.circle = function (radius, fill, strokeColor, strokeWidth) {
2881
3217
  if (strokeWidth === void 0) { strokeWidth = 1; }
2882
3218
  return new Style__default["default"]({
@@ -2887,6 +3223,13 @@
2887
3223
  }),
2888
3224
  });
2889
3225
  };
3226
+ /**
3227
+ * Applies the given Text to the provided Style.
3228
+ *
3229
+ * @param {Style} style - The Style to modify.
3230
+ * @param {Text} text - The Text to apply to the Style.
3231
+ * @return {Style} - The modified Style with the applied Text.
3232
+ */
2890
3233
  MarkerStyleHelper.withText = function (style, text) {
2891
3234
  style.setText(text);
2892
3235
  return style;
@@ -2894,9 +3237,21 @@
2894
3237
  return MarkerStyleHelper;
2895
3238
  }());
2896
3239
 
3240
+ /**
3241
+ * A helper class for creating polygon styles.
3242
+ * @class
3243
+ */
2897
3244
  var PolygonStyleHelper = /** @class */ (function () {
2898
3245
  function PolygonStyleHelper() {
2899
3246
  }
3247
+ /**
3248
+ * Creates a Style object with the given fill color, stroke color, and stroke width.
3249
+ *
3250
+ * @param {string} fill - The fill color in hexadecimal or RGB format.
3251
+ * @param {string} stroke - The stroke color in hexadecimal or RGB format.
3252
+ * @param {number} [strokeWidth=1] - The width of the stroke. Defaults to 1.
3253
+ * @return {Style} The created Style object.
3254
+ */
2900
3255
  PolygonStyleHelper.simple = function (fill, stroke, strokeWidth) {
2901
3256
  if (strokeWidth === void 0) { strokeWidth = 1; }
2902
3257
  return new Style__default["default"]({
@@ -2909,6 +3264,15 @@
2909
3264
  }),
2910
3265
  });
2911
3266
  };
3267
+ /**
3268
+ * Creates a new Style object with the given fill, stroke, stroke width, and pin radius.
3269
+ *
3270
+ * @param {string} fill - The color to use for the fill of the style.
3271
+ * @param {string} stroke - The color to use for the stroke of the style.
3272
+ * @param {number} [strokeWidth=1] - The width of the stroke. Defaults to 1.
3273
+ * @param {number} [pinRadius=5] - The radius of the circle used as the image for the style. Defaults to 5.
3274
+ * @returns {Style} - The newly created Style object.
3275
+ */
2912
3276
  PolygonStyleHelper.edit = function (fill, stroke, strokeWidth, pinRadius) {
2913
3277
  if (strokeWidth === void 0) { strokeWidth = 1; }
2914
3278
  if (pinRadius === void 0) { pinRadius = 5; }
@@ -2931,9 +3295,20 @@
2931
3295
  return PolygonStyleHelper;
2932
3296
  }());
2933
3297
 
3298
+ /**
3299
+ * Helper class for creating text styles.
3300
+ */
2934
3301
  var TextStyleHelper = /** @class */ (function () {
2935
3302
  function TextStyleHelper() {
2936
3303
  }
3304
+ /**
3305
+ * Creates a new instance of the Text class with the specified properties.
3306
+ *
3307
+ * @param {string} text - The text content of the Text object.
3308
+ * @param {string} font - The font style of the Text object.
3309
+ * @param {string} color - The color of the Text object.
3310
+ * @return {Text} A new instance of the Text class.
3311
+ */
2937
3312
  TextStyleHelper.get = function (text, font, color) {
2938
3313
  return new style.Text({
2939
3314
  text: text,
@@ -2947,6 +3322,9 @@
2947
3322
  return TextStyleHelper;
2948
3323
  }());
2949
3324
 
3325
+ /**
3326
+ * A helper class for converting and stringify features.
3327
+ */
2950
3328
  var StringifyFeatureHelper = /** @class */ (function () {
2951
3329
  function StringifyFeatureHelper() {
2952
3330
  }
@@ -2956,29 +3334,30 @@
2956
3334
  ? new format.GeoJSON().writeFeature(feature)
2957
3335
  : new format.WKT().writeFeature(feature);
2958
3336
  };
3337
+ /**
3338
+ * Creates a polygon feature representing a circle based on a given feature with a circle geometry.
3339
+ *
3340
+ * @param {Feature<Geometry>} feature - The input feature with a circle geometry.
3341
+ * @param {FeatureOutputFormat} format - The format for outputting the polygon feature. (default: FeatureOutputFormat.GeoJson)
3342
+ *
3343
+ * @return {string} - The string representation of the polygon feature.
3344
+ */
2959
3345
  StringifyFeatureHelper.circle = function (feature, format) {
2960
3346
  if (format === void 0) { format = exports.FeatureOutputFormat.GeoJson; }
2961
- // const clone = feature.clone();
2962
- // clone.setGeometry(fromCircle(feature.getGeometry()! as Circle));
2963
- var tetemp = feature.getGeometryName();
2964
3347
  var circle = feature.getGeometry();
2965
- // const temp = StringifyFeatureHelper.drawCircle(circle.getCenter(), circle.getRadius());
2966
- var ttt = feature.getGeometry().getExtent();
2967
- var eastPoint = [ttt[2], (ttt[1] + ttt[3]) / 2];
2968
- var aaa = __spreadArray(__spreadArray([], __read(proj.transform([ttt[0], ttt[1]], 'EPSG:4326', 'EPSG:3857'))), __read(proj.transform([ttt[2], ttt[3]], 'EPSG:4326', 'EPSG:3857')));
2969
- var radius = (aaa[2] - aaa[0]) / 2;
2970
- var radius2 = new geom.LineString([circle.getCenter(), eastPoint]).getLength();
3348
+ var ext = feature.getGeometry().getExtent();
3349
+ var coords = __spreadArray(__spreadArray([], __read(proj.transform([ext[0], ext[1]], 'EPSG:4326', 'EPSG:3857'))), __read(proj.transform([ext[2], ext[3]], 'EPSG:4326', 'EPSG:3857')));
3350
+ var radius = (coords[2] - coords[0]) / 2;
2971
3351
  var polygonGeom = new Polygon__default["default"](StringifyFeatureHelper.drawCircle(circle.getCenter(), radius));
2972
- // var edgeCoordinate = [circle.getCenter()[0] + radius, circle.getCenter()[1]];
2973
- // var wgs84Sphere = new Sphere(6378137);
2974
3352
  return StringifyFeatureHelper.polygon(new ol.Feature(polygonGeom), format);
2975
- // const rad = circle.getRadius();
2976
- // const degrees = 180 / Math.PI; // radians to degrees
2977
- // const radians = Math.PI / 180; // degrees to radians
2978
- // const rlat = rad * degrees * 1000;
2979
- // const rlng = rad * radians;
2980
- // return StringifyFeatureHelper.polygon(new Feature<Geometry>(circular(circle.getCenter(),circle.getRadius() * METERS_PER_UNIT)), format);
2981
3353
  };
3354
+ /**
3355
+ * Draw a circle based on a center point and radius.
3356
+ *
3357
+ * @param {number[]} point - The center point coordinates in EPSG:4326 format.
3358
+ * @param {number} radius - The radius of the circle in meters.
3359
+ * @return {Coordinate[][]} - The coordinates of the circle boundary in EPSG:4326 format.
3360
+ */
2982
3361
  StringifyFeatureHelper.drawCircle = function (point, radius) {
2983
3362
  var tetetemp = proj.transform(point, 'EPSG:4326', 'EPSG:3857');
2984
3363
  // const tetetemp = point;
@@ -3019,6 +3398,7 @@
3019
3398
  exports.FeatureLayerComponent = FeatureLayerComponent;
3020
3399
  exports.FeatureLayerSettings = FeatureLayerSettings;
3021
3400
  exports.FitToPolygonsCommand = FitToPolygonsCommand;
3401
+ exports.GetMapPositionExecutor = GetMapPositionExecutor;
3022
3402
  exports.MapClickEvent = MapClickEvent;
3023
3403
  exports.MapControl = MapControl;
3024
3404
  exports.MapControlZoomComponent = MapControlZoomComponent;