@artstesh/maps 6.0.12 → 6.0.14
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/polygon.model.mjs +4 -4
- package/dist/esm2022/src/map/models/polygon.model.mjs +4 -4
- package/dist/fesm2022/maps-components-src-map.mjs +7 -7
- package/dist/fesm2022/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2022/maps-components.mjs +7 -7
- package/dist/fesm2022/maps-components.mjs.map +1 -1
- package/dist/map/models/polygon.model.d.ts +1 -1
- package/dist/src/map/models/polygon.model.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3,9 +3,10 @@ import { Component, Injectable, ChangeDetectionStrategy, Input, ViewChild, NgMod
|
|
|
3
3
|
import * as i4 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { Feature, Collection } from 'ol';
|
|
6
|
-
import { Point
|
|
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
|
|
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 {
|
|
@@ -245,8 +245,8 @@ class PolygonModel {
|
|
|
245
245
|
feature.setId(id);
|
|
246
246
|
return new PolygonModel(feature, id, info);
|
|
247
247
|
}
|
|
248
|
-
static circle(id, lat, lng, radius, info) {
|
|
249
|
-
let feature = new Feature(
|
|
248
|
+
static circle(id, lat, lng, radius, vertices = 32, info) {
|
|
249
|
+
let feature = new Feature(circular([lng, lat], radius, vertices));
|
|
250
250
|
feature.setId(id);
|
|
251
251
|
return new PolygonModel(feature, id, info);
|
|
252
252
|
}
|
|
@@ -2628,7 +2628,7 @@ class MarkerStyleHelper {
|
|
|
2628
2628
|
*/
|
|
2629
2629
|
static circle(radius, fill, strokeColor, strokeWidth = 1) {
|
|
2630
2630
|
return new Style({
|
|
2631
|
-
image: new Circle
|
|
2631
|
+
image: new Circle({
|
|
2632
2632
|
radius,
|
|
2633
2633
|
fill: new Fill({ color: fill }),
|
|
2634
2634
|
stroke: new Stroke({ color: strokeColor, width: strokeWidth }),
|
|
@@ -2683,7 +2683,7 @@ class PolygonStyleHelper {
|
|
|
2683
2683
|
*/
|
|
2684
2684
|
static edit(fill, stroke, strokeWidth = 1, pinRadius = 5) {
|
|
2685
2685
|
return new Style({
|
|
2686
|
-
image: new Circle
|
|
2686
|
+
image: new Circle({
|
|
2687
2687
|
fill: new Fill({
|
|
2688
2688
|
color: stroke,
|
|
2689
2689
|
}),
|