@artstesh/maps 4.1.18 → 4.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.
@@ -6,6 +6,7 @@ import { Feature, Collection } from 'ol';
6
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,7 +20,6 @@ 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';
@@ -238,6 +238,11 @@ class PolygonModel {
238
238
  feature.setId(id);
239
239
  return new PolygonModel(feature, id, info);
240
240
  }
241
+ static circle(id, lat, lng, radius, vertices = 32, info) {
242
+ let feature = new Feature(circular([lng, lat], radius, vertices));
243
+ feature.setId(id);
244
+ return new PolygonModel(feature, id, info);
245
+ }
241
246
  }
242
247
 
243
248
  /**
@@ -2688,5 +2693,5 @@ class StringifyFeatureHelper {
2688
2693
  * Generated bundle index. Do not edit.
2689
2694
  */
2690
2695
 
2691
- export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FilterFeaturesInPointExecutor, FitToPolygonsCommand, GetFeaturesInAreaQuery, GetFeaturesInPointQuery, GetMapPositionExecutor, 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 };
2696
+ 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 };
2692
2697
  //# sourceMappingURL=maps-components.mjs.map