@artstesh/maps 6.1.15 → 7.0.0
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/common/destructible.component.mjs +4 -4
- package/dist/esm2022/map/helpers/marker-style.helper.mjs +2 -2
- package/dist/esm2022/map/helpers/text-style.helper.mjs +1 -1
- package/dist/esm2022/map/map-plate/controls/map-control-zoom/map-control-zoom.component.mjs +5 -5
- package/dist/esm2022/map/map-plate/features/markers/markers.component.mjs +5 -5
- package/dist/esm2022/map/map-plate/features/polygons/polygons.component.mjs +5 -5
- package/dist/esm2022/map/map-plate/layers/cluster-layer/cluster-layer-factory.service.mjs +4 -4
- package/dist/esm2022/map/map-plate/layers/cluster-layer/cluster-layer.component.mjs +5 -5
- package/dist/esm2022/map/map-plate/layers/feature-layer/feature-layer.component.mjs +5 -5
- package/dist/esm2022/map/map-plate/layers/feature-layer/feature-layer.factory.mjs +4 -4
- package/dist/esm2022/map/map-plate/layers/image-layer/image-layer-factory.mjs +4 -4
- package/dist/esm2022/map/map-plate/layers/image-layer/image-layer.component.mjs +5 -5
- package/dist/esm2022/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.mjs +16 -6
- package/dist/esm2022/map/map-plate/layers/raster-tile/raster-tile-layer.component.mjs +5 -5
- package/dist/esm2022/map/map-plate/layers/raster-tile/raster-tile-layer.factory.mjs +4 -4
- package/dist/esm2022/map/map-plate/layers/tile-layer/tile-layer.component.mjs +5 -5
- package/dist/esm2022/map/map-plate/layers/tile-layer/tile-layer.factory.mjs +4 -4
- package/dist/esm2022/map/map-plate/map-plate.component.mjs +16 -12
- package/dist/esm2022/map/map-plate/map-plate.factory.service.mjs +4 -4
- package/dist/esm2022/map/map-plate/tooltips/tooltip/tooltip.component.mjs +10 -7
- package/dist/esm2022/map/messages/executors/generate-zoom-control.executor.mjs +1 -1
- package/dist/esm2022/map/models/map-settings.mjs +14 -1
- package/dist/esm2022/map/models/polygon.model.mjs +1 -1
- package/dist/esm2022/map/public-api.mjs +1 -2
- package/dist/esm2022/map/services/controls/controls.service.mjs +4 -4
- package/dist/esm2022/map/services/drawing/drawing.service.mjs +4 -4
- package/dist/esm2022/map/services/drawing/feature-modification.service.mjs +4 -4
- package/dist/esm2022/map/services/map-click.service.mjs +4 -4
- package/dist/esm2022/map/services/map-feature.service.mjs +4 -4
- package/dist/esm2022/map/services/map-management.service.mjs +4 -4
- package/dist/esm2022/map/services/map-postboy.service.mjs +4 -4
- package/dist/esm2022/map/services/map-state.service.mjs +4 -4
- package/dist/esm2022/map/services/message-registrator.service.mjs +4 -4
- package/dist/esm2022/src/map/common/destructible.component.mjs +4 -4
- package/dist/esm2022/src/map/helpers/marker-style.helper.mjs +2 -2
- package/dist/esm2022/src/map/helpers/text-style.helper.mjs +1 -1
- package/dist/esm2022/src/map/map-plate/controls/map-control-zoom/map-control-zoom.component.mjs +5 -5
- package/dist/esm2022/src/map/map-plate/features/markers/markers.component.mjs +5 -5
- package/dist/esm2022/src/map/map-plate/features/polygons/polygons.component.mjs +5 -5
- package/dist/esm2022/src/map/map-plate/layers/cluster-layer/cluster-layer-factory.service.mjs +4 -4
- package/dist/esm2022/src/map/map-plate/layers/cluster-layer/cluster-layer.component.mjs +5 -5
- package/dist/esm2022/src/map/map-plate/layers/feature-layer/feature-layer.component.mjs +5 -5
- package/dist/esm2022/src/map/map-plate/layers/feature-layer/feature-layer.factory.mjs +4 -4
- package/dist/esm2022/src/map/map-plate/layers/image-layer/image-layer-factory.mjs +4 -4
- package/dist/esm2022/src/map/map-plate/layers/image-layer/image-layer.component.mjs +5 -5
- package/dist/esm2022/src/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.mjs +16 -6
- package/dist/esm2022/src/map/map-plate/layers/raster-tile/raster-tile-layer.component.mjs +5 -5
- package/dist/esm2022/src/map/map-plate/layers/raster-tile/raster-tile-layer.factory.mjs +4 -4
- package/dist/esm2022/src/map/map-plate/layers/tile-layer/tile-layer.component.mjs +5 -5
- package/dist/esm2022/src/map/map-plate/layers/tile-layer/tile-layer.factory.mjs +4 -4
- package/dist/esm2022/src/map/map-plate/map-plate.component.mjs +16 -12
- package/dist/esm2022/src/map/map-plate/map-plate.factory.service.mjs +4 -4
- package/dist/esm2022/src/map/map-plate/tooltips/tooltip/tooltip.component.mjs +10 -7
- package/dist/esm2022/src/map/messages/executors/generate-zoom-control.executor.mjs +1 -1
- package/dist/esm2022/src/map/models/map-settings.mjs +14 -1
- package/dist/esm2022/src/map/models/polygon.model.mjs +1 -1
- package/dist/esm2022/src/map/public-api.mjs +1 -2
- package/dist/esm2022/src/map/services/controls/controls.service.mjs +4 -4
- package/dist/esm2022/src/map/services/drawing/drawing.service.mjs +4 -4
- package/dist/esm2022/src/map/services/drawing/feature-modification.service.mjs +4 -4
- package/dist/esm2022/src/map/services/map-click.service.mjs +4 -4
- package/dist/esm2022/src/map/services/map-feature.service.mjs +4 -4
- package/dist/esm2022/src/map/services/map-management.service.mjs +4 -4
- package/dist/esm2022/src/map/services/map-postboy.service.mjs +4 -4
- package/dist/esm2022/src/map/services/map-state.service.mjs +4 -4
- package/dist/esm2022/src/map/services/message-registrator.service.mjs +4 -4
- package/dist/fesm2022/maps-components-src-map.mjs +475 -503
- package/dist/fesm2022/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2022/maps-components.mjs +475 -503
- package/dist/fesm2022/maps-components.mjs.map +1 -1
- package/dist/map/helpers/text-style.helper.d.ts +1 -1
- package/dist/map/map-plate/controls/map-control-zoom/map-control-zoom.component.d.ts +1 -1
- package/dist/map/map-plate/features/markers/markers.component.d.ts +1 -1
- package/dist/map/map-plate/features/polygons/polygons.component.d.ts +1 -1
- package/dist/map/map-plate/layers/cluster-layer/cluster-layer.component.d.ts +1 -1
- package/dist/map/map-plate/layers/feature-layer/feature-layer.component.d.ts +1 -1
- package/dist/map/map-plate/layers/image-layer/image-layer.component.d.ts +1 -1
- package/dist/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.d.ts +4 -2
- package/dist/map/map-plate/layers/raster-tile/raster-tile-layer.component.d.ts +1 -1
- package/dist/map/map-plate/layers/tile-layer/tile-layer.component.d.ts +1 -1
- package/dist/map/map-plate/map-plate.component.d.ts +3 -2
- package/dist/map/map-plate/tooltips/tooltip/tooltip.component.d.ts +3 -2
- package/dist/map/messages/executors/generate-zoom-control.executor.d.ts +2 -2
- package/dist/map/models/map-settings.d.ts +9 -1
- package/dist/map/public-api.d.ts +0 -1
- package/dist/map/services/map-click.service.d.ts +1 -1
- package/dist/src/map/helpers/text-style.helper.d.ts +1 -1
- package/dist/src/map/map-plate/controls/map-control-zoom/map-control-zoom.component.d.ts +1 -1
- package/dist/src/map/map-plate/features/markers/markers.component.d.ts +1 -1
- package/dist/src/map/map-plate/features/polygons/polygons.component.d.ts +1 -1
- package/dist/src/map/map-plate/layers/cluster-layer/cluster-layer.component.d.ts +1 -1
- package/dist/src/map/map-plate/layers/feature-layer/feature-layer.component.d.ts +1 -1
- package/dist/src/map/map-plate/layers/image-layer/image-layer.component.d.ts +1 -1
- package/dist/src/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.d.ts +4 -2
- package/dist/src/map/map-plate/layers/raster-tile/raster-tile-layer.component.d.ts +1 -1
- package/dist/src/map/map-plate/layers/tile-layer/tile-layer.component.d.ts +1 -1
- package/dist/src/map/map-plate/map-plate.component.d.ts +3 -2
- package/dist/src/map/map-plate/tooltips/tooltip/tooltip.component.d.ts +3 -2
- package/dist/src/map/messages/executors/generate-zoom-control.executor.d.ts +2 -2
- package/dist/src/map/models/map-settings.d.ts +9 -1
- package/dist/src/map/public-api.d.ts +0 -1
- package/dist/src/map/services/map-click.service.d.ts +1 -1
- package/package.json +24 -24
- package/dist/esm2022/map/map.module.mjs +0 -73
- package/dist/esm2022/src/map/map.module.mjs +0 -73
- package/dist/map/map.module.d.ts +0 -19
- package/dist/src/map/map.module.d.ts +0 -19
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Injectable, ChangeDetectionStrategy, Input, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
|
|
3
|
-
import * as i4 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
1
|
import { Feature, Collection } from 'ol';
|
|
6
2
|
export { Feature } from 'ol';
|
|
7
3
|
import { Point, LineString } from 'ol/geom';
|
|
@@ -10,6 +6,8 @@ import { GeoJSON, WKT } from 'ol/format';
|
|
|
10
6
|
import { getCenter, createEmpty, extend } from 'ol/extent';
|
|
11
7
|
import Polygon, { circular, fromExtent } from 'ol/geom/Polygon';
|
|
12
8
|
import { Control, Zoom } from 'ol/control';
|
|
9
|
+
import * as i0 from '@angular/core';
|
|
10
|
+
import { Component, Injectable, ChangeDetectionStrategy, Input, input, ViewEncapsulation, ViewChild } from '@angular/core';
|
|
13
11
|
import { get, useGeographic, transform } from 'ol/proj';
|
|
14
12
|
import { PostboyGenericMessage, PostboyCallbackMessage, PostboyExecutor, PostboyService, PostboyAbstractRegistrator } from '@artstesh/postboy';
|
|
15
13
|
import * as Sphere from 'ol/sphere';
|
|
@@ -28,32 +26,17 @@ import Cluster from 'ol/source/Cluster';
|
|
|
28
26
|
import Static from 'ol/source/ImageStatic';
|
|
29
27
|
import ImageLayer from 'ol/layer/Image';
|
|
30
28
|
import RasterSource from 'ol/source/Raster';
|
|
29
|
+
import { NgIf, NgTemplateOutlet } from '@angular/common';
|
|
31
30
|
import Map from 'ol/Map';
|
|
32
31
|
import View from 'ol/View';
|
|
33
|
-
import Overlay from 'ol/Overlay';
|
|
34
32
|
import Style from 'ol/style/Style';
|
|
35
33
|
import { Icon, Circle as Circle$1, Fill, Stroke, Text } from 'ol/style';
|
|
36
34
|
export { Fill, RegularShape, Stroke, Style, Text } from 'ol/style';
|
|
37
35
|
import { METERS_PER_UNIT } from 'ol/proj/epsg4326';
|
|
36
|
+
import Overlay from 'ol/Overlay';
|
|
38
37
|
import * as Circle from 'ol/style/Circle';
|
|
39
38
|
export { Circle as CircleStyle };
|
|
40
39
|
|
|
41
|
-
class DestructibleComponent {
|
|
42
|
-
subs = [];
|
|
43
|
-
onDestroy;
|
|
44
|
-
ngOnDestroy() {
|
|
45
|
-
this.subs.forEach((s) => s.unsubscribe());
|
|
46
|
-
if (this.onDestroy)
|
|
47
|
-
this.onDestroy();
|
|
48
|
-
}
|
|
49
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: DestructibleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
50
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: DestructibleComponent, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
51
|
-
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: DestructibleComponent, decorators: [{
|
|
53
|
-
type: Component,
|
|
54
|
-
args: [{ template: '' }]
|
|
55
|
-
}] });
|
|
56
|
-
|
|
57
40
|
var MapLyrs;
|
|
58
41
|
(function (MapLyrs) {
|
|
59
42
|
MapLyrs[MapLyrs["Hybrid"] = 1] = "Hybrid";
|
|
@@ -84,6 +67,7 @@ class MapSettings {
|
|
|
84
67
|
zoom = 4;
|
|
85
68
|
lyrs = MapLyrs.Hybrid;
|
|
86
69
|
language = 'en';
|
|
70
|
+
osmOpacity = 1;
|
|
87
71
|
interactionSettings = {};
|
|
88
72
|
static copy(model) {
|
|
89
73
|
const result = new MapSettings();
|
|
@@ -94,6 +78,7 @@ class MapSettings {
|
|
|
94
78
|
result.lyrs = model.lyrs;
|
|
95
79
|
result.interactionSettings = model.interactionSettings;
|
|
96
80
|
result.language = model.language;
|
|
81
|
+
result.osmOpacity = model.osmOpacity;
|
|
97
82
|
return result;
|
|
98
83
|
}
|
|
99
84
|
/**
|
|
@@ -160,6 +145,15 @@ class MapSettings {
|
|
|
160
145
|
setLanguage(language) {
|
|
161
146
|
return MapSettings.copy({ ...this, language });
|
|
162
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Sets the opacity level for the OpenStreetMap layer.
|
|
150
|
+
*
|
|
151
|
+
* @param {number} osmOpacity - The opacity value for the OpenStreetMap layer, where 0 is fully transparent and 1 is fully opaque.
|
|
152
|
+
* @return {MapSettings} A new MapSettings instance with the updated OpenStreetMap opacity.
|
|
153
|
+
*/
|
|
154
|
+
setOsmOpacity(osmOpacity) {
|
|
155
|
+
return MapSettings.copy({ ...this, osmOpacity });
|
|
156
|
+
}
|
|
163
157
|
/**
|
|
164
158
|
* Compares the current MapSettings instance with another to determine if they are identical.
|
|
165
159
|
*
|
|
@@ -179,6 +173,8 @@ class MapSettings {
|
|
|
179
173
|
return false;
|
|
180
174
|
if (this.interactionSettings !== model.interactionSettings)
|
|
181
175
|
return false;
|
|
176
|
+
if (this.osmOpacity !== model.osmOpacity)
|
|
177
|
+
return false;
|
|
182
178
|
return this.center.length === model.center.length && !this.center.filter((c, i) => c !== model.center[i]).length;
|
|
183
179
|
}
|
|
184
180
|
}
|
|
@@ -313,6 +309,22 @@ class MapControl extends Control {
|
|
|
313
309
|
}
|
|
314
310
|
}
|
|
315
311
|
|
|
312
|
+
class DestructibleComponent {
|
|
313
|
+
subs = [];
|
|
314
|
+
onDestroy;
|
|
315
|
+
ngOnDestroy() {
|
|
316
|
+
this.subs.forEach((s) => s.unsubscribe());
|
|
317
|
+
if (this.onDestroy)
|
|
318
|
+
this.onDestroy();
|
|
319
|
+
}
|
|
320
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DestructibleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
321
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: DestructibleComponent, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
322
|
+
}
|
|
323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DestructibleComponent, decorators: [{
|
|
324
|
+
type: Component,
|
|
325
|
+
args: [{ template: '' }]
|
|
326
|
+
}] });
|
|
327
|
+
|
|
316
328
|
/**
|
|
317
329
|
* Represents a command to add a custom control to a map.
|
|
318
330
|
*/
|
|
@@ -989,10 +1001,10 @@ class MapPostboyService extends PostboyService {
|
|
|
989
1001
|
constructor() {
|
|
990
1002
|
super();
|
|
991
1003
|
}
|
|
992
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
993
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1004
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapPostboyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1005
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapPostboyService });
|
|
994
1006
|
}
|
|
995
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapPostboyService, decorators: [{
|
|
996
1008
|
type: Injectable
|
|
997
1009
|
}], ctorParameters: () => [] });
|
|
998
1010
|
|
|
@@ -1114,10 +1126,10 @@ class MapManagementService {
|
|
|
1114
1126
|
action(l, source);
|
|
1115
1127
|
});
|
|
1116
1128
|
}
|
|
1117
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1118
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1129
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapManagementService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1130
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapManagementService });
|
|
1119
1131
|
}
|
|
1120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapManagementService, decorators: [{
|
|
1121
1133
|
type: Injectable
|
|
1122
1134
|
}], ctorParameters: () => [{ type: MapPostboyService }] });
|
|
1123
1135
|
|
|
@@ -1157,10 +1169,10 @@ class MapStateService {
|
|
|
1157
1169
|
this.map?.getView().setZoom(c.zoom);
|
|
1158
1170
|
});
|
|
1159
1171
|
}
|
|
1160
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1161
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1172
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapStateService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1173
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapStateService });
|
|
1162
1174
|
}
|
|
1163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapStateService, decorators: [{
|
|
1164
1176
|
type: Injectable
|
|
1165
1177
|
}], ctorParameters: () => [{ type: MapPostboyService }] });
|
|
1166
1178
|
|
|
@@ -1223,10 +1235,10 @@ class MapFeatureService {
|
|
|
1223
1235
|
this.map.getView().fit(extent);
|
|
1224
1236
|
this.map.getView().setZoom(this.map.getView().getZoom() + zoomAfter);
|
|
1225
1237
|
}
|
|
1226
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1227
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1238
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapFeatureService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1239
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapFeatureService });
|
|
1228
1240
|
}
|
|
1229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapFeatureService, decorators: [{
|
|
1230
1242
|
type: Injectable
|
|
1231
1243
|
}], ctorParameters: () => [{ type: MapPostboyService }] });
|
|
1232
1244
|
|
|
@@ -1272,10 +1284,10 @@ class MapClickService {
|
|
|
1272
1284
|
});
|
|
1273
1285
|
return result;
|
|
1274
1286
|
}
|
|
1275
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1276
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1287
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapClickService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1288
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapClickService });
|
|
1277
1289
|
}
|
|
1278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapClickService, decorators: [{
|
|
1279
1291
|
type: Injectable
|
|
1280
1292
|
}], ctorParameters: () => [{ type: MapPostboyService }] });
|
|
1281
1293
|
|
|
@@ -1354,10 +1366,10 @@ class DrawingService {
|
|
|
1354
1366
|
this.postboy.unlock(MapClickEvent);
|
|
1355
1367
|
setTimeout(() => this.postboy.fire(new DrawingFinishedEvent()), 300);
|
|
1356
1368
|
}
|
|
1357
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1358
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1369
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawingService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1370
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawingService });
|
|
1359
1371
|
}
|
|
1360
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DrawingService, decorators: [{
|
|
1361
1373
|
type: Injectable
|
|
1362
1374
|
}], ctorParameters: () => [{ type: MapPostboyService }] });
|
|
1363
1375
|
|
|
@@ -1446,10 +1458,10 @@ class FeatureModificationService {
|
|
|
1446
1458
|
if (this.translate)
|
|
1447
1459
|
this.map?.removeInteraction(this.translate);
|
|
1448
1460
|
}
|
|
1449
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1450
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1461
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FeatureModificationService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1462
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FeatureModificationService });
|
|
1451
1463
|
}
|
|
1452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FeatureModificationService, decorators: [{
|
|
1453
1465
|
type: Injectable
|
|
1454
1466
|
}], ctorParameters: () => [{ type: MapPostboyService }] });
|
|
1455
1467
|
|
|
@@ -1478,10 +1490,10 @@ class ControlsService {
|
|
|
1478
1490
|
observeRemoving() {
|
|
1479
1491
|
this.postboy.sub(RemoveControlCommand).subscribe((c) => this.map?.removeControl(c.item));
|
|
1480
1492
|
}
|
|
1481
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1482
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1493
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ControlsService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1494
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ControlsService });
|
|
1483
1495
|
}
|
|
1484
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ControlsService, decorators: [{
|
|
1485
1497
|
type: Injectable
|
|
1486
1498
|
}], ctorParameters: () => [{ type: MapPostboyService }] });
|
|
1487
1499
|
|
|
@@ -1534,10 +1546,10 @@ class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
|
1534
1546
|
this.recordExecutor(GetMapPositionExecutor, () => this.state.getMapPosition());
|
|
1535
1547
|
this.recordExecutor(GetGeometryLengthExecutor, (e) => new GetGeometryLengthExecutorHandler().handle(e));
|
|
1536
1548
|
}
|
|
1537
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1538
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1549
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageRegistratorService, deps: [{ token: MapPostboyService }, { token: MapManagementService }, { token: MapStateService }, { token: MapFeatureService }, { token: MapClickService }, { token: DrawingService }, { token: FeatureModificationService }, { token: ControlsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1550
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageRegistratorService });
|
|
1539
1551
|
}
|
|
1540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageRegistratorService, decorators: [{
|
|
1541
1553
|
type: Injectable
|
|
1542
1554
|
}], ctorParameters: () => [{ type: MapPostboyService }, { type: MapManagementService }, { type: MapStateService }, { type: MapFeatureService }, { type: MapClickService }, { type: DrawingService }, { type: FeatureModificationService }, { type: ControlsService }] });
|
|
1543
1555
|
|
|
@@ -1733,10 +1745,10 @@ class TileLayerFactory {
|
|
|
1733
1745
|
x = ((x % tileRange) + tileRange) % tileRange;
|
|
1734
1746
|
return { x: x, y: y };
|
|
1735
1747
|
}
|
|
1736
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1737
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1748
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TileLayerFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1749
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TileLayerFactory, providedIn: 'root' });
|
|
1738
1750
|
}
|
|
1739
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1751
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TileLayerFactory, decorators: [{
|
|
1740
1752
|
type: Injectable,
|
|
1741
1753
|
args: [{
|
|
1742
1754
|
providedIn: 'root',
|
|
@@ -1775,12 +1787,12 @@ class TileLayerComponent extends DestructibleComponent {
|
|
|
1775
1787
|
if (this.layer)
|
|
1776
1788
|
this.postboy.fire(new RemoveTileCommand(this.layer));
|
|
1777
1789
|
}
|
|
1778
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1779
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1790
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TileLayerComponent, deps: [{ token: MapPostboyService }, { token: TileLayerFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
1791
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: TileLayerComponent, isStandalone: true, selector: "art-tile-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1780
1792
|
}
|
|
1781
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1793
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TileLayerComponent, decorators: [{
|
|
1782
1794
|
type: Component,
|
|
1783
|
-
args: [{ selector: 'art-tile-layer', template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1795
|
+
args: [{ selector: 'art-tile-layer', standalone: true, template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1784
1796
|
}], ctorParameters: () => [{ type: MapPostboyService }, { type: TileLayerFactory }], propDecorators: { settings: [{
|
|
1785
1797
|
type: Input
|
|
1786
1798
|
}] } });
|
|
@@ -1791,13 +1803,20 @@ class OsmTileLayerComponent extends DestructibleComponent {
|
|
|
1791
1803
|
super();
|
|
1792
1804
|
}
|
|
1793
1805
|
_url = '';
|
|
1806
|
+
_map;
|
|
1807
|
+
_opacity = 1;
|
|
1794
1808
|
set url(value) {
|
|
1795
1809
|
if (!value || this._url === value)
|
|
1796
1810
|
return;
|
|
1797
1811
|
this._url = value;
|
|
1798
1812
|
this.initLayer();
|
|
1799
1813
|
}
|
|
1800
|
-
|
|
1814
|
+
set opacity(value) {
|
|
1815
|
+
if (!value || this._opacity === value)
|
|
1816
|
+
return;
|
|
1817
|
+
this._opacity = value;
|
|
1818
|
+
this.initLayer();
|
|
1819
|
+
}
|
|
1801
1820
|
set map(value) {
|
|
1802
1821
|
if (!value || this._map === value)
|
|
1803
1822
|
return;
|
|
@@ -1821,18 +1840,21 @@ class OsmTileLayerComponent extends DestructibleComponent {
|
|
|
1821
1840
|
source: new OSM({
|
|
1822
1841
|
url: this._url,
|
|
1823
1842
|
}),
|
|
1843
|
+
opacity: this._opacity,
|
|
1824
1844
|
});
|
|
1825
1845
|
this.layer.set('name', 'osm-tile-layer');
|
|
1826
1846
|
this._map.addLayer(this.layer);
|
|
1827
1847
|
}
|
|
1828
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1829
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1848
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OsmTileLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1849
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: OsmTileLayerComponent, isStandalone: true, selector: "art-osm-tile-layer", inputs: { url: "url", opacity: "opacity", map: "map" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1830
1850
|
}
|
|
1831
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1851
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OsmTileLayerComponent, decorators: [{
|
|
1832
1852
|
type: Component,
|
|
1833
|
-
args: [{ selector: 'art-osm-tile-layer', template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1853
|
+
args: [{ selector: 'art-osm-tile-layer', standalone: true, template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1834
1854
|
}], ctorParameters: () => [], propDecorators: { url: [{
|
|
1835
1855
|
type: Input
|
|
1856
|
+
}], opacity: [{
|
|
1857
|
+
type: Input
|
|
1836
1858
|
}], map: [{
|
|
1837
1859
|
type: Input
|
|
1838
1860
|
}] } });
|
|
@@ -1989,10 +2011,10 @@ class FeatureLayerFactory {
|
|
|
1989
2011
|
layer.set('name', settings.name);
|
|
1990
2012
|
return layer;
|
|
1991
2013
|
}
|
|
1992
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1993
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2014
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FeatureLayerFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2015
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FeatureLayerFactory, providedIn: 'root' });
|
|
1994
2016
|
}
|
|
1995
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2017
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FeatureLayerFactory, decorators: [{
|
|
1996
2018
|
type: Injectable,
|
|
1997
2019
|
args: [{
|
|
1998
2020
|
providedIn: 'root',
|
|
@@ -2031,12 +2053,12 @@ class FeatureLayerComponent extends DestructibleComponent {
|
|
|
2031
2053
|
if (this.layer)
|
|
2032
2054
|
this.postboy.fire(new RemoveLayerCommand(this.layer));
|
|
2033
2055
|
}
|
|
2034
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2035
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2056
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FeatureLayerComponent, deps: [{ token: MapPostboyService }, { token: FeatureLayerFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
2057
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FeatureLayerComponent, isStandalone: true, selector: "art-feature-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2036
2058
|
}
|
|
2037
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2059
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FeatureLayerComponent, decorators: [{
|
|
2038
2060
|
type: Component,
|
|
2039
|
-
args: [{ selector: 'art-feature-layer', template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2061
|
+
args: [{ selector: 'art-feature-layer', standalone: true, template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2040
2062
|
}], ctorParameters: () => [{ type: MapPostboyService }, { type: FeatureLayerFactory }], propDecorators: { settings: [{
|
|
2041
2063
|
type: Input
|
|
2042
2064
|
}] } });
|
|
@@ -2258,10 +2280,10 @@ class ClusterLayerFactory {
|
|
|
2258
2280
|
return settings.style(features.map((f) => ({ id: f.getId(), ...f.get(MapConstants.FeatureInfo) })));
|
|
2259
2281
|
};
|
|
2260
2282
|
}
|
|
2261
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2262
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2283
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ClusterLayerFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2284
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ClusterLayerFactory, providedIn: 'root' });
|
|
2263
2285
|
}
|
|
2264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ClusterLayerFactory, decorators: [{
|
|
2265
2287
|
type: Injectable,
|
|
2266
2288
|
args: [{
|
|
2267
2289
|
providedIn: 'root',
|
|
@@ -2308,12 +2330,12 @@ class ClusterLayerComponent extends DestructibleComponent {
|
|
|
2308
2330
|
if (this.manager?.layer)
|
|
2309
2331
|
this.postboy.fire(new RemoveLayerCommand(this.manager.layer));
|
|
2310
2332
|
}
|
|
2311
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2312
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2333
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ClusterLayerComponent, deps: [{ token: MapPostboyService }, { token: ClusterLayerFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
2334
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ClusterLayerComponent, isStandalone: true, selector: "art-cluster-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2313
2335
|
}
|
|
2314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ClusterLayerComponent, decorators: [{
|
|
2315
2337
|
type: Component,
|
|
2316
|
-
args: [{ selector: 'art-cluster-layer', template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2338
|
+
args: [{ selector: 'art-cluster-layer', standalone: true, template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2317
2339
|
}], ctorParameters: () => [{ type: MapPostboyService }, { type: ClusterLayerFactory }], propDecorators: { settings: [{
|
|
2318
2340
|
type: Input
|
|
2319
2341
|
}] } });
|
|
@@ -2463,10 +2485,10 @@ class ImageLayerFactory {
|
|
|
2463
2485
|
});
|
|
2464
2486
|
return new ImageLayer({ source });
|
|
2465
2487
|
}
|
|
2466
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2467
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2488
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ImageLayerFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2489
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ImageLayerFactory, providedIn: 'root' });
|
|
2468
2490
|
}
|
|
2469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ImageLayerFactory, decorators: [{
|
|
2470
2492
|
type: Injectable,
|
|
2471
2493
|
args: [{
|
|
2472
2494
|
providedIn: 'root',
|
|
@@ -2505,12 +2527,12 @@ class ImageLayerComponent extends DestructibleComponent {
|
|
|
2505
2527
|
if (this.layer)
|
|
2506
2528
|
this.postboy.fire(new RemoveImageLayerCommand(this.layer));
|
|
2507
2529
|
}
|
|
2508
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2509
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2530
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ImageLayerComponent, deps: [{ token: MapPostboyService }, { token: ImageLayerFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
2531
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ImageLayerComponent, isStandalone: true, selector: "art-image-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2510
2532
|
}
|
|
2511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ImageLayerComponent, decorators: [{
|
|
2512
2534
|
type: Component,
|
|
2513
|
-
args: [{ selector: 'art-image-layer', template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2535
|
+
args: [{ selector: 'art-image-layer', standalone: true, template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2514
2536
|
}], ctorParameters: () => [{ type: MapPostboyService }, { type: ImageLayerFactory }], propDecorators: { settings: [{
|
|
2515
2537
|
type: Input
|
|
2516
2538
|
}] } });
|
|
@@ -2738,10 +2760,10 @@ class RasterTileLayerFactory {
|
|
|
2738
2760
|
x = ((x % tileRange) + tileRange) % tileRange;
|
|
2739
2761
|
return { x: x, y: y };
|
|
2740
2762
|
}
|
|
2741
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2742
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2763
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RasterTileLayerFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2764
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RasterTileLayerFactory, providedIn: 'root' });
|
|
2743
2765
|
}
|
|
2744
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2766
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RasterTileLayerFactory, decorators: [{
|
|
2745
2767
|
type: Injectable,
|
|
2746
2768
|
args: [{
|
|
2747
2769
|
providedIn: 'root',
|
|
@@ -2780,12 +2802,12 @@ class RasterTileLayerComponent extends DestructibleComponent {
|
|
|
2780
2802
|
if (this.layer)
|
|
2781
2803
|
this.postboy.fire(new RemoveRasterTileCommand(this.layer));
|
|
2782
2804
|
}
|
|
2783
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2784
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2805
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RasterTileLayerComponent, deps: [{ token: MapPostboyService }, { token: RasterTileLayerFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
2806
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: RasterTileLayerComponent, isStandalone: true, selector: "art-raster-tile-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2785
2807
|
}
|
|
2786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2808
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RasterTileLayerComponent, decorators: [{
|
|
2787
2809
|
type: Component,
|
|
2788
|
-
args: [{ selector: 'art-raster-tile-layer', template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2810
|
+
args: [{ selector: 'art-raster-tile-layer', standalone: true, template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2789
2811
|
}], ctorParameters: () => [{ type: MapPostboyService }, { type: RasterTileLayerFactory }], propDecorators: { settings: [{
|
|
2790
2812
|
type: Input
|
|
2791
2813
|
}] } });
|
|
@@ -2804,10 +2826,10 @@ class MapPlateFactory {
|
|
|
2804
2826
|
interactions: defaults(settings.interactionSettings),
|
|
2805
2827
|
});
|
|
2806
2828
|
}
|
|
2807
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2808
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2829
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapPlateFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2830
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapPlateFactory, providedIn: 'root' });
|
|
2809
2831
|
}
|
|
2810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2832
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapPlateFactory, decorators: [{
|
|
2811
2833
|
type: Injectable,
|
|
2812
2834
|
args: [{
|
|
2813
2835
|
providedIn: 'root',
|
|
@@ -2820,6 +2842,7 @@ class MapPlateComponent extends DestructibleComponent {
|
|
|
2820
2842
|
mapFactory;
|
|
2821
2843
|
registrator;
|
|
2822
2844
|
detector;
|
|
2845
|
+
contentRef = input.required();
|
|
2823
2846
|
renderTryCount = 0;
|
|
2824
2847
|
map;
|
|
2825
2848
|
osmUrl = '';
|
|
@@ -2878,8 +2901,8 @@ class MapPlateComponent extends DestructibleComponent {
|
|
|
2878
2901
|
this.detector.detectChanges();
|
|
2879
2902
|
this.map.updateSize();
|
|
2880
2903
|
}
|
|
2881
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2882
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2904
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapPlateComponent, deps: [{ token: i0.ElementRef }, { token: MapPostboyService }, { token: MapPlateFactory }, { token: MessageRegistratorService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2905
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: MapPlateComponent, isStandalone: true, selector: "art-map-plate", inputs: { contentRef: { classPropertyName: "contentRef", publicName: "contentRef", isSignal: true, isRequired: true, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: false, isRequired: false, transformFunction: null } }, providers: [
|
|
2883
2906
|
MessageRegistratorService,
|
|
2884
2907
|
MapStateService,
|
|
2885
2908
|
MapManagementService,
|
|
@@ -2890,11 +2913,11 @@ class MapPlateComponent extends DestructibleComponent {
|
|
|
2890
2913
|
FeatureService,
|
|
2891
2914
|
FeatureModificationService,
|
|
2892
2915
|
ControlsService,
|
|
2893
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-
|
|
2916
|
+
], usesInheritance: true, ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"contentRef()\"> </ng-container>\r\n<art-osm-tile-layer *ngIf=\"osmUrl && map\" [map]=\"map\" [url]=\"osmUrl\" [opacity]=\"_settings.osmOpacity\"></art-osm-tile-layer>\r\n<art-feature-layer *ngIf=\"map\" [settings]=\"drawingLayerSettings\"></art-feature-layer>\r\n", styles: ["art-map-plate{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: OsmTileLayerComponent, selector: "art-osm-tile-layer", inputs: ["url", "opacity", "map"] }, { kind: "component", type: FeatureLayerComponent, selector: "art-feature-layer", inputs: ["settings"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2894
2917
|
}
|
|
2895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2918
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapPlateComponent, decorators: [{
|
|
2896
2919
|
type: Component,
|
|
2897
|
-
args: [{ selector: 'art-map-plate', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2920
|
+
args: [{ selector: 'art-map-plate', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2898
2921
|
MessageRegistratorService,
|
|
2899
2922
|
MapStateService,
|
|
2900
2923
|
MapManagementService,
|
|
@@ -2905,7 +2928,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImpor
|
|
|
2905
2928
|
FeatureService,
|
|
2906
2929
|
FeatureModificationService,
|
|
2907
2930
|
ControlsService,
|
|
2908
|
-
], encapsulation: ViewEncapsulation.None,
|
|
2931
|
+
], encapsulation: ViewEncapsulation.None, imports: [
|
|
2932
|
+
OsmTileLayerComponent,
|
|
2933
|
+
FeatureLayerComponent,
|
|
2934
|
+
NgIf,
|
|
2935
|
+
NgTemplateOutlet
|
|
2936
|
+
], template: "<ng-container *ngTemplateOutlet=\"contentRef()\"> </ng-container>\r\n<art-osm-tile-layer *ngIf=\"osmUrl && map\" [map]=\"map\" [url]=\"osmUrl\" [opacity]=\"_settings.osmOpacity\"></art-osm-tile-layer>\r\n<art-feature-layer *ngIf=\"map\" [settings]=\"drawingLayerSettings\"></art-feature-layer>\r\n", styles: ["art-map-plate{display:block;width:100%;height:100%}\n"] }]
|
|
2909
2937
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: MapPostboyService }, { type: MapPlateFactory }, { type: MessageRegistratorService }, { type: i0.ChangeDetectorRef }], propDecorators: { settings: [{
|
|
2910
2938
|
type: Input
|
|
2911
2939
|
}] } });
|
|
@@ -2943,120 +2971,18 @@ class MarkersComponent extends DestructibleComponent {
|
|
|
2943
2971
|
return;
|
|
2944
2972
|
this.postboy.fire(new PlaceLayerFeaturesCommand(this.layerName, this._markers.map((m) => m.feature)));
|
|
2945
2973
|
}
|
|
2946
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2947
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2974
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MarkersComponent, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2975
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: MarkersComponent, isStandalone: true, selector: "art-markers", inputs: { layerName: "layerName", markers: "markers" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2948
2976
|
}
|
|
2949
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2977
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MarkersComponent, decorators: [{
|
|
2950
2978
|
type: Component,
|
|
2951
|
-
args: [{ selector: 'art-markers', template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2979
|
+
args: [{ selector: 'art-markers', standalone: true, template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2952
2980
|
}], ctorParameters: () => [{ type: MapPostboyService }], propDecorators: { layerName: [{
|
|
2953
2981
|
type: Input
|
|
2954
2982
|
}], markers: [{
|
|
2955
2983
|
type: Input
|
|
2956
2984
|
}] } });
|
|
2957
2985
|
|
|
2958
|
-
class TooltipSettings {
|
|
2959
|
-
id;
|
|
2960
|
-
containerClass = 'custom-tooltip-class';
|
|
2961
|
-
constructor(id) {
|
|
2962
|
-
this.id = id ?? IdGenerator.get();
|
|
2963
|
-
}
|
|
2964
|
-
static copy(model) {
|
|
2965
|
-
const result = new TooltipSettings(model.id);
|
|
2966
|
-
result.show = model.show;
|
|
2967
|
-
result.containerClass = model.containerClass;
|
|
2968
|
-
return result;
|
|
2969
|
-
}
|
|
2970
|
-
show = (e) => true;
|
|
2971
|
-
setShow(show) {
|
|
2972
|
-
return TooltipSettings.copy({ ...this, show });
|
|
2973
|
-
}
|
|
2974
|
-
setClass(containerClass) {
|
|
2975
|
-
return TooltipSettings.copy({ ...this, containerClass });
|
|
2976
|
-
}
|
|
2977
|
-
isSame(model) {
|
|
2978
|
-
if (this.show !== model.show)
|
|
2979
|
-
return false;
|
|
2980
|
-
if (this.containerClass !== model.containerClass)
|
|
2981
|
-
return false;
|
|
2982
|
-
if (this.id !== model.id)
|
|
2983
|
-
return false;
|
|
2984
|
-
return true;
|
|
2985
|
-
}
|
|
2986
|
-
}
|
|
2987
|
-
|
|
2988
|
-
class TooltipComponent extends DestructibleComponent {
|
|
2989
|
-
postboy;
|
|
2990
|
-
detector;
|
|
2991
|
-
container;
|
|
2992
|
-
overlay;
|
|
2993
|
-
show = false;
|
|
2994
|
-
map;
|
|
2995
|
-
constructor(postboy, detector) {
|
|
2996
|
-
super();
|
|
2997
|
-
this.postboy = postboy;
|
|
2998
|
-
this.detector = detector;
|
|
2999
|
-
}
|
|
3000
|
-
_settings = new TooltipSettings();
|
|
3001
|
-
set settings(value) {
|
|
3002
|
-
if (!value || this._settings.isSame(value))
|
|
3003
|
-
return;
|
|
3004
|
-
this._settings = value;
|
|
3005
|
-
this.detector.detectChanges();
|
|
3006
|
-
}
|
|
3007
|
-
ngOnInit() {
|
|
3008
|
-
this.subs.push(this.observeMapRender());
|
|
3009
|
-
this.subs.push(this.observeMapClick());
|
|
3010
|
-
this.subs.push(this.observeClose());
|
|
3011
|
-
}
|
|
3012
|
-
addOverlay(coordinates) {
|
|
3013
|
-
this.removeOverlay();
|
|
3014
|
-
this.overlay = new Overlay(this.options(coordinates));
|
|
3015
|
-
this.map?.addOverlay(this.overlay);
|
|
3016
|
-
this.show = true;
|
|
3017
|
-
this.detector.detectChanges();
|
|
3018
|
-
}
|
|
3019
|
-
options = (coordinates) => {
|
|
3020
|
-
return {
|
|
3021
|
-
element: this.container?.nativeElement,
|
|
3022
|
-
autoPan: false,
|
|
3023
|
-
autoPanAnimation: { duration: 0 },
|
|
3024
|
-
position: coordinates,
|
|
3025
|
-
};
|
|
3026
|
-
};
|
|
3027
|
-
observeMapClick() {
|
|
3028
|
-
return this.postboy.sub(MapClickEvent).subscribe((ev) => {
|
|
3029
|
-
this._settings.show(ev) ? this.addOverlay(ev.coordinates) : this.removeOverlay();
|
|
3030
|
-
});
|
|
3031
|
-
}
|
|
3032
|
-
observeClose() {
|
|
3033
|
-
return this.postboy
|
|
3034
|
-
.sub(CloseTooltipCommand)
|
|
3035
|
-
.pipe(filter((ev) => ev.tooltipId === this._settings.id))
|
|
3036
|
-
.subscribe(() => this.removeOverlay());
|
|
3037
|
-
}
|
|
3038
|
-
observeMapRender() {
|
|
3039
|
-
return this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
3040
|
-
this.map = m.map;
|
|
3041
|
-
});
|
|
3042
|
-
}
|
|
3043
|
-
removeOverlay = () => {
|
|
3044
|
-
!!this.overlay && this.map?.removeOverlay(this.overlay);
|
|
3045
|
-
this.show = false;
|
|
3046
|
-
};
|
|
3047
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TooltipComponent, deps: [{ token: MapPostboyService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3048
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.7", type: TooltipComponent, selector: "art-tooltip", inputs: { settings: "settings" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["tip"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div #tip [class]=\"['tooltip-wrapper', _settings.containerClass]\" [hidden]=\"!show\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".tooltip-wrapper{position:absolute}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3049
|
-
}
|
|
3050
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
3051
|
-
type: Component,
|
|
3052
|
-
args: [{ selector: 'art-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #tip [class]=\"['tooltip-wrapper', _settings.containerClass]\" [hidden]=\"!show\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".tooltip-wrapper{position:absolute}\n"] }]
|
|
3053
|
-
}], ctorParameters: () => [{ type: MapPostboyService }, { type: i0.ChangeDetectorRef }], propDecorators: { container: [{
|
|
3054
|
-
type: ViewChild,
|
|
3055
|
-
args: ['tip']
|
|
3056
|
-
}], settings: [{
|
|
3057
|
-
type: Input
|
|
3058
|
-
}] } });
|
|
3059
|
-
|
|
3060
2986
|
/**
|
|
3061
2987
|
* Component for rendering polygons on a map.
|
|
3062
2988
|
* It listens for changes in the `polygons` input property and
|
|
@@ -3093,12 +3019,12 @@ class PolygonsComponent extends DestructibleComponent {
|
|
|
3093
3019
|
return m.feature;
|
|
3094
3020
|
})));
|
|
3095
3021
|
}
|
|
3096
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3097
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3022
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PolygonsComponent, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3023
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: PolygonsComponent, isStandalone: true, selector: "art-polygons", inputs: { layerName: "layerName", polygons: "polygons" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3098
3024
|
}
|
|
3099
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3025
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PolygonsComponent, decorators: [{
|
|
3100
3026
|
type: Component,
|
|
3101
|
-
args: [{ selector: 'art-polygons', template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
3027
|
+
args: [{ selector: 'art-polygons', standalone: true, template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
3102
3028
|
}], ctorParameters: () => [{ type: MapPostboyService }], propDecorators: { layerName: [{
|
|
3103
3029
|
type: Input
|
|
3104
3030
|
}], polygons: [{
|
|
@@ -3106,75 +3032,267 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImpor
|
|
|
3106
3032
|
}] } });
|
|
3107
3033
|
|
|
3108
3034
|
/**
|
|
3109
|
-
*
|
|
3035
|
+
* Helper class to create and modify marker styles.
|
|
3110
3036
|
*/
|
|
3111
|
-
class
|
|
3112
|
-
/**
|
|
3113
|
-
* The CSS class name of the control element.
|
|
3114
|
-
*
|
|
3115
|
-
* @type {string}
|
|
3116
|
-
*/
|
|
3117
|
-
controlClass = 'ol-zoom';
|
|
3118
|
-
/**
|
|
3119
|
-
* The CSS class name for zoom in button.
|
|
3120
|
-
* @type {string}
|
|
3121
|
-
*/
|
|
3122
|
-
zoomInClass = 'ol-zoom-in';
|
|
3123
|
-
/**
|
|
3124
|
-
* The CSS class name for the zoom out button element.
|
|
3125
|
-
*
|
|
3126
|
-
* @type {string}
|
|
3127
|
-
*/
|
|
3128
|
-
zoomOutClass = 'ol-zoom-out';
|
|
3037
|
+
class MarkerStyleHelper {
|
|
3129
3038
|
/**
|
|
3130
|
-
*
|
|
3131
|
-
*
|
|
3132
|
-
* @
|
|
3039
|
+
* Creates a new Style object from an SVG.
|
|
3040
|
+
* @param {string} svg - The SVG string.
|
|
3041
|
+
* @param {Array<number>} [size=[30, 30]] - The size of the icon image.
|
|
3042
|
+
* @param {number} [zIndex=400] - The zIndex of the style.
|
|
3043
|
+
* @returns {Style} A new Style object.
|
|
3133
3044
|
*/
|
|
3134
|
-
|
|
3045
|
+
static fromSvg(svg, size = [30, 30], zIndex = 400) {
|
|
3046
|
+
let image = new Image();
|
|
3047
|
+
image.src = 'data:image/svg+xml,' + escape(svg);
|
|
3048
|
+
return new Style({
|
|
3049
|
+
image: new Icon({
|
|
3050
|
+
img: image,
|
|
3051
|
+
size: size,
|
|
3052
|
+
}),
|
|
3053
|
+
zIndex,
|
|
3054
|
+
});
|
|
3055
|
+
}
|
|
3135
3056
|
/**
|
|
3136
|
-
*
|
|
3057
|
+
* Returns a Style object with a circle style.
|
|
3137
3058
|
*
|
|
3138
|
-
* @
|
|
3059
|
+
* @param {number} radius - The radius of the circle.
|
|
3060
|
+
* @param {string} fill - The fill color of the circle. Format: '#RRGGBB' or 'rgba(R, G, B, A)'.
|
|
3061
|
+
* @param {string} strokeColor - The stroke color of the circle. Format: '#RRGGBB' or 'rgba(R, G, B, A)'.
|
|
3062
|
+
* @param {number} [strokeWidth=1] - The width of the stroke. Default is 1.
|
|
3063
|
+
* @returns {Style} - A Style object with a Circle image.
|
|
3139
3064
|
*/
|
|
3140
|
-
|
|
3065
|
+
static circle(radius, fill, strokeColor, strokeWidth = 1) {
|
|
3066
|
+
return new Style({
|
|
3067
|
+
image: new Circle$1({
|
|
3068
|
+
radius,
|
|
3069
|
+
fill: new Fill({ color: fill }),
|
|
3070
|
+
stroke: new Stroke({ color: strokeColor, width: strokeWidth }),
|
|
3071
|
+
}),
|
|
3072
|
+
});
|
|
3073
|
+
}
|
|
3141
3074
|
/**
|
|
3142
|
-
*
|
|
3075
|
+
* Applies the given Text to the provided Style.
|
|
3143
3076
|
*
|
|
3144
|
-
* @param {
|
|
3145
|
-
* @
|
|
3077
|
+
* @param {Style} style - The Style to modify.
|
|
3078
|
+
* @param {Text} text - The Text to apply to the Style.
|
|
3079
|
+
* @return {Style} - The modified Style with the applied Text.
|
|
3146
3080
|
*/
|
|
3147
|
-
static
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
result.zoomInClass = model.zoomInClass;
|
|
3151
|
-
result.zoomOutClass = model.zoomOutClass;
|
|
3152
|
-
result.zoomInLabel = model.zoomInLabel;
|
|
3153
|
-
result.zoomOutLabel = model.zoomOutLabel;
|
|
3154
|
-
return result;
|
|
3081
|
+
static withText(style, text) {
|
|
3082
|
+
style.setText(text);
|
|
3083
|
+
return style;
|
|
3155
3084
|
}
|
|
3085
|
+
}
|
|
3086
|
+
|
|
3087
|
+
/**
|
|
3088
|
+
* A helper class for creating polygon styles.
|
|
3089
|
+
* @class
|
|
3090
|
+
*/
|
|
3091
|
+
class PolygonStyleHelper {
|
|
3156
3092
|
/**
|
|
3157
|
-
*
|
|
3158
|
-
*
|
|
3159
|
-
* @param {ZoomControlSettings} model - The ZoomControlSettings object to compare with.
|
|
3093
|
+
* Creates a Style object with the given fill color, stroke color, and stroke width.
|
|
3160
3094
|
*
|
|
3161
|
-
* @
|
|
3095
|
+
* @param {string} fill - The fill color in hexadecimal or RGB format.
|
|
3096
|
+
* @param {string} stroke - The stroke color in hexadecimal or RGB format.
|
|
3097
|
+
* @param {number} [strokeWidth=1] - The width of the stroke. Defaults to 1.
|
|
3098
|
+
* @return {Style} The created Style object.
|
|
3162
3099
|
*/
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
return false;
|
|
3174
|
-
return true;
|
|
3100
|
+
static simple(fill, stroke, strokeWidth = 1) {
|
|
3101
|
+
return new Style({
|
|
3102
|
+
fill: new Fill({
|
|
3103
|
+
color: fill,
|
|
3104
|
+
}),
|
|
3105
|
+
stroke: new Stroke({
|
|
3106
|
+
color: stroke,
|
|
3107
|
+
width: strokeWidth,
|
|
3108
|
+
}),
|
|
3109
|
+
});
|
|
3175
3110
|
}
|
|
3176
3111
|
/**
|
|
3177
|
-
*
|
|
3112
|
+
* Creates a new Style object with the given fill, stroke, stroke width, and pin radius.
|
|
3113
|
+
*
|
|
3114
|
+
* @param {string} fill - The color to use for the fill of the style.
|
|
3115
|
+
* @param {string} stroke - The color to use for the stroke of the style.
|
|
3116
|
+
* @param {number} [strokeWidth=1] - The width of the stroke. Defaults to 1.
|
|
3117
|
+
* @param {number} [pinRadius=5] - The radius of the circle used as the image for the style. Defaults to 5.
|
|
3118
|
+
* @returns {Style} - The newly created Style object.
|
|
3119
|
+
*/
|
|
3120
|
+
static edit(fill, stroke, strokeWidth = 1, pinRadius = 5) {
|
|
3121
|
+
return new Style({
|
|
3122
|
+
image: new Circle$1({
|
|
3123
|
+
fill: new Fill({
|
|
3124
|
+
color: stroke,
|
|
3125
|
+
}),
|
|
3126
|
+
radius: pinRadius,
|
|
3127
|
+
}),
|
|
3128
|
+
fill: new Fill({
|
|
3129
|
+
color: fill,
|
|
3130
|
+
}),
|
|
3131
|
+
stroke: new Stroke({
|
|
3132
|
+
color: stroke,
|
|
3133
|
+
width: strokeWidth,
|
|
3134
|
+
}),
|
|
3135
|
+
});
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3139
|
+
/**
|
|
3140
|
+
* Helper class for creating text styles.
|
|
3141
|
+
*/
|
|
3142
|
+
class TextStyleHelper {
|
|
3143
|
+
/**
|
|
3144
|
+
* Creates and returns a new Text instance with specified styling properties.
|
|
3145
|
+
*
|
|
3146
|
+
* @param {string} text - The text content to display.
|
|
3147
|
+
* @param {string} font - The font style to use for the text.
|
|
3148
|
+
* @param {string} color - The color of the text.
|
|
3149
|
+
* @param {string|null|undefined} [backColor] - The background color of the text. Optional.
|
|
3150
|
+
* @param {number[]|null|undefined} [padding] - The padding around the text in pixels. Optional.
|
|
3151
|
+
* @param {string|null|undefined} [textBaseline] - The text baseline alignment. Optional.
|
|
3152
|
+
* @param {number|null|undefined} [offsetY] - The vertical offset for the text. Optional.
|
|
3153
|
+
* @return {Text} A new Text instance configured with the specified properties.
|
|
3154
|
+
*/
|
|
3155
|
+
static get(text, font, color, backColor, padding, textBaseline, offsetY) {
|
|
3156
|
+
return new Text({
|
|
3157
|
+
text: text,
|
|
3158
|
+
font: font,
|
|
3159
|
+
textAlign: 'center',
|
|
3160
|
+
fill: new Fill({
|
|
3161
|
+
color: color,
|
|
3162
|
+
}),
|
|
3163
|
+
backgroundFill: backColor ? new Fill({ color: backColor }) : undefined,
|
|
3164
|
+
padding: padding ?? undefined,
|
|
3165
|
+
textBaseline: textBaseline ?? undefined,
|
|
3166
|
+
offsetY: offsetY ?? undefined,
|
|
3167
|
+
});
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
/**
|
|
3172
|
+
* A helper class for converting and stringify features.
|
|
3173
|
+
*/
|
|
3174
|
+
class StringifyFeatureHelper {
|
|
3175
|
+
static polygon(feature, format = FeatureOutputFormat.GeoJson) {
|
|
3176
|
+
return format === FeatureOutputFormat.GeoJson
|
|
3177
|
+
? new GeoJSON().writeFeature(feature)
|
|
3178
|
+
: new WKT().writeFeature(feature);
|
|
3179
|
+
}
|
|
3180
|
+
/**
|
|
3181
|
+
* Creates a polygon feature representing a circle based on a given feature with a circle geometry.
|
|
3182
|
+
*
|
|
3183
|
+
* @param {Feature<Geometry>} feature - The input feature with a circle geometry.
|
|
3184
|
+
* @param {FeatureOutputFormat} format - The format for outputting the polygon feature. (default: FeatureOutputFormat.GeoJson)
|
|
3185
|
+
*
|
|
3186
|
+
* @return {string} - The string representation of the polygon feature.
|
|
3187
|
+
*/
|
|
3188
|
+
static circle(feature, format = FeatureOutputFormat.GeoJson) {
|
|
3189
|
+
const circle = feature.getGeometry();
|
|
3190
|
+
const ext = feature.getGeometry().getExtent();
|
|
3191
|
+
const coords = [
|
|
3192
|
+
...transform([ext[0], ext[1]], 'EPSG:4326', 'EPSG:3857'),
|
|
3193
|
+
...transform([ext[2], ext[3]], 'EPSG:4326', 'EPSG:3857'),
|
|
3194
|
+
];
|
|
3195
|
+
const radius = (coords[2] - coords[0]) / 2;
|
|
3196
|
+
const polygonGeom = new Polygon(StringifyFeatureHelper.drawCircle(circle.getCenter(), radius));
|
|
3197
|
+
return StringifyFeatureHelper.polygon(new Feature(polygonGeom), format);
|
|
3198
|
+
}
|
|
3199
|
+
/**
|
|
3200
|
+
* Draw a circle based on a center point and radius.
|
|
3201
|
+
*
|
|
3202
|
+
* @param {number[]} point - The center point coordinates in EPSG:4326 format.
|
|
3203
|
+
* @param {number} radius - The radius of the circle in meters.
|
|
3204
|
+
* @return {Coordinate[][]} - The coordinates of the circle boundary in EPSG:4326 format.
|
|
3205
|
+
*/
|
|
3206
|
+
static drawCircle(point, radius) {
|
|
3207
|
+
const tetetemp = transform(point, 'EPSG:4326', 'EPSG:3857');
|
|
3208
|
+
// const tetetemp = point;
|
|
3209
|
+
const radians = Math.PI / 180; // degrees to radians
|
|
3210
|
+
const degrees = 180 / Math.PI; // radians to degrees
|
|
3211
|
+
const earthsradius = 6378137.0;
|
|
3212
|
+
const rlat = (radius / earthsradius) * degrees;
|
|
3213
|
+
const rlng = rlat / Math.cos(tetetemp[1] * radians);
|
|
3214
|
+
const extp = [];
|
|
3215
|
+
for (let i = 0; i <= 32; i++) {
|
|
3216
|
+
const theta = Math.PI * (i / 16);
|
|
3217
|
+
extp.push([
|
|
3218
|
+
tetetemp[0] + rlng * Math.cos(theta) * METERS_PER_UNIT,
|
|
3219
|
+
tetetemp[1] + rlat * Math.sin(theta) * METERS_PER_UNIT,
|
|
3220
|
+
]);
|
|
3221
|
+
}
|
|
3222
|
+
return [extp.map((e) => transform(e, 'EPSG:3857', 'EPSG:4326'))];
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
|
|
3226
|
+
/**
|
|
3227
|
+
* Represents the settings for a zoom control.
|
|
3228
|
+
*/
|
|
3229
|
+
class ZoomControlSettings {
|
|
3230
|
+
/**
|
|
3231
|
+
* The CSS class name of the control element.
|
|
3232
|
+
*
|
|
3233
|
+
* @type {string}
|
|
3234
|
+
*/
|
|
3235
|
+
controlClass = 'ol-zoom';
|
|
3236
|
+
/**
|
|
3237
|
+
* The CSS class name for zoom in button.
|
|
3238
|
+
* @type {string}
|
|
3239
|
+
*/
|
|
3240
|
+
zoomInClass = 'ol-zoom-in';
|
|
3241
|
+
/**
|
|
3242
|
+
* The CSS class name for the zoom out button element.
|
|
3243
|
+
*
|
|
3244
|
+
* @type {string}
|
|
3245
|
+
*/
|
|
3246
|
+
zoomOutClass = 'ol-zoom-out';
|
|
3247
|
+
/**
|
|
3248
|
+
* The label for the zoom in action.
|
|
3249
|
+
*
|
|
3250
|
+
* @type {string}
|
|
3251
|
+
*/
|
|
3252
|
+
zoomInLabel = 'Zoom In';
|
|
3253
|
+
/**
|
|
3254
|
+
* The label for the zoom out control.
|
|
3255
|
+
*
|
|
3256
|
+
* @type {string}
|
|
3257
|
+
*/
|
|
3258
|
+
zoomOutLabel = 'Zoom Out';
|
|
3259
|
+
/**
|
|
3260
|
+
* Copies the provided ZoomControlSettings object.
|
|
3261
|
+
*
|
|
3262
|
+
* @param {ZoomControlSettings} model - The ZoomControlSettings object to be copied.
|
|
3263
|
+
* @return {ZoomControlSettings} - The copied ZoomControlSettings object.
|
|
3264
|
+
*/
|
|
3265
|
+
static copy(model) {
|
|
3266
|
+
const result = new ZoomControlSettings();
|
|
3267
|
+
result.controlClass = model.controlClass;
|
|
3268
|
+
result.zoomInClass = model.zoomInClass;
|
|
3269
|
+
result.zoomOutClass = model.zoomOutClass;
|
|
3270
|
+
result.zoomInLabel = model.zoomInLabel;
|
|
3271
|
+
result.zoomOutLabel = model.zoomOutLabel;
|
|
3272
|
+
return result;
|
|
3273
|
+
}
|
|
3274
|
+
/**
|
|
3275
|
+
* Checks if the current ZoomControlSettings object is equal to the given model.
|
|
3276
|
+
*
|
|
3277
|
+
* @param {ZoomControlSettings} model - The ZoomControlSettings object to compare with.
|
|
3278
|
+
*
|
|
3279
|
+
* @return {boolean} - true if the current object is equal to the given model, false otherwise.
|
|
3280
|
+
*/
|
|
3281
|
+
isSame(model) {
|
|
3282
|
+
if (this.zoomInClass !== model.zoomInClass)
|
|
3283
|
+
return false;
|
|
3284
|
+
if (this.zoomOutClass !== model.zoomOutClass)
|
|
3285
|
+
return false;
|
|
3286
|
+
if (this.zoomInLabel !== model.zoomInLabel)
|
|
3287
|
+
return false;
|
|
3288
|
+
if (this.controlClass !== model.controlClass)
|
|
3289
|
+
return false;
|
|
3290
|
+
if (this.zoomOutLabel !== model.zoomOutLabel)
|
|
3291
|
+
return false;
|
|
3292
|
+
return true;
|
|
3293
|
+
}
|
|
3294
|
+
/**
|
|
3295
|
+
* Sets the zoom in label of the Zoom Control Settings.
|
|
3178
3296
|
*
|
|
3179
3297
|
* @param {string} zoomInLabel - The label for the zoom in button.
|
|
3180
3298
|
* @return {ZoomControlSettings} - The new Zoom Control Settings object with the updated zoom in label.
|
|
@@ -3272,265 +3390,119 @@ class MapControlZoomComponent extends DestructibleComponent {
|
|
|
3272
3390
|
this.map.addControl(this.control);
|
|
3273
3391
|
}
|
|
3274
3392
|
eliminate = () => !!this.map && !!this.control && this.map.removeControl(this.control);
|
|
3275
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3276
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3393
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapControlZoomComponent, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3394
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: MapControlZoomComponent, isStandalone: true, selector: "art-map-control-zoom", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3277
3395
|
}
|
|
3278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MapControlZoomComponent, decorators: [{
|
|
3279
3397
|
type: Component,
|
|
3280
|
-
args: [{ selector: 'art-map-control-zoom', template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
3398
|
+
args: [{ selector: 'art-map-control-zoom', standalone: true, template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
3281
3399
|
}], ctorParameters: () => [{ type: MapPostboyService }], propDecorators: { settings: [{
|
|
3282
3400
|
type: Input
|
|
3283
3401
|
}] } });
|
|
3284
3402
|
|
|
3285
|
-
class
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
OsmTileLayerComponent,
|
|
3291
|
-
FeatureLayerComponent,
|
|
3292
|
-
MarkersComponent,
|
|
3293
|
-
TooltipComponent,
|
|
3294
|
-
PolygonsComponent,
|
|
3295
|
-
ClusterLayerComponent,
|
|
3296
|
-
MapControlZoomComponent,
|
|
3297
|
-
ImageLayerComponent,
|
|
3298
|
-
RasterTileLayerComponent], imports: [CommonModule], exports: [MapPlateComponent,
|
|
3299
|
-
FeatureLayerComponent,
|
|
3300
|
-
MarkersComponent,
|
|
3301
|
-
TileLayerComponent,
|
|
3302
|
-
TooltipComponent,
|
|
3303
|
-
PolygonsComponent,
|
|
3304
|
-
ClusterLayerComponent,
|
|
3305
|
-
MapControlZoomComponent,
|
|
3306
|
-
ImageLayerComponent,
|
|
3307
|
-
RasterTileLayerComponent] });
|
|
3308
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: MapModule, imports: [CommonModule] });
|
|
3309
|
-
}
|
|
3310
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: MapModule, decorators: [{
|
|
3311
|
-
type: NgModule,
|
|
3312
|
-
args: [{
|
|
3313
|
-
imports: [CommonModule],
|
|
3314
|
-
declarations: [
|
|
3315
|
-
DestructibleComponent,
|
|
3316
|
-
MapPlateComponent,
|
|
3317
|
-
TileLayerComponent,
|
|
3318
|
-
OsmTileLayerComponent,
|
|
3319
|
-
FeatureLayerComponent,
|
|
3320
|
-
MarkersComponent,
|
|
3321
|
-
TooltipComponent,
|
|
3322
|
-
PolygonsComponent,
|
|
3323
|
-
ClusterLayerComponent,
|
|
3324
|
-
MapControlZoomComponent,
|
|
3325
|
-
ImageLayerComponent,
|
|
3326
|
-
RasterTileLayerComponent,
|
|
3327
|
-
],
|
|
3328
|
-
exports: [
|
|
3329
|
-
MapPlateComponent,
|
|
3330
|
-
FeatureLayerComponent,
|
|
3331
|
-
MarkersComponent,
|
|
3332
|
-
TileLayerComponent,
|
|
3333
|
-
TooltipComponent,
|
|
3334
|
-
PolygonsComponent,
|
|
3335
|
-
ClusterLayerComponent,
|
|
3336
|
-
MapControlZoomComponent,
|
|
3337
|
-
ImageLayerComponent,
|
|
3338
|
-
RasterTileLayerComponent,
|
|
3339
|
-
],
|
|
3340
|
-
}]
|
|
3341
|
-
}] });
|
|
3342
|
-
|
|
3343
|
-
/**
|
|
3344
|
-
* Helper class to create and modify marker styles.
|
|
3345
|
-
*/
|
|
3346
|
-
class MarkerStyleHelper {
|
|
3347
|
-
/**
|
|
3348
|
-
* Creates a new Style object from an SVG.
|
|
3349
|
-
* @param {string} svg - The SVG string.
|
|
3350
|
-
* @param {Array<number>} [size=[30, 30]] - The size of the icon image.
|
|
3351
|
-
* @param {number} [zIndex=400] - The zIndex of the style.
|
|
3352
|
-
* @returns {Style} A new Style object.
|
|
3353
|
-
*/
|
|
3354
|
-
static fromSvg(svg, size = [30, 30], zIndex = 400) {
|
|
3355
|
-
let image = new Image();
|
|
3356
|
-
image.src = 'data:image/svg+xml,' + escape(svg);
|
|
3357
|
-
return new Style({
|
|
3358
|
-
image: new Icon({
|
|
3359
|
-
img: image,
|
|
3360
|
-
imgSize: size,
|
|
3361
|
-
}),
|
|
3362
|
-
zIndex,
|
|
3363
|
-
});
|
|
3403
|
+
class TooltipSettings {
|
|
3404
|
+
id;
|
|
3405
|
+
containerClass = 'custom-tooltip-class';
|
|
3406
|
+
constructor(id) {
|
|
3407
|
+
this.id = id ?? IdGenerator.get();
|
|
3364
3408
|
}
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
* @param {string} strokeColor - The stroke color of the circle. Format: '#RRGGBB' or 'rgba(R, G, B, A)'.
|
|
3371
|
-
* @param {number} [strokeWidth=1] - The width of the stroke. Default is 1.
|
|
3372
|
-
* @returns {Style} - A Style object with a Circle image.
|
|
3373
|
-
*/
|
|
3374
|
-
static circle(radius, fill, strokeColor, strokeWidth = 1) {
|
|
3375
|
-
return new Style({
|
|
3376
|
-
image: new Circle$1({
|
|
3377
|
-
radius,
|
|
3378
|
-
fill: new Fill({ color: fill }),
|
|
3379
|
-
stroke: new Stroke({ color: strokeColor, width: strokeWidth }),
|
|
3380
|
-
}),
|
|
3381
|
-
});
|
|
3409
|
+
static copy(model) {
|
|
3410
|
+
const result = new TooltipSettings(model.id);
|
|
3411
|
+
result.show = model.show;
|
|
3412
|
+
result.containerClass = model.containerClass;
|
|
3413
|
+
return result;
|
|
3382
3414
|
}
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
* @param {Style} style - The Style to modify.
|
|
3387
|
-
* @param {Text} text - The Text to apply to the Style.
|
|
3388
|
-
* @return {Style} - The modified Style with the applied Text.
|
|
3389
|
-
*/
|
|
3390
|
-
static withText(style, text) {
|
|
3391
|
-
style.setText(text);
|
|
3392
|
-
return style;
|
|
3415
|
+
show = (e) => true;
|
|
3416
|
+
setShow(show) {
|
|
3417
|
+
return TooltipSettings.copy({ ...this, show });
|
|
3393
3418
|
}
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
/**
|
|
3397
|
-
* A helper class for creating polygon styles.
|
|
3398
|
-
* @class
|
|
3399
|
-
*/
|
|
3400
|
-
class PolygonStyleHelper {
|
|
3401
|
-
/**
|
|
3402
|
-
* Creates a Style object with the given fill color, stroke color, and stroke width.
|
|
3403
|
-
*
|
|
3404
|
-
* @param {string} fill - The fill color in hexadecimal or RGB format.
|
|
3405
|
-
* @param {string} stroke - The stroke color in hexadecimal or RGB format.
|
|
3406
|
-
* @param {number} [strokeWidth=1] - The width of the stroke. Defaults to 1.
|
|
3407
|
-
* @return {Style} The created Style object.
|
|
3408
|
-
*/
|
|
3409
|
-
static simple(fill, stroke, strokeWidth = 1) {
|
|
3410
|
-
return new Style({
|
|
3411
|
-
fill: new Fill({
|
|
3412
|
-
color: fill,
|
|
3413
|
-
}),
|
|
3414
|
-
stroke: new Stroke({
|
|
3415
|
-
color: stroke,
|
|
3416
|
-
width: strokeWidth,
|
|
3417
|
-
}),
|
|
3418
|
-
});
|
|
3419
|
+
setClass(containerClass) {
|
|
3420
|
+
return TooltipSettings.copy({ ...this, containerClass });
|
|
3419
3421
|
}
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
*/
|
|
3429
|
-
static edit(fill, stroke, strokeWidth = 1, pinRadius = 5) {
|
|
3430
|
-
return new Style({
|
|
3431
|
-
image: new Circle$1({
|
|
3432
|
-
fill: new Fill({
|
|
3433
|
-
color: stroke,
|
|
3434
|
-
}),
|
|
3435
|
-
radius: pinRadius,
|
|
3436
|
-
}),
|
|
3437
|
-
fill: new Fill({
|
|
3438
|
-
color: fill,
|
|
3439
|
-
}),
|
|
3440
|
-
stroke: new Stroke({
|
|
3441
|
-
color: stroke,
|
|
3442
|
-
width: strokeWidth,
|
|
3443
|
-
}),
|
|
3444
|
-
});
|
|
3422
|
+
isSame(model) {
|
|
3423
|
+
if (this.show !== model.show)
|
|
3424
|
+
return false;
|
|
3425
|
+
if (this.containerClass !== model.containerClass)
|
|
3426
|
+
return false;
|
|
3427
|
+
if (this.id !== model.id)
|
|
3428
|
+
return false;
|
|
3429
|
+
return true;
|
|
3445
3430
|
}
|
|
3446
3431
|
}
|
|
3447
3432
|
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
* @param {string|null|undefined} [textBaseline] - The text baseline alignment. Optional.
|
|
3461
|
-
* @param {number|null|undefined} [offsetY] - The vertical offset for the text. Optional.
|
|
3462
|
-
* @return {Text} A new Text instance configured with the specified properties.
|
|
3463
|
-
*/
|
|
3464
|
-
static get(text, font, color, backColor, padding, textBaseline, offsetY) {
|
|
3465
|
-
return new Text({
|
|
3466
|
-
text: text,
|
|
3467
|
-
font: font,
|
|
3468
|
-
textAlign: 'center',
|
|
3469
|
-
fill: new Fill({
|
|
3470
|
-
color: color,
|
|
3471
|
-
}),
|
|
3472
|
-
backgroundFill: backColor ? new Fill({ color: backColor }) : undefined,
|
|
3473
|
-
padding: padding ?? undefined,
|
|
3474
|
-
textBaseline: textBaseline ?? undefined,
|
|
3475
|
-
offsetY: offsetY ?? undefined,
|
|
3476
|
-
});
|
|
3433
|
+
class TooltipComponent extends DestructibleComponent {
|
|
3434
|
+
postboy;
|
|
3435
|
+
detector;
|
|
3436
|
+
contentRef = input.required();
|
|
3437
|
+
container;
|
|
3438
|
+
overlay;
|
|
3439
|
+
show = false;
|
|
3440
|
+
map;
|
|
3441
|
+
constructor(postboy, detector) {
|
|
3442
|
+
super();
|
|
3443
|
+
this.postboy = postboy;
|
|
3444
|
+
this.detector = detector;
|
|
3477
3445
|
}
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
static polygon(feature, format = FeatureOutputFormat.GeoJson) {
|
|
3485
|
-
return format === FeatureOutputFormat.GeoJson
|
|
3486
|
-
? new GeoJSON().writeFeature(feature)
|
|
3487
|
-
: new WKT().writeFeature(feature);
|
|
3446
|
+
_settings = new TooltipSettings();
|
|
3447
|
+
set settings(value) {
|
|
3448
|
+
if (!value || this._settings.isSame(value))
|
|
3449
|
+
return;
|
|
3450
|
+
this._settings = value;
|
|
3451
|
+
this.detector.detectChanges();
|
|
3488
3452
|
}
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
* @param {FeatureOutputFormat} format - The format for outputting the polygon feature. (default: FeatureOutputFormat.GeoJson)
|
|
3494
|
-
*
|
|
3495
|
-
* @return {string} - The string representation of the polygon feature.
|
|
3496
|
-
*/
|
|
3497
|
-
static circle(feature, format = FeatureOutputFormat.GeoJson) {
|
|
3498
|
-
const circle = feature.getGeometry();
|
|
3499
|
-
const ext = feature.getGeometry().getExtent();
|
|
3500
|
-
const coords = [
|
|
3501
|
-
...transform([ext[0], ext[1]], 'EPSG:4326', 'EPSG:3857'),
|
|
3502
|
-
...transform([ext[2], ext[3]], 'EPSG:4326', 'EPSG:3857'),
|
|
3503
|
-
];
|
|
3504
|
-
const radius = (coords[2] - coords[0]) / 2;
|
|
3505
|
-
const polygonGeom = new Polygon(StringifyFeatureHelper.drawCircle(circle.getCenter(), radius));
|
|
3506
|
-
return StringifyFeatureHelper.polygon(new Feature(polygonGeom), format);
|
|
3453
|
+
ngOnInit() {
|
|
3454
|
+
this.subs.push(this.observeMapRender());
|
|
3455
|
+
this.subs.push(this.observeMapClick());
|
|
3456
|
+
this.subs.push(this.observeClose());
|
|
3507
3457
|
}
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3458
|
+
addOverlay(coordinates) {
|
|
3459
|
+
this.removeOverlay();
|
|
3460
|
+
this.overlay = new Overlay(this.options(coordinates));
|
|
3461
|
+
this.map?.addOverlay(this.overlay);
|
|
3462
|
+
this.show = true;
|
|
3463
|
+
this.detector.detectChanges();
|
|
3464
|
+
}
|
|
3465
|
+
options = (coordinates) => {
|
|
3466
|
+
return {
|
|
3467
|
+
element: this.container?.nativeElement,
|
|
3468
|
+
autoPan: false,
|
|
3469
|
+
position: coordinates,
|
|
3470
|
+
};
|
|
3471
|
+
};
|
|
3472
|
+
observeMapClick() {
|
|
3473
|
+
return this.postboy.sub(MapClickEvent).subscribe((ev) => {
|
|
3474
|
+
this._settings.show(ev) ? this.addOverlay(ev.coordinates) : this.removeOverlay();
|
|
3475
|
+
});
|
|
3476
|
+
}
|
|
3477
|
+
observeClose() {
|
|
3478
|
+
return this.postboy
|
|
3479
|
+
.sub(CloseTooltipCommand)
|
|
3480
|
+
.pipe(filter((ev) => ev.tooltipId === this._settings.id))
|
|
3481
|
+
.subscribe(() => this.removeOverlay());
|
|
3482
|
+
}
|
|
3483
|
+
observeMapRender() {
|
|
3484
|
+
return this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
3485
|
+
this.map = m.map;
|
|
3486
|
+
});
|
|
3532
3487
|
}
|
|
3488
|
+
removeOverlay = () => {
|
|
3489
|
+
!!this.overlay && this.map?.removeOverlay(this.overlay);
|
|
3490
|
+
this.show = false;
|
|
3491
|
+
};
|
|
3492
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TooltipComponent, deps: [{ token: MapPostboyService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3493
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: TooltipComponent, isStandalone: true, selector: "art-tooltip", inputs: { contentRef: { classPropertyName: "contentRef", publicName: "contentRef", isSignal: true, isRequired: true, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "container", first: true, predicate: ["tip"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div #tip [class]=\"['tooltip-wrapper', _settings.containerClass]\" [hidden]=\"!show\">\r\n <ng-container *ngTemplateOutlet=\"contentRef()\"> </ng-container>\r\n</div>\r\n", styles: [".tooltip-wrapper{position:absolute}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3533
3494
|
}
|
|
3495
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
3496
|
+
type: Component,
|
|
3497
|
+
args: [{ selector: 'art-tooltip', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
3498
|
+
NgTemplateOutlet
|
|
3499
|
+
], template: "<div #tip [class]=\"['tooltip-wrapper', _settings.containerClass]\" [hidden]=\"!show\">\r\n <ng-container *ngTemplateOutlet=\"contentRef()\"> </ng-container>\r\n</div>\r\n", styles: [".tooltip-wrapper{position:absolute}\n"] }]
|
|
3500
|
+
}], ctorParameters: () => [{ type: MapPostboyService }, { type: i0.ChangeDetectorRef }], propDecorators: { container: [{
|
|
3501
|
+
type: ViewChild,
|
|
3502
|
+
args: ['tip']
|
|
3503
|
+
}], settings: [{
|
|
3504
|
+
type: Input
|
|
3505
|
+
}] } });
|
|
3534
3506
|
|
|
3535
3507
|
/*
|
|
3536
3508
|
* Public API Surface of maps
|
|
@@ -3540,5 +3512,5 @@ class StringifyFeatureHelper {
|
|
|
3540
3512
|
* Generated bundle index. Do not edit.
|
|
3541
3513
|
*/
|
|
3542
3514
|
|
|
3543
|
-
export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FilterFeaturesInPointExecutor, FitToFeaturesCommand, FitToPolygonsCommand, GetFeaturesInAreaQuery, GetFeaturesInPointQuery, GetGeometryLengthExecutor, GetMapPositionExecutor, ImageLayerComponent, ImageLayerSettings, MapClickEvent, MapConstants, MapControl, MapControlZoomComponent, MapFeatureHoveredEvent, MapLyrs, MapLyrsLabel,
|
|
3515
|
+
export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FilterFeaturesInPointExecutor, FitToFeaturesCommand, FitToPolygonsCommand, GetFeaturesInAreaQuery, GetFeaturesInPointQuery, GetGeometryLengthExecutor, GetMapPositionExecutor, ImageLayerComponent, ImageLayerSettings, MapClickEvent, MapConstants, MapControl, MapControlZoomComponent, MapFeatureHoveredEvent, MapLyrs, MapLyrsLabel, MapMoveEndEvent, MapPlateComponent, MapPointerMoveEvent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonSelfIntersectionExecutor, PolygonStyleHelper, PolygonsComponent, RasterTileLayerComponent, RasterTileLayerSettings, RemoveControlCommand, SetMapCenterCommand, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings, ZoomControlSettings };
|
|
3544
3516
|
//# sourceMappingURL=maps-components-src-map.mjs.map
|