@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';
@@ -239,6 +239,11 @@ class PolygonModel {
239
239
  feature.setId(id);
240
240
  return new PolygonModel(feature, id, info);
241
241
  }
242
+ static circle(id, lat, lng, radius, vertices = 32, info) {
243
+ let feature = new Feature(circular([lng, lat], radius, vertices));
244
+ feature.setId(id);
245
+ return new PolygonModel(feature, id, info);
246
+ }
242
247
  }
243
248
 
244
249
  /**
@@ -2711,5 +2716,5 @@ class StringifyFeatureHelper {
2711
2716
  * Generated bundle index. Do not edit.
2712
2717
  */
2713
2718
 
2714
- 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 };
2719
+ 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 };
2715
2720
  //# sourceMappingURL=maps-components.mjs.map