@artstesh/maps 1.1.18 → 1.1.20

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.
@@ -3,9 +3,10 @@ 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, Circle } 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
+ import Polygon, { circular, fromExtent } from 'ol/geom/Polygon';
9
10
  import { Control, Zoom } from 'ol/control';
10
11
  import { get, useGeographic, transform } from 'ol/proj';
11
12
  import { PostboyGenericMessage, PostboyCallbackMessage, PostboyExecutor, PostboyService, PostboyAbstractRegistrator } from '@artstesh/postboy';
@@ -19,14 +20,13 @@ import TileLayer from 'ol/layer/Tile';
19
20
  import OSM from 'ol/source/OSM';
20
21
  import { Vector as Vector$1 } from 'ol/layer';
21
22
  import { bbox } from 'ol/loadingstrategy';
22
- import Polygon, { fromExtent } from 'ol/geom/Polygon';
23
23
  import Cluster from 'ol/source/Cluster';
24
24
  import { combineLatest } from 'rxjs';
25
25
  import Map from 'ol/Map';
26
26
  import View from 'ol/View';
27
27
  import Overlay from 'ol/Overlay';
28
28
  import Style from 'ol/style/Style';
29
- import { Icon, Circle as Circle$1, Fill, Stroke, Text } from 'ol/style';
29
+ import { Icon, Circle, Fill, Stroke, Text } from 'ol/style';
30
30
  import { METERS_PER_UNIT } from 'ol/proj/epsg4326';
31
31
 
32
32
  class DestructibleComponent {
@@ -239,8 +239,8 @@ class PolygonModel {
239
239
  feature.setId(id);
240
240
  return new PolygonModel(feature, id, info);
241
241
  }
242
- static circle(id, lat, lng, radius, info) {
243
- let feature = new Feature(new Circle([lng, lat], radius));
242
+ static circle(id, lat, lng, radius, vertices = 32, info) {
243
+ let feature = new Feature(circular([lng, lat], radius, vertices));
244
244
  feature.setId(id);
245
245
  return new PolygonModel(feature, id, info);
246
246
  }
@@ -626,6 +626,15 @@ class GetFeaturesInPointQuery extends PostboyCallbackMessage {
626
626
  }
627
627
  GetFeaturesInPointQuery.ID = '99bbc56f-34a2-4064-8300-13bb3d0662c1';
628
628
 
629
+ class FitToFeaturesCommand extends PostboyGenericMessage {
630
+ constructor(features, zoomAfter = 0) {
631
+ super();
632
+ this.features = features;
633
+ this.zoomAfter = zoomAfter;
634
+ }
635
+ }
636
+ FitToFeaturesCommand.ID = '04d67609-0b4c-4f52-aa53-ad0a3db967dc';
637
+
629
638
  class AddLayerCommand extends PostboyGenericMessage {
630
639
  constructor(layer) {
631
640
  super();
@@ -667,15 +676,6 @@ class RemoveTileCommand extends PostboyGenericMessage {
667
676
  }
668
677
  RemoveTileCommand.ID = 'dab0f861-bb25-46da-9388-717bfaae798f';
669
678
 
670
- class FitToFeaturesCommand extends PostboyGenericMessage {
671
- constructor(features, zoomAfter = 0) {
672
- super();
673
- this.features = features;
674
- this.zoomAfter = zoomAfter;
675
- }
676
- }
677
- FitToFeaturesCommand.ID = '04d67609-0b4c-4f52-aa53-ad0a3db967dc';
678
-
679
679
  class GetLayerQuery extends PostboyCallbackMessage {
680
680
  constructor(name) {
681
681
  super();
@@ -2600,7 +2600,7 @@ class MarkerStyleHelper {
2600
2600
  */
2601
2601
  static circle(radius, fill, strokeColor, strokeWidth = 1) {
2602
2602
  return new Style({
2603
- image: new Circle$1({
2603
+ image: new Circle({
2604
2604
  radius,
2605
2605
  fill: new Fill({ color: fill }),
2606
2606
  stroke: new Stroke({ color: strokeColor, width: strokeWidth }),
@@ -2655,7 +2655,7 @@ class PolygonStyleHelper {
2655
2655
  */
2656
2656
  static edit(fill, stroke, strokeWidth = 1, pinRadius = 5) {
2657
2657
  return new Style({
2658
- image: new Circle$1({
2658
+ image: new Circle({
2659
2659
  fill: new Fill({
2660
2660
  color: stroke,
2661
2661
  }),
@@ -2763,5 +2763,5 @@ class StringifyFeatureHelper {
2763
2763
  * Generated bundle index. Do not edit.
2764
2764
  */
2765
2765
 
2766
- export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FilterFeaturesInPointExecutor, FitToPolygonsCommand, GetFeaturesInAreaQuery, GetFeaturesInPointQuery, GetMapPositionExecutor, MapClickEvent, MapConstants, 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 };
2766
+ export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FilterFeaturesInPointExecutor, FitToFeaturesCommand, FitToPolygonsCommand, GetFeaturesInAreaQuery, GetFeaturesInPointQuery, GetMapPositionExecutor, MapClickEvent, MapConstants, 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 };
2767
2767
  //# sourceMappingURL=maps-components.js.map