@artstesh/maps 6.0.11 → 6.0.13
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.
- package/dist/esm2022/map/models/index.mjs +2 -1
- package/dist/esm2022/map/models/polygon.model.mjs +8 -1
- package/dist/esm2022/src/map/models/index.mjs +2 -1
- package/dist/esm2022/src/map/models/polygon.model.mjs +8 -1
- package/dist/fesm2022/maps-components-src-map.mjs +7 -2
- package/dist/fesm2022/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2022/maps-components.mjs +7 -2
- package/dist/fesm2022/maps-components.mjs.map +1 -1
- package/dist/map/models/index.d.ts +1 -0
- package/dist/map/models/polygon.model.d.ts +3 -0
- package/dist/src/map/models/index.d.ts +1 -0
- package/dist/src/map/models/polygon.model.d.ts +3 -0
- package/package.json +1 -1
|
@@ -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';
|
|
@@ -245,6 +245,11 @@ class PolygonModel {
|
|
|
245
245
|
feature.setId(id);
|
|
246
246
|
return new PolygonModel(feature, id, info);
|
|
247
247
|
}
|
|
248
|
+
static circle(id, lat, lng, radius, vertices = 32, info) {
|
|
249
|
+
let feature = new Feature(circular([lng, lat], radius, vertices));
|
|
250
|
+
feature.setId(id);
|
|
251
|
+
return new PolygonModel(feature, id, info);
|
|
252
|
+
}
|
|
248
253
|
}
|
|
249
254
|
|
|
250
255
|
/**
|
|
@@ -2786,5 +2791,5 @@ class StringifyFeatureHelper {
|
|
|
2786
2791
|
* Generated bundle index. Do not edit.
|
|
2787
2792
|
*/
|
|
2788
2793
|
|
|
2789
|
-
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 };
|
|
2794
|
+
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 };
|
|
2790
2795
|
//# sourceMappingURL=maps-components.mjs.map
|