@artstesh/maps 6.0.6 → 6.0.8
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/map-plate/controls/map-control-zoom/map-control-zoom.component.mjs +3 -3
- package/dist/esm2022/map/map-plate/features/markers/markers.component.mjs +2 -2
- package/dist/esm2022/map/map-plate/features/polygons/polygons.component.mjs +2 -2
- package/dist/esm2022/map/map-plate/layers/cluster-layer/cluster-layer.component.mjs +2 -2
- package/dist/esm2022/map/map-plate/layers/cluster-layer/cluster-layer.manager.mjs +4 -4
- package/dist/esm2022/map/map-plate/layers/feature-layer/feature-layer.component.mjs +2 -2
- package/dist/esm2022/map/map-plate/layers/tile-layer/tile-layer.component.mjs +2 -2
- package/dist/esm2022/map/map-plate/tooltips/tooltip/tooltip.component.mjs +4 -4
- package/dist/esm2022/map/messages/commands/add-control.command.mjs +9 -5
- package/dist/esm2022/map/messages/commands/add-layer.command.mjs +1 -5
- package/dist/esm2022/map/messages/commands/add-tile.command.mjs +1 -5
- package/dist/esm2022/map/messages/commands/cancel-drawing.command.mjs +4 -5
- package/dist/esm2022/map/messages/commands/cancel-feature-modification.command.mjs +4 -5
- package/dist/esm2022/map/messages/commands/close-tooltip.command.mjs +9 -5
- package/dist/esm2022/map/messages/commands/draw-selection-area.command.mjs +13 -5
- package/dist/esm2022/map/messages/commands/fit-to-features.command.mjs +1 -5
- package/dist/esm2022/map/messages/commands/fit-to-polygons.command.mjs +11 -5
- package/dist/esm2022/map/messages/commands/modify-feature.command.mjs +14 -5
- package/dist/esm2022/map/messages/commands/place-layer-features.command.mjs +1 -5
- package/dist/esm2022/map/messages/commands/remove-control.command.mjs +14 -5
- package/dist/esm2022/map/messages/commands/remove-layer.command.mjs +1 -5
- package/dist/esm2022/map/messages/commands/remove-tile.command.mjs +1 -5
- package/dist/esm2022/map/messages/commands/set-map-center.command.mjs +1 -5
- package/dist/esm2022/map/messages/commands/start-drawing.command.mjs +11 -5
- package/dist/esm2022/map/messages/events/drawing-finished.event.mjs +1 -8
- package/dist/esm2022/map/messages/events/map-click.event.mjs +14 -5
- package/dist/esm2022/map/messages/events/map-move-end.event.mjs +7 -5
- package/dist/esm2022/map/messages/events/map-rendered.event.mjs +9 -5
- package/dist/esm2022/map/messages/executors/calculate-area.executor.mjs +8 -5
- package/dist/esm2022/map/messages/executors/filter-features-in-area.executor.mjs +9 -5
- package/dist/esm2022/map/messages/executors/filter-features-in-point.executor.mjs +27 -0
- package/dist/esm2022/map/messages/executors/generate-draw.executor.mjs +1 -5
- package/dist/esm2022/map/messages/executors/generate-zoom-control.executor.mjs +1 -5
- package/dist/esm2022/map/messages/executors/get-map-position.executor.mjs +1 -4
- package/dist/esm2022/map/messages/index.mjs +9 -7
- package/dist/esm2022/map/messages/queries/get-features-in-area.query.mjs +11 -5
- package/dist/esm2022/map/messages/queries/get-features-in-point.query.mjs +24 -0
- package/dist/esm2022/map/messages/queries/get-layer.query.mjs +1 -5
- package/dist/esm2022/map/models/drawing-type.enum.mjs +14 -1
- package/dist/esm2022/map/models/feature-format.enum.mjs +9 -1
- package/dist/esm2022/map/models/map-position.model.mjs +1 -1
- package/dist/esm2022/map/models/map-settings.mjs +47 -1
- package/dist/esm2022/map/services/controls/controls.service.mjs +4 -6
- package/dist/esm2022/map/services/drawing/drawing.service.mjs +9 -15
- package/dist/esm2022/map/services/drawing/feature-modification.service.mjs +5 -7
- package/dist/esm2022/map/services/feature.service.mjs +5 -1
- package/dist/esm2022/map/services/map-click.service.mjs +2 -2
- package/dist/esm2022/map/services/map-feature.service.mjs +4 -4
- package/dist/esm2022/map/services/map-management.service.mjs +36 -20
- package/dist/esm2022/map/services/map-postboy.service.mjs +6 -2
- package/dist/esm2022/map/services/map-state.service.mjs +3 -3
- package/dist/esm2022/map/services/message-registrator.service.mjs +32 -29
- package/dist/esm2022/src/map/map-plate/controls/map-control-zoom/map-control-zoom.component.mjs +3 -3
- package/dist/esm2022/src/map/map-plate/features/markers/markers.component.mjs +2 -2
- package/dist/esm2022/src/map/map-plate/features/polygons/polygons.component.mjs +2 -2
- package/dist/esm2022/src/map/map-plate/layers/cluster-layer/cluster-layer.component.mjs +2 -2
- package/dist/esm2022/src/map/map-plate/layers/cluster-layer/cluster-layer.manager.mjs +4 -4
- package/dist/esm2022/src/map/map-plate/layers/feature-layer/feature-layer.component.mjs +2 -2
- package/dist/esm2022/src/map/map-plate/layers/tile-layer/tile-layer.component.mjs +2 -2
- package/dist/esm2022/src/map/map-plate/tooltips/tooltip/tooltip.component.mjs +4 -4
- package/dist/esm2022/src/map/messages/commands/add-control.command.mjs +9 -5
- package/dist/esm2022/src/map/messages/commands/add-layer.command.mjs +1 -5
- package/dist/esm2022/src/map/messages/commands/add-tile.command.mjs +1 -5
- package/dist/esm2022/src/map/messages/commands/cancel-drawing.command.mjs +4 -5
- package/dist/esm2022/src/map/messages/commands/cancel-feature-modification.command.mjs +4 -5
- package/dist/esm2022/src/map/messages/commands/close-tooltip.command.mjs +9 -5
- package/dist/esm2022/src/map/messages/commands/draw-selection-area.command.mjs +13 -5
- package/dist/esm2022/src/map/messages/commands/fit-to-features.command.mjs +1 -5
- package/dist/esm2022/src/map/messages/commands/fit-to-polygons.command.mjs +11 -5
- package/dist/esm2022/src/map/messages/commands/modify-feature.command.mjs +14 -5
- package/dist/esm2022/src/map/messages/commands/place-layer-features.command.mjs +1 -5
- package/dist/esm2022/src/map/messages/commands/remove-control.command.mjs +14 -5
- package/dist/esm2022/src/map/messages/commands/remove-layer.command.mjs +1 -5
- package/dist/esm2022/src/map/messages/commands/remove-tile.command.mjs +1 -5
- package/dist/esm2022/src/map/messages/commands/set-map-center.command.mjs +1 -5
- package/dist/esm2022/src/map/messages/commands/start-drawing.command.mjs +11 -5
- package/dist/esm2022/src/map/messages/events/drawing-finished.event.mjs +1 -8
- package/dist/esm2022/src/map/messages/events/map-click.event.mjs +14 -5
- package/dist/esm2022/src/map/messages/events/map-move-end.event.mjs +7 -5
- package/dist/esm2022/src/map/messages/events/map-rendered.event.mjs +9 -5
- package/dist/esm2022/src/map/messages/executors/calculate-area.executor.mjs +8 -5
- package/dist/esm2022/src/map/messages/executors/filter-features-in-area.executor.mjs +9 -5
- package/dist/esm2022/src/map/messages/executors/filter-features-in-point.executor.mjs +27 -0
- package/dist/esm2022/src/map/messages/executors/generate-draw.executor.mjs +1 -5
- package/dist/esm2022/src/map/messages/executors/generate-zoom-control.executor.mjs +1 -5
- package/dist/esm2022/src/map/messages/executors/get-map-position.executor.mjs +1 -4
- package/dist/esm2022/src/map/messages/index.mjs +9 -7
- package/dist/esm2022/src/map/messages/queries/get-features-in-area.query.mjs +11 -5
- package/dist/esm2022/src/map/messages/queries/get-features-in-point.query.mjs +24 -0
- package/dist/esm2022/src/map/messages/queries/get-layer.query.mjs +1 -5
- package/dist/esm2022/src/map/models/drawing-type.enum.mjs +14 -1
- package/dist/esm2022/src/map/models/feature-format.enum.mjs +9 -1
- package/dist/esm2022/src/map/models/map-position.model.mjs +1 -1
- package/dist/esm2022/src/map/models/map-settings.mjs +47 -1
- package/dist/esm2022/src/map/services/controls/controls.service.mjs +4 -6
- package/dist/esm2022/src/map/services/drawing/drawing.service.mjs +9 -15
- package/dist/esm2022/src/map/services/drawing/feature-modification.service.mjs +5 -7
- package/dist/esm2022/src/map/services/feature.service.mjs +5 -1
- package/dist/esm2022/src/map/services/map-click.service.mjs +2 -2
- package/dist/esm2022/src/map/services/map-feature.service.mjs +4 -4
- package/dist/esm2022/src/map/services/map-management.service.mjs +36 -20
- package/dist/esm2022/src/map/services/map-postboy.service.mjs +6 -2
- package/dist/esm2022/src/map/services/map-state.service.mjs +3 -3
- package/dist/esm2022/src/map/services/message-registrator.service.mjs +32 -29
- package/dist/fesm2022/maps-components-src-map.mjs +397 -244
- package/dist/fesm2022/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2022/maps-components.mjs +397 -244
- package/dist/fesm2022/maps-components.mjs.map +1 -1
- package/dist/map/messages/commands/add-control.command.d.ts +8 -2
- package/dist/map/messages/commands/add-layer.command.d.ts +0 -2
- package/dist/map/messages/commands/add-tile.command.d.ts +0 -2
- package/dist/map/messages/commands/cancel-drawing.command.d.ts +3 -2
- package/dist/map/messages/commands/cancel-feature-modification.command.d.ts +3 -2
- package/dist/map/messages/commands/close-tooltip.command.d.ts +8 -2
- package/dist/map/messages/commands/draw-selection-area.command.d.ts +12 -2
- package/dist/map/messages/commands/fit-to-features.command.d.ts +0 -2
- package/dist/map/messages/commands/fit-to-polygons.command.d.ts +10 -2
- package/dist/map/messages/commands/modify-feature.command.d.ts +13 -2
- package/dist/map/messages/commands/place-layer-features.command.d.ts +0 -2
- package/dist/map/messages/commands/remove-control.command.d.ts +13 -2
- package/dist/map/messages/commands/remove-layer.command.d.ts +0 -2
- package/dist/map/messages/commands/remove-tile.command.d.ts +0 -2
- package/dist/map/messages/commands/set-map-center.command.d.ts +0 -2
- package/dist/map/messages/commands/start-drawing.command.d.ts +10 -2
- package/dist/map/messages/events/drawing-finished.event.d.ts +0 -3
- package/dist/map/messages/events/map-click.event.d.ts +13 -2
- package/dist/map/messages/events/map-move-end.event.d.ts +6 -2
- package/dist/map/messages/events/map-rendered.event.d.ts +8 -2
- package/dist/map/messages/executors/calculate-area.executor.d.ts +7 -2
- package/dist/map/messages/executors/filter-features-in-area.executor.d.ts +8 -2
- package/dist/map/messages/executors/filter-features-in-point.executor.d.ts +23 -0
- package/dist/map/messages/executors/generate-draw.executor.d.ts +0 -2
- package/dist/map/messages/executors/generate-zoom-control.executor.d.ts +0 -2
- package/dist/map/messages/executors/get-map-position.executor.d.ts +0 -1
- package/dist/map/messages/index.d.ts +8 -6
- package/dist/map/messages/queries/get-features-in-area.query.d.ts +10 -2
- package/dist/map/messages/queries/get-features-in-point.query.d.ts +20 -0
- package/dist/map/messages/queries/get-layer.query.d.ts +0 -2
- package/dist/map/models/drawing-type.enum.d.ts +13 -0
- package/dist/map/models/feature-format.enum.d.ts +8 -0
- package/dist/map/models/map-position.model.d.ts +12 -0
- package/dist/map/models/map-settings.d.ts +46 -0
- package/dist/map/services/feature.service.d.ts +2 -0
- package/dist/map/services/map-management.service.d.ts +2 -0
- package/dist/src/map/messages/commands/add-control.command.d.ts +8 -2
- package/dist/src/map/messages/commands/add-layer.command.d.ts +0 -2
- package/dist/src/map/messages/commands/add-tile.command.d.ts +0 -2
- package/dist/src/map/messages/commands/cancel-drawing.command.d.ts +3 -2
- package/dist/src/map/messages/commands/cancel-feature-modification.command.d.ts +3 -2
- package/dist/src/map/messages/commands/close-tooltip.command.d.ts +8 -2
- package/dist/src/map/messages/commands/draw-selection-area.command.d.ts +12 -2
- package/dist/src/map/messages/commands/fit-to-features.command.d.ts +0 -2
- package/dist/src/map/messages/commands/fit-to-polygons.command.d.ts +10 -2
- package/dist/src/map/messages/commands/modify-feature.command.d.ts +13 -2
- package/dist/src/map/messages/commands/place-layer-features.command.d.ts +0 -2
- package/dist/src/map/messages/commands/remove-control.command.d.ts +13 -2
- package/dist/src/map/messages/commands/remove-layer.command.d.ts +0 -2
- package/dist/src/map/messages/commands/remove-tile.command.d.ts +0 -2
- package/dist/src/map/messages/commands/set-map-center.command.d.ts +0 -2
- package/dist/src/map/messages/commands/start-drawing.command.d.ts +10 -2
- package/dist/src/map/messages/events/drawing-finished.event.d.ts +0 -3
- package/dist/src/map/messages/events/map-click.event.d.ts +13 -2
- package/dist/src/map/messages/events/map-move-end.event.d.ts +6 -2
- package/dist/src/map/messages/events/map-rendered.event.d.ts +8 -2
- package/dist/src/map/messages/executors/calculate-area.executor.d.ts +7 -2
- package/dist/src/map/messages/executors/filter-features-in-area.executor.d.ts +8 -2
- package/dist/src/map/messages/executors/filter-features-in-point.executor.d.ts +23 -0
- package/dist/src/map/messages/executors/generate-draw.executor.d.ts +0 -2
- package/dist/src/map/messages/executors/generate-zoom-control.executor.d.ts +0 -2
- package/dist/src/map/messages/executors/get-map-position.executor.d.ts +0 -1
- package/dist/src/map/messages/index.d.ts +8 -6
- package/dist/src/map/messages/queries/get-features-in-area.query.d.ts +10 -2
- package/dist/src/map/messages/queries/get-features-in-point.query.d.ts +20 -0
- package/dist/src/map/messages/queries/get-layer.query.d.ts +0 -2
- package/dist/src/map/models/drawing-type.enum.d.ts +13 -0
- package/dist/src/map/models/feature-format.enum.d.ts +8 -0
- package/dist/src/map/models/map-position.model.d.ts +12 -0
- package/dist/src/map/models/map-settings.d.ts +46 -0
- package/dist/src/map/services/feature.service.d.ts +2 -0
- package/dist/src/map/services/map-management.service.d.ts +2 -0
- package/package.json +13 -13
|
@@ -64,6 +64,10 @@ class MapLyrsLabel {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Represents the configurable settings for a map instance, providing
|
|
69
|
+
* options for center coordinates, zoom levels, map layers, and language.
|
|
70
|
+
*/
|
|
67
71
|
class MapSettings {
|
|
68
72
|
center = [0, 0];
|
|
69
73
|
maxZoom = 19;
|
|
@@ -81,24 +85,66 @@ class MapSettings {
|
|
|
81
85
|
result.language = model.language;
|
|
82
86
|
return result;
|
|
83
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Sets the center for the map settings.
|
|
90
|
+
*
|
|
91
|
+
* @param {number[]} center - A two-element array representing the latitude and longitude of the map's center.
|
|
92
|
+
* @return {MapSettings} A new MapSettings object with the updated center.
|
|
93
|
+
*/
|
|
84
94
|
setCenter(center) {
|
|
85
95
|
return MapSettings.copy({ ...this, center });
|
|
86
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Sets the maximum zoom level for the map.
|
|
99
|
+
*
|
|
100
|
+
* @param {number} maxZoom - The maximum zoom level to be set.
|
|
101
|
+
* @return {MapSettings} A new instance of MapSettings with the updated maximum zoom level.
|
|
102
|
+
*/
|
|
87
103
|
setMaxZoom(maxZoom) {
|
|
88
104
|
return MapSettings.copy({ ...this, maxZoom });
|
|
89
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Sets the minimum zoom level for the map settings.
|
|
108
|
+
*
|
|
109
|
+
* @param {number} minZoom The minimum zoom level to be set. Must be a valid numeric value.
|
|
110
|
+
* @return {MapSettings} A new MapSettings object with the updated minimum zoom level.
|
|
111
|
+
*/
|
|
90
112
|
setMinZoom(minZoom) {
|
|
91
113
|
return MapSettings.copy({ ...this, minZoom });
|
|
92
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Adjusts the zoom level of the map by setting the specified value.
|
|
117
|
+
*
|
|
118
|
+
* @param {number} zoom - The desired zoom level to be set.
|
|
119
|
+
* @return {MapSettings} A new MapSettings instance with the updated zoom level.
|
|
120
|
+
*/
|
|
93
121
|
setZoom(zoom) {
|
|
94
122
|
return MapSettings.copy({ ...this, zoom });
|
|
95
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Sets the layers in the map settings with the provided layers.
|
|
126
|
+
*
|
|
127
|
+
* @param {MapLyrs} lyrs - The layers to be set in the map settings.
|
|
128
|
+
* @return {MapSettings} A new instance of MapSettings with the updated layers.
|
|
129
|
+
*/
|
|
96
130
|
setLyrs(lyrs) {
|
|
97
131
|
return MapSettings.copy({ ...this, lyrs });
|
|
98
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* Updates the language setting for the map configuration and returns a new instance with the updated language.
|
|
135
|
+
*
|
|
136
|
+
* @param {string} language - The language to be set for the map configuration.
|
|
137
|
+
* @return {MapSettings} A new instance of MapSettings with the updated language.
|
|
138
|
+
*/
|
|
99
139
|
setLanguage(language) {
|
|
100
140
|
return MapSettings.copy({ ...this, language });
|
|
101
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Compares the current MapSettings instance with another to determine if they are identical.
|
|
144
|
+
*
|
|
145
|
+
* @param {MapSettings} model - The MapSettings instance to compare with the current instance.
|
|
146
|
+
* @return {boolean} Returns true if both MapSettings instances have the same properties and values; otherwise, false.
|
|
147
|
+
*/
|
|
102
148
|
isSame(model) {
|
|
103
149
|
if (this.maxZoom !== model.maxZoom)
|
|
104
150
|
return false;
|
|
@@ -187,6 +233,19 @@ class PolygonModel {
|
|
|
187
233
|
}
|
|
188
234
|
}
|
|
189
235
|
|
|
236
|
+
/**
|
|
237
|
+
* Enum representing various drawing types.
|
|
238
|
+
*
|
|
239
|
+
* This enumeration is used to define the types of drawable shapes
|
|
240
|
+
* within a specific drawing context. Each member corresponds to
|
|
241
|
+
* a specific type of drawing.
|
|
242
|
+
*
|
|
243
|
+
* Members:
|
|
244
|
+
* - `Polygon`: Represents a polygonal shape (e.g., triangle, pentagon, etc.).
|
|
245
|
+
* - `Circle`: Represents a circular shape.
|
|
246
|
+
* - `Square`: Represents a square shape.
|
|
247
|
+
* - `Box`: Represents a rectangular box shape.
|
|
248
|
+
*/
|
|
190
249
|
var DrawingType;
|
|
191
250
|
(function (DrawingType) {
|
|
192
251
|
DrawingType[DrawingType["Polygon"] = 1] = "Polygon";
|
|
@@ -195,6 +254,14 @@ var DrawingType;
|
|
|
195
254
|
DrawingType[DrawingType["Box"] = 4] = "Box";
|
|
196
255
|
})(DrawingType || (DrawingType = {}));
|
|
197
256
|
|
|
257
|
+
/**
|
|
258
|
+
* An enumeration representing different formats for feature outputs.
|
|
259
|
+
* This can be used to specify the desired output format when dealing with geospatial data.
|
|
260
|
+
*
|
|
261
|
+
* Enumerators:
|
|
262
|
+
* - GeoJson: Represents the GeoJSON format for geospatial data.
|
|
263
|
+
* - WKT: Represents the Well-Known Text (WKT) format for geospatial data.
|
|
264
|
+
*/
|
|
198
265
|
var FeatureOutputFormat;
|
|
199
266
|
(function (FeatureOutputFormat) {
|
|
200
267
|
FeatureOutputFormat[FeatureOutputFormat["GeoJson"] = 1] = "GeoJson";
|
|
@@ -215,142 +282,140 @@ class MapControl extends Control {
|
|
|
215
282
|
}
|
|
216
283
|
}
|
|
217
284
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
class MapClickEvent extends PostboyGenericMessage {
|
|
231
|
-
coordinates;
|
|
232
|
-
entities;
|
|
233
|
-
features;
|
|
234
|
-
static ID = '323df526-8d9c-49c6-83e8-6e9a1e7762f7';
|
|
235
|
-
constructor(coordinates, entities, features) {
|
|
236
|
-
super();
|
|
237
|
-
this.coordinates = coordinates;
|
|
238
|
-
this.entities = entities;
|
|
239
|
-
this.features = features;
|
|
240
|
-
}
|
|
241
|
-
get id() {
|
|
242
|
-
return MapClickEvent.ID;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
class MapMoveEndEvent extends PostboyGenericMessage {
|
|
247
|
-
position;
|
|
248
|
-
static ID = 'f21f783e-b5af-4489-9fec-8027fd07a8ad';
|
|
249
|
-
constructor(position) {
|
|
285
|
+
/**
|
|
286
|
+
* Represents a command to add a custom control to a map.
|
|
287
|
+
*/
|
|
288
|
+
class AddControlCommand extends PostboyGenericMessage {
|
|
289
|
+
item;
|
|
290
|
+
/**
|
|
291
|
+
* Creates an instance of the class with the specified MapControl object.
|
|
292
|
+
*
|
|
293
|
+
* @param {MapControl} item - The MapControl object to be associated with the instance.
|
|
294
|
+
*/
|
|
295
|
+
constructor(item) {
|
|
250
296
|
super();
|
|
251
|
-
this.
|
|
252
|
-
}
|
|
253
|
-
get id() {
|
|
254
|
-
return MapMoveEndEvent.ID;
|
|
297
|
+
this.item = item;
|
|
255
298
|
}
|
|
256
299
|
}
|
|
257
300
|
|
|
301
|
+
/**
|
|
302
|
+
* A command class that represents the action to close a tooltip.
|
|
303
|
+
*/
|
|
258
304
|
class CloseTooltipCommand extends PostboyGenericMessage {
|
|
259
305
|
tooltipId;
|
|
260
|
-
|
|
306
|
+
/**
|
|
307
|
+
* Creates an instance of the class with the specified tooltip ID.
|
|
308
|
+
*
|
|
309
|
+
* @param {string} tooltipId - The unique identifier for the tooltip.
|
|
310
|
+
*/
|
|
261
311
|
constructor(tooltipId) {
|
|
262
312
|
super();
|
|
263
313
|
this.tooltipId = tooltipId;
|
|
264
314
|
}
|
|
265
|
-
get id() {
|
|
266
|
-
return CloseTooltipCommand.ID;
|
|
267
|
-
}
|
|
268
315
|
}
|
|
269
316
|
|
|
317
|
+
/**
|
|
318
|
+
* Represents a command to start a drawing operation.
|
|
319
|
+
*/
|
|
270
320
|
class StartDrawingCommand extends PostboyCallbackMessage {
|
|
271
321
|
type;
|
|
272
322
|
style;
|
|
273
323
|
format;
|
|
274
|
-
|
|
324
|
+
/**
|
|
325
|
+
* Constructor for creating an instance of the class that represents a drawing feature with specific type, style, and output format.
|
|
326
|
+
*
|
|
327
|
+
* @param {DrawingType} type - The type of the drawing to be created.
|
|
328
|
+
* @param {Style} style - The style defining visual appearance of the drawing.
|
|
329
|
+
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The format of the feature output. Defaults to GeoJson.
|
|
330
|
+
*/
|
|
275
331
|
constructor(type, style, format = FeatureOutputFormat.GeoJson) {
|
|
276
332
|
super();
|
|
277
333
|
this.type = type;
|
|
278
334
|
this.style = style;
|
|
279
335
|
this.format = format;
|
|
280
336
|
}
|
|
281
|
-
get id() {
|
|
282
|
-
return StartDrawingCommand.ID;
|
|
283
|
-
}
|
|
284
337
|
}
|
|
285
338
|
|
|
339
|
+
/**
|
|
340
|
+
* Represents a command to cancel a drawing action.
|
|
341
|
+
*/
|
|
286
342
|
class CancelDrawingCommand extends PostboyGenericMessage {
|
|
287
|
-
static ID = '7d38d983-feba-4176-a66b-18175e5ecd6b';
|
|
288
|
-
get id() {
|
|
289
|
-
return CancelDrawingCommand.ID;
|
|
290
|
-
}
|
|
291
343
|
}
|
|
292
344
|
|
|
345
|
+
/**
|
|
346
|
+
* Class representing a command to draw a selection area with a specific type and style.
|
|
347
|
+
*
|
|
348
|
+
* @return {Dictionary<IIdentified[]>} - a collection of features inside the selected area, grouped by a layer's name
|
|
349
|
+
*/
|
|
293
350
|
class DrawSelectionAreaCommand extends PostboyCallbackMessage {
|
|
294
351
|
type;
|
|
295
352
|
style;
|
|
296
353
|
ignore;
|
|
297
|
-
|
|
354
|
+
/**
|
|
355
|
+
* Constructs a new instance with the specified type, style, and optional set of ignored items.
|
|
356
|
+
*
|
|
357
|
+
* @param {DrawingType} type - The type of drawing to be created.
|
|
358
|
+
* @param {Style} style - The style information for the drawing.
|
|
359
|
+
* @param {Set<string>} [ignore=new Set<string>()] - Optional set of items to be ignored.
|
|
360
|
+
*/
|
|
298
361
|
constructor(type, style, ignore = new Set()) {
|
|
299
362
|
super();
|
|
300
363
|
this.type = type;
|
|
301
364
|
this.style = style;
|
|
302
365
|
this.ignore = ignore;
|
|
303
366
|
}
|
|
304
|
-
get id() {
|
|
305
|
-
return DrawSelectionAreaCommand.ID;
|
|
306
|
-
}
|
|
307
367
|
}
|
|
308
368
|
|
|
369
|
+
/**
|
|
370
|
+
* Represents a command to modify a feature with a specific style and output format
|
|
371
|
+
* for a polygonal model.
|
|
372
|
+
*
|
|
373
|
+
* @return {string | null} a string representation of the modified feature in the appropriate format
|
|
374
|
+
*/
|
|
309
375
|
class ModifyFeatureCommand extends PostboyCallbackMessage {
|
|
310
376
|
model;
|
|
311
377
|
style;
|
|
312
378
|
format;
|
|
313
|
-
|
|
379
|
+
/**
|
|
380
|
+
* Constructs an instance of the class.
|
|
381
|
+
*
|
|
382
|
+
* @param {PolygonModel} model - The polygon model to be used.
|
|
383
|
+
* @param {Style} style - The style configuration for the polygon.
|
|
384
|
+
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the features. Default is GeoJson.
|
|
385
|
+
*/
|
|
314
386
|
constructor(model, style, format = FeatureOutputFormat.GeoJson) {
|
|
315
387
|
super();
|
|
316
388
|
this.model = model;
|
|
317
389
|
this.style = style;
|
|
318
390
|
this.format = format;
|
|
319
391
|
}
|
|
320
|
-
get id() {
|
|
321
|
-
return ModifyFeatureCommand.ID;
|
|
322
|
-
}
|
|
323
392
|
}
|
|
324
393
|
|
|
394
|
+
/**
|
|
395
|
+
* Represents a command to cancel a feature modification.
|
|
396
|
+
*/
|
|
325
397
|
class CancelFeatureModificationCommand extends PostboyGenericMessage {
|
|
326
|
-
static ID = '9c9fb40f-ea95-4704-8177-0e9ecabf36fa';
|
|
327
|
-
get id() {
|
|
328
|
-
return CancelFeatureModificationCommand.ID;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
class AddControlCommand extends PostboyGenericMessage {
|
|
333
|
-
item;
|
|
334
|
-
static ID = '8e1c06eb-b395-4fe1-929c-ebf0805eeb49';
|
|
335
|
-
constructor(item) {
|
|
336
|
-
super();
|
|
337
|
-
this.item = item;
|
|
338
|
-
}
|
|
339
|
-
get id() {
|
|
340
|
-
return AddControlCommand.ID;
|
|
341
|
-
}
|
|
342
398
|
}
|
|
343
399
|
|
|
400
|
+
/**
|
|
401
|
+
* Represents a command to remove a map control from the map.
|
|
402
|
+
*
|
|
403
|
+
* The command is identified by a unique static ID, and it requires a MapControl item
|
|
404
|
+
* to specify the control to be removed.
|
|
405
|
+
*
|
|
406
|
+
* @extends PostboyGenericMessage
|
|
407
|
+
*/
|
|
344
408
|
class RemoveControlCommand extends PostboyGenericMessage {
|
|
345
409
|
item;
|
|
346
|
-
|
|
410
|
+
/**
|
|
411
|
+
* Constructs an instance of the class.
|
|
412
|
+
*
|
|
413
|
+
* @param {MapControl} item - The map control instance to be removed.
|
|
414
|
+
*/
|
|
347
415
|
constructor(item) {
|
|
348
416
|
super();
|
|
349
417
|
this.item = item;
|
|
350
418
|
}
|
|
351
|
-
get id() {
|
|
352
|
-
return RemoveControlCommand.ID;
|
|
353
|
-
}
|
|
354
419
|
}
|
|
355
420
|
|
|
356
421
|
/**
|
|
@@ -360,7 +425,6 @@ class SetMapCenterCommand extends PostboyGenericMessage {
|
|
|
360
425
|
lat;
|
|
361
426
|
lng;
|
|
362
427
|
zoom;
|
|
363
|
-
static ID = 'd50e89c9-6707-4f8c-ab57-65fcef232182';
|
|
364
428
|
/**
|
|
365
429
|
*
|
|
366
430
|
* @param lat - the desired latitude
|
|
@@ -373,34 +437,139 @@ class SetMapCenterCommand extends PostboyGenericMessage {
|
|
|
373
437
|
this.lng = lng;
|
|
374
438
|
this.zoom = zoom;
|
|
375
439
|
}
|
|
376
|
-
|
|
377
|
-
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* FitToPolygonsCommand is a command used to fit a given set of polygon features
|
|
444
|
+
* to the viewable area, optionally applying a zoom transformation afterwards.
|
|
445
|
+
*/
|
|
446
|
+
class FitToPolygonsCommand extends PostboyGenericMessage {
|
|
447
|
+
features;
|
|
448
|
+
zoomAfter;
|
|
449
|
+
/**
|
|
450
|
+
* Creates an instance of the class with specified polygon features and an optional zoom level.
|
|
451
|
+
*
|
|
452
|
+
* @param {PolygonModel[]} features - An array of polygon models to fit to.
|
|
453
|
+
* @param {number} [zoomAfter=0] - Optional zoom level change to apply after initialization. Defaults to 0.
|
|
454
|
+
*/
|
|
455
|
+
constructor(features, zoomAfter = 0) {
|
|
456
|
+
super();
|
|
457
|
+
this.features = features;
|
|
458
|
+
this.zoomAfter = zoomAfter;
|
|
378
459
|
}
|
|
379
460
|
}
|
|
380
461
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
462
|
+
/**
|
|
463
|
+
* Represents an event triggered when a map rendering process is completed.
|
|
464
|
+
*/
|
|
465
|
+
class MapRenderedEvent extends PostboyGenericMessage {
|
|
466
|
+
map;
|
|
467
|
+
/**
|
|
468
|
+
* Constructor for creating an instance of the class.
|
|
469
|
+
*
|
|
470
|
+
* @param {Map} map - The map instance to be used by the class.
|
|
471
|
+
*/
|
|
472
|
+
constructor(map) {
|
|
385
473
|
super();
|
|
386
|
-
this.
|
|
474
|
+
this.map = map;
|
|
387
475
|
}
|
|
388
|
-
|
|
389
|
-
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Represents an event triggered by a click on a map, containing information about the
|
|
480
|
+
* click's location, relevant entities, and features present at the clicked position.
|
|
481
|
+
*
|
|
482
|
+
* @extends {PostboyGenericMessage}
|
|
483
|
+
*/
|
|
484
|
+
class MapClickEvent extends PostboyGenericMessage {
|
|
485
|
+
coordinates;
|
|
486
|
+
entities;
|
|
487
|
+
features;
|
|
488
|
+
/**
|
|
489
|
+
* Creates an instance of this class with the provided coordinates, entities, and features.
|
|
490
|
+
*
|
|
491
|
+
* @param {number[]} coordinates - An array representing the coordinates.
|
|
492
|
+
* @param {{ [layer: string]: IIdentified[] }} entities - A mapping of layer names to arrays of IIdentified entities.
|
|
493
|
+
* @param {{ [layer: string]: Feature<Geometry>[] }} features - A mapping of layer names to arrays of features with geometry.
|
|
494
|
+
*/
|
|
495
|
+
constructor(coordinates, entities, features) {
|
|
496
|
+
super();
|
|
497
|
+
this.coordinates = coordinates;
|
|
498
|
+
this.entities = entities;
|
|
499
|
+
this.features = features;
|
|
390
500
|
}
|
|
391
501
|
}
|
|
392
502
|
|
|
393
|
-
|
|
503
|
+
/**
|
|
504
|
+
* Represents an event that is triggered when the movement of a map ends.
|
|
505
|
+
* This class is used to capture the final position of a map after a movement operation.
|
|
506
|
+
*
|
|
507
|
+
* @property {MapPosition | null} position - The final position of the map after movement ends. Can be null.
|
|
508
|
+
*/
|
|
509
|
+
class MapMoveEndEvent extends PostboyGenericMessage {
|
|
510
|
+
position;
|
|
511
|
+
constructor(position) {
|
|
512
|
+
super();
|
|
513
|
+
this.position = position;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* A class responsible for executing filtering of geographical features
|
|
519
|
+
* based on a specific geographical point (latitude and longitude).
|
|
520
|
+
*
|
|
521
|
+
* @template Feature - A geographical feature that is processed by the executor.
|
|
522
|
+
* @template Geometry - The type of geometry associated with the feature.
|
|
523
|
+
*/
|
|
524
|
+
class FilterFeaturesInPointExecutor extends PostboyExecutor {
|
|
525
|
+
lat;
|
|
526
|
+
lng;
|
|
394
527
|
features;
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
528
|
+
/**
|
|
529
|
+
* Constructs a new instance with the specified latitude, longitude, and features.
|
|
530
|
+
*
|
|
531
|
+
* @param {number} lat - The latitude coordinate.
|
|
532
|
+
* @param {number} lng - The longitude coordinate.
|
|
533
|
+
* @param {Feature<Geometry>[]} features - The array of features associated with the location.
|
|
534
|
+
*/
|
|
535
|
+
constructor(lat, lng, features) {
|
|
398
536
|
super();
|
|
537
|
+
this.lat = lat;
|
|
538
|
+
this.lng = lng;
|
|
399
539
|
this.features = features;
|
|
400
|
-
this.zoomAfter = zoomAfter;
|
|
401
540
|
}
|
|
402
|
-
|
|
403
|
-
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* A class that extends the PostboyExecutor to filter geographical features within a specified area.
|
|
545
|
+
* This class is designed to process a list of input features and determine which of them are located inside the provided area geometry.
|
|
546
|
+
*
|
|
547
|
+
* Parameters:
|
|
548
|
+
* - `area`: A Geometry object defining the area to filter geographical features.
|
|
549
|
+
* - `features`: An array of geographical features, represented as `Feature<Geometry>` objects, to be filtered by their presence within the specified area.
|
|
550
|
+
*/
|
|
551
|
+
class FilterFeaturesInAreaExecutor extends PostboyExecutor {
|
|
552
|
+
area;
|
|
553
|
+
features;
|
|
554
|
+
constructor(area, features) {
|
|
555
|
+
super();
|
|
556
|
+
this.area = area;
|
|
557
|
+
this.features = features;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* An executor responsible for calculating the area of a given polygon.
|
|
563
|
+
*
|
|
564
|
+
* Use this class to manage and execute area-calculation logic for a polygon.
|
|
565
|
+
*
|
|
566
|
+
* @return {number} - the spherical area (in square meters)
|
|
567
|
+
*/
|
|
568
|
+
class CalculateAreaExecutor extends PostboyExecutor {
|
|
569
|
+
polygon;
|
|
570
|
+
constructor(polygon) {
|
|
571
|
+
super();
|
|
572
|
+
this.polygon = polygon;
|
|
404
573
|
}
|
|
405
574
|
}
|
|
406
575
|
|
|
@@ -411,138 +580,115 @@ class FitToPolygonsCommand extends PostboyGenericMessage {
|
|
|
411
580
|
*/
|
|
412
581
|
class GetMapPositionExecutor extends PostboyExecutor {
|
|
413
582
|
static ID = '52c95689-d09b-4082-ba58-9183ea96a213';
|
|
414
|
-
get id() {
|
|
415
|
-
return GetMapPositionExecutor.ID;
|
|
416
|
-
}
|
|
417
583
|
constructor() {
|
|
418
584
|
super();
|
|
419
585
|
}
|
|
420
586
|
}
|
|
421
587
|
|
|
588
|
+
/**
|
|
589
|
+
* Class representing a query to get features within a specified geographical area.
|
|
590
|
+
* The query optionally takes a set of layer names to ignore during the operation.
|
|
591
|
+
*/
|
|
422
592
|
class GetFeaturesInAreaQuery extends PostboyCallbackMessage {
|
|
423
593
|
area;
|
|
424
594
|
ignore;
|
|
425
|
-
|
|
595
|
+
/**
|
|
596
|
+
* Constructor to initialize the object with a Geometry instance and an optional set of strings to ignore.
|
|
597
|
+
*
|
|
598
|
+
* @param {Geometry} area - The Geometry object used to define the area.
|
|
599
|
+
* @param {Set<string>} [ignore] - An optional set of layer names that will be ignored. Defaults to an empty set.
|
|
600
|
+
*/
|
|
426
601
|
constructor(area, ignore = new Set()) {
|
|
427
602
|
super();
|
|
428
603
|
this.area = area;
|
|
429
604
|
this.ignore = ignore;
|
|
430
605
|
}
|
|
431
|
-
get id() {
|
|
432
|
-
return GetFeaturesInAreaQuery.ID;
|
|
433
|
-
}
|
|
434
606
|
}
|
|
435
607
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
608
|
+
/**
|
|
609
|
+
* Represents a query to retrieve features located at a specific geographical point.
|
|
610
|
+
* The query is defined by latitude, longitude, and an optional set of features to ignore.
|
|
611
|
+
*/
|
|
612
|
+
class GetFeaturesInPointQuery extends PostboyCallbackMessage {
|
|
613
|
+
lat;
|
|
614
|
+
lng;
|
|
615
|
+
ignore;
|
|
616
|
+
/**
|
|
617
|
+
* Constructor for initializing a geographic coordinate object.
|
|
618
|
+
*
|
|
619
|
+
* @param {number} lat - The latitude of the location.
|
|
620
|
+
* @param {number} lng - The longitude of the location.
|
|
621
|
+
* @param {Set<string>} [ignore=new Set<string>()] - An optional set of strings to ignore during processing.
|
|
622
|
+
*/
|
|
623
|
+
constructor(lat, lng, ignore = new Set()) {
|
|
441
624
|
super();
|
|
442
|
-
this.
|
|
443
|
-
this.
|
|
444
|
-
|
|
445
|
-
get id() {
|
|
446
|
-
return FilterFeaturesInAreaExecutor.ID;
|
|
625
|
+
this.lat = lat;
|
|
626
|
+
this.lng = lng;
|
|
627
|
+
this.ignore = ignore;
|
|
447
628
|
}
|
|
448
629
|
}
|
|
449
630
|
|
|
450
631
|
class AddLayerCommand extends PostboyGenericMessage {
|
|
451
632
|
layer;
|
|
452
|
-
static ID = 'd93e250f-92bc-43ac-9c6a-46c521a1aaa5';
|
|
453
633
|
constructor(layer) {
|
|
454
634
|
super();
|
|
455
635
|
this.layer = layer;
|
|
456
636
|
}
|
|
457
|
-
get id() {
|
|
458
|
-
return AddLayerCommand.ID;
|
|
459
|
-
}
|
|
460
637
|
}
|
|
461
638
|
|
|
462
639
|
class PlaceLayerFeaturesCommand extends PostboyGenericMessage {
|
|
463
640
|
layer;
|
|
464
641
|
features;
|
|
465
|
-
static ID = '8caf86bc-869b-426f-b36d-4642f6b8aab0';
|
|
466
642
|
constructor(layer, features) {
|
|
467
643
|
super();
|
|
468
644
|
this.layer = layer;
|
|
469
645
|
this.features = features;
|
|
470
646
|
}
|
|
471
|
-
get id() {
|
|
472
|
-
return PlaceLayerFeaturesCommand.ID;
|
|
473
|
-
}
|
|
474
647
|
}
|
|
475
648
|
|
|
476
649
|
class RemoveLayerCommand extends PostboyGenericMessage {
|
|
477
650
|
layer;
|
|
478
|
-
static ID = 'ab484e0e-e185-45cd-8434-12101f3c7eb1';
|
|
479
651
|
constructor(layer) {
|
|
480
652
|
super();
|
|
481
653
|
this.layer = layer;
|
|
482
654
|
}
|
|
483
|
-
get id() {
|
|
484
|
-
return RemoveLayerCommand.ID;
|
|
485
|
-
}
|
|
486
655
|
}
|
|
487
656
|
|
|
488
657
|
class AddTileCommand extends PostboyGenericMessage {
|
|
489
658
|
layer;
|
|
490
|
-
static ID = '25b7df28-72ce-4453-9fe6-54285a2fdc57';
|
|
491
659
|
constructor(layer) {
|
|
492
660
|
super();
|
|
493
661
|
this.layer = layer;
|
|
494
662
|
}
|
|
495
|
-
get id() {
|
|
496
|
-
return AddTileCommand.ID;
|
|
497
|
-
}
|
|
498
663
|
}
|
|
499
664
|
|
|
500
665
|
class RemoveTileCommand extends PostboyGenericMessage {
|
|
501
666
|
layer;
|
|
502
|
-
static ID = 'c36ccc0b-5638-4819-b148-2de57a59a5b7';
|
|
503
667
|
constructor(layer) {
|
|
504
668
|
super();
|
|
505
669
|
this.layer = layer;
|
|
506
670
|
}
|
|
507
|
-
get id() {
|
|
508
|
-
return RemoveTileCommand.ID;
|
|
509
|
-
}
|
|
510
671
|
}
|
|
511
672
|
|
|
512
673
|
class FitToFeaturesCommand extends PostboyGenericMessage {
|
|
513
674
|
features;
|
|
514
675
|
zoomAfter;
|
|
515
|
-
static ID = '76cdc091-3793-4b6c-82f7-1e0334cf08a8';
|
|
516
676
|
constructor(features, zoomAfter = 0) {
|
|
517
677
|
super();
|
|
518
678
|
this.features = features;
|
|
519
679
|
this.zoomAfter = zoomAfter;
|
|
520
680
|
}
|
|
521
|
-
get id() {
|
|
522
|
-
return FitToFeaturesCommand.ID;
|
|
523
|
-
}
|
|
524
681
|
}
|
|
525
682
|
|
|
526
683
|
class GetLayerQuery extends PostboyCallbackMessage {
|
|
527
684
|
name;
|
|
528
|
-
static ID = '5c04c87b-8a93-4c2a-979e-d1e313d860ed';
|
|
529
685
|
constructor(name) {
|
|
530
686
|
super();
|
|
531
687
|
this.name = name;
|
|
532
688
|
}
|
|
533
|
-
get id() {
|
|
534
|
-
return GetLayerQuery.ID;
|
|
535
|
-
}
|
|
536
689
|
}
|
|
537
690
|
|
|
538
691
|
class DrawingFinishedEvent extends PostboyGenericMessage {
|
|
539
|
-
static ID = 'c724b68e-b4eb-4783-90f1-a8e31973fd36';
|
|
540
|
-
constructor() {
|
|
541
|
-
super();
|
|
542
|
-
}
|
|
543
|
-
get id() {
|
|
544
|
-
return DrawingFinishedEvent.ID;
|
|
545
|
-
}
|
|
546
692
|
}
|
|
547
693
|
|
|
548
694
|
class DrawingGenerationService {
|
|
@@ -572,6 +718,9 @@ class FeatureService {
|
|
|
572
718
|
static filterFeaturesInArea(query) {
|
|
573
719
|
return query.features.filter((f) => FeatureService.booleanIntersects(query.area, f.getGeometry()));
|
|
574
720
|
}
|
|
721
|
+
static filterFeaturesInPoint(query) {
|
|
722
|
+
return query.features.filter((f) => FeatureService.booleanIntersects(f.getGeometry(), new Point([query.lng, query.lat])));
|
|
723
|
+
}
|
|
575
724
|
static calculateArea(g) {
|
|
576
725
|
if (!g)
|
|
577
726
|
return 0;
|
|
@@ -592,28 +741,20 @@ class GenerateDrawExecutor extends PostboyExecutor {
|
|
|
592
741
|
layer;
|
|
593
742
|
style;
|
|
594
743
|
type;
|
|
595
|
-
static ID = 'f01c99ba-0953-4ab5-82f9-04e6fbb678c1';
|
|
596
744
|
constructor(layer, style, type) {
|
|
597
745
|
super();
|
|
598
746
|
this.layer = layer;
|
|
599
747
|
this.style = style;
|
|
600
748
|
this.type = type;
|
|
601
749
|
}
|
|
602
|
-
get id() {
|
|
603
|
-
return GenerateDrawExecutor.ID;
|
|
604
|
-
}
|
|
605
750
|
}
|
|
606
751
|
|
|
607
752
|
class GenerateZoomControlExecutor extends PostboyExecutor {
|
|
608
753
|
settings;
|
|
609
|
-
static ID = 'ff16a833-c68e-4b1a-bc23-c0d16b002810';
|
|
610
754
|
constructor(settings) {
|
|
611
755
|
super();
|
|
612
756
|
this.settings = settings;
|
|
613
757
|
}
|
|
614
|
-
get id() {
|
|
615
|
-
return GenerateZoomControlExecutor.ID;
|
|
616
|
-
}
|
|
617
758
|
}
|
|
618
759
|
|
|
619
760
|
class ZoomControlFactory {
|
|
@@ -631,7 +772,11 @@ class ZoomControlFactory {
|
|
|
631
772
|
class MapPostboyService extends PostboyService {
|
|
632
773
|
constructor() {
|
|
633
774
|
super();
|
|
634
|
-
this.addLocker({
|
|
775
|
+
this.addLocker({
|
|
776
|
+
locker: StartDrawingCommand.name,
|
|
777
|
+
unlocker: DrawingFinishedEvent.name,
|
|
778
|
+
locking: [MapClickEvent.name],
|
|
779
|
+
});
|
|
635
780
|
}
|
|
636
781
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: MapPostboyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
637
782
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: MapPostboyService });
|
|
@@ -656,31 +801,32 @@ class MapManagementService {
|
|
|
656
801
|
this.observeRemoveTile();
|
|
657
802
|
this.observeLayerQuery();
|
|
658
803
|
this.observeFeaturesInArea();
|
|
804
|
+
this.observeFeaturesInPoint();
|
|
659
805
|
}
|
|
660
806
|
observeRemoveTile() {
|
|
661
|
-
this.postboy.
|
|
807
|
+
this.postboy.sub(RemoveTileCommand).subscribe((c) => {
|
|
662
808
|
if (!this.map)
|
|
663
809
|
return;
|
|
664
810
|
this.map.removeLayer(c.layer);
|
|
665
811
|
});
|
|
666
812
|
}
|
|
667
813
|
observeLayerQuery() {
|
|
668
|
-
this.postboy.
|
|
814
|
+
this.postboy.sub(GetLayerQuery).subscribe((ev) => ev.finish(this.layers.take(ev.name)));
|
|
669
815
|
}
|
|
670
816
|
observeAddTile() {
|
|
671
|
-
this.postboy.
|
|
817
|
+
this.postboy.sub(AddTileCommand).subscribe((c) => {
|
|
672
818
|
if (!this.map)
|
|
673
819
|
return;
|
|
674
820
|
this.map.addLayer(c.layer);
|
|
675
821
|
});
|
|
676
822
|
}
|
|
677
823
|
observeMapRender() {
|
|
678
|
-
this.postboy.
|
|
824
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
679
825
|
this.map = m.map;
|
|
680
826
|
});
|
|
681
827
|
}
|
|
682
828
|
observeAddLayer() {
|
|
683
|
-
this.postboy.
|
|
829
|
+
this.postboy.sub(AddLayerCommand).subscribe((c) => {
|
|
684
830
|
if (!this.map)
|
|
685
831
|
return;
|
|
686
832
|
this.layers.put(c.layer.get('name'), c.layer);
|
|
@@ -688,7 +834,7 @@ class MapManagementService {
|
|
|
688
834
|
});
|
|
689
835
|
}
|
|
690
836
|
observePlaceFeatures() {
|
|
691
|
-
this.postboy.
|
|
837
|
+
this.postboy.sub(PlaceLayerFeaturesCommand).subscribe((c) => {
|
|
692
838
|
if (!this.layers.has(c.layer))
|
|
693
839
|
return;
|
|
694
840
|
let source = this.layers.take(c.layer).getSource();
|
|
@@ -699,7 +845,7 @@ class MapManagementService {
|
|
|
699
845
|
});
|
|
700
846
|
}
|
|
701
847
|
observeRemoveLayer() {
|
|
702
|
-
this.postboy.
|
|
848
|
+
this.postboy.sub(RemoveLayerCommand).subscribe((c) => {
|
|
703
849
|
if (!this.map)
|
|
704
850
|
return;
|
|
705
851
|
this.layers.rmv(c.layer.get('name'));
|
|
@@ -707,21 +853,36 @@ class MapManagementService {
|
|
|
707
853
|
});
|
|
708
854
|
}
|
|
709
855
|
observeFeaturesInArea() {
|
|
710
|
-
this.postboy.
|
|
856
|
+
this.postboy.sub(GetFeaturesInAreaQuery).subscribe((qr) => {
|
|
711
857
|
let result = new Dictionary();
|
|
712
|
-
this.
|
|
713
|
-
let
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
858
|
+
this.forEachLayer((l, s) => {
|
|
859
|
+
let features = this.postboy.exec(new FilterFeaturesInAreaExecutor(qr.area, s?.getFeatures() ?? []));
|
|
860
|
+
result.put(l.get('name'), features.map((e) => ({ id: e.getId(), ...e.get(MapConstants.FeatureInfo) })));
|
|
861
|
+
}, qr.ignore);
|
|
862
|
+
qr.finish(result);
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
observeFeaturesInPoint() {
|
|
866
|
+
this.postboy.sub(GetFeaturesInPointQuery).subscribe((qr) => {
|
|
867
|
+
let result = new Dictionary();
|
|
868
|
+
this.forEachLayer((l, s) => {
|
|
869
|
+
let features = this.postboy.exec(new FilterFeaturesInPointExecutor(qr.lat, qr.lng, s?.getFeatures() ?? []));
|
|
870
|
+
result.put(l.get('name'), features.map((e) => ({ id: e.getId(), ...e.get(MapConstants.FeatureInfo) })));
|
|
871
|
+
}, qr.ignore);
|
|
722
872
|
qr.finish(result);
|
|
723
873
|
});
|
|
724
874
|
}
|
|
875
|
+
forEachLayer(action, ignore) {
|
|
876
|
+
this.layers.forEach((l) => {
|
|
877
|
+
let layerName = l.get('name');
|
|
878
|
+
if (ignore.has(layerName) || layerName === MapConstants.DrawingLayerId)
|
|
879
|
+
return;
|
|
880
|
+
let source = l.getSource();
|
|
881
|
+
if (!!source['getSource'])
|
|
882
|
+
source = source?.getSource();
|
|
883
|
+
action(l, source);
|
|
884
|
+
});
|
|
885
|
+
}
|
|
725
886
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: MapManagementService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
726
887
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: MapManagementService });
|
|
727
888
|
}
|
|
@@ -749,7 +910,7 @@ class MapStateService {
|
|
|
749
910
|
}
|
|
750
911
|
observeMapRendering() {
|
|
751
912
|
this.postboy
|
|
752
|
-
.
|
|
913
|
+
.sub(MapRenderedEvent)
|
|
753
914
|
.pipe(first())
|
|
754
915
|
.subscribe((ev) => {
|
|
755
916
|
this.map = ev.map;
|
|
@@ -759,7 +920,7 @@ class MapStateService {
|
|
|
759
920
|
});
|
|
760
921
|
}
|
|
761
922
|
observeCenter() {
|
|
762
|
-
this.postboy.
|
|
923
|
+
this.postboy.sub(SetMapCenterCommand).subscribe((c) => {
|
|
763
924
|
this.map?.getView().setCenter([c.lng, c.lat]);
|
|
764
925
|
if (c.zoom)
|
|
765
926
|
this.map?.getView().setZoom(c.zoom);
|
|
@@ -785,19 +946,19 @@ class MapFeatureService {
|
|
|
785
946
|
this.observeFitToPolygons();
|
|
786
947
|
}
|
|
787
948
|
observeMapRender() {
|
|
788
|
-
this.postboy.
|
|
949
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
789
950
|
this.map = m.map;
|
|
790
951
|
if (this.fitPolygonsWaiting)
|
|
791
952
|
this.postboy.fire(this.fitPolygonsWaiting);
|
|
792
953
|
});
|
|
793
954
|
}
|
|
794
955
|
observeFitToFeatures() {
|
|
795
|
-
this.postboy.
|
|
956
|
+
this.postboy.sub(FitToFeaturesCommand).subscribe((cmd) => {
|
|
796
957
|
this.fitToGeometries(cmd.features.map((f) => f.getGeometry()), cmd.zoomAfter);
|
|
797
958
|
});
|
|
798
959
|
}
|
|
799
960
|
observeFitToPolygons() {
|
|
800
|
-
this.postboy.
|
|
961
|
+
this.postboy.sub(FitToPolygonsCommand).subscribe((cmd) => {
|
|
801
962
|
if (!this.map) {
|
|
802
963
|
this.fitPolygonsWaiting = cmd;
|
|
803
964
|
return;
|
|
@@ -848,7 +1009,7 @@ class MapClickService {
|
|
|
848
1009
|
return model;
|
|
849
1010
|
}
|
|
850
1011
|
observeMapRender() {
|
|
851
|
-
this.postboy.
|
|
1012
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
852
1013
|
this.map = m.map;
|
|
853
1014
|
this.map?.on('singleclick', (e) => {
|
|
854
1015
|
this.postboy.fire(this.onClick(e));
|
|
@@ -883,30 +1044,26 @@ class DrawingService {
|
|
|
883
1044
|
this.observeMapRender();
|
|
884
1045
|
}
|
|
885
1046
|
observeSelectArea() {
|
|
886
|
-
this.postboy.
|
|
887
|
-
|
|
888
|
-
drawingCommand.result.subscribe((r) => {
|
|
1047
|
+
this.postboy.sub(DrawSelectionAreaCommand).subscribe((ev) => {
|
|
1048
|
+
this.postboy.fireCallback(new StartDrawingCommand(ev.type, ev.style), (r) => {
|
|
889
1049
|
if (!r) {
|
|
890
1050
|
ev.finish(new Dictionary());
|
|
891
1051
|
return;
|
|
892
1052
|
}
|
|
893
1053
|
const area = PolygonModel.fromGeoJson(1, r).feature.getGeometry();
|
|
894
|
-
|
|
895
|
-
getFeaturesCommand.result.subscribe((result) => ev.finish(result));
|
|
896
|
-
this.postboy.fire(getFeaturesCommand);
|
|
1054
|
+
this.postboy.fireCallback(new GetFeaturesInAreaQuery(area, ev.ignore), (result) => ev.finish(result));
|
|
897
1055
|
});
|
|
898
|
-
this.postboy.fire(drawingCommand);
|
|
899
1056
|
});
|
|
900
1057
|
}
|
|
901
1058
|
observeDrawing() {
|
|
902
|
-
this.postboy.
|
|
1059
|
+
this.postboy.sub(StartDrawingCommand).subscribe((ev) => {
|
|
903
1060
|
this.draw((l) => {
|
|
904
1061
|
if (!l || !this.map) {
|
|
905
1062
|
this.clearInteraction(l);
|
|
906
1063
|
return;
|
|
907
1064
|
}
|
|
908
1065
|
const cancelSub = this.observeCancelation(ev, l);
|
|
909
|
-
this.drawInteraction = this.postboy.
|
|
1066
|
+
this.drawInteraction = this.postboy.exec(new GenerateDrawExecutor(l, ev.style, ev.type));
|
|
910
1067
|
this.map?.addInteraction(this.drawInteraction);
|
|
911
1068
|
this.drawInteraction.on('drawend', (evt) => {
|
|
912
1069
|
cancelSub.unsubscribe();
|
|
@@ -922,18 +1079,16 @@ class DrawingService {
|
|
|
922
1079
|
this.clearInteraction(layer);
|
|
923
1080
|
}
|
|
924
1081
|
observeMapRender() {
|
|
925
|
-
this.postboy.
|
|
1082
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
926
1083
|
this.map = m.map;
|
|
927
1084
|
});
|
|
928
1085
|
}
|
|
929
1086
|
draw(action) {
|
|
930
|
-
|
|
931
|
-
query.result.subscribe((l) => action(l));
|
|
932
|
-
this.postboy.fire(query);
|
|
1087
|
+
this.postboy.fireCallback(new GetLayerQuery(MapConstants.DrawingLayerId), (l) => action(l));
|
|
933
1088
|
}
|
|
934
1089
|
observeCancelation(ev, layer) {
|
|
935
1090
|
return this.postboy
|
|
936
|
-
.
|
|
1091
|
+
.sub(CancelDrawingCommand)
|
|
937
1092
|
.pipe(first())
|
|
938
1093
|
.subscribe(() => {
|
|
939
1094
|
ev.finish(null);
|
|
@@ -967,7 +1122,7 @@ class FeatureModificationService {
|
|
|
967
1122
|
this.observeMapRender();
|
|
968
1123
|
}
|
|
969
1124
|
observeModification() {
|
|
970
|
-
this.postboy.
|
|
1125
|
+
this.postboy.sub(ModifyFeatureCommand).subscribe((ev) => {
|
|
971
1126
|
this.defineLayer((l) => {
|
|
972
1127
|
if (!l || !this.map) {
|
|
973
1128
|
this.clearInteraction(l);
|
|
@@ -1013,18 +1168,16 @@ class FeatureModificationService {
|
|
|
1013
1168
|
: new WKT().writeFeature(command.model.feature));
|
|
1014
1169
|
}
|
|
1015
1170
|
observeMapRender() {
|
|
1016
|
-
this.postboy.
|
|
1171
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
1017
1172
|
this.map = m.map;
|
|
1018
1173
|
});
|
|
1019
1174
|
}
|
|
1020
1175
|
defineLayer(action) {
|
|
1021
|
-
|
|
1022
|
-
query.result.subscribe((l) => action(l));
|
|
1023
|
-
this.postboy.fire(query);
|
|
1176
|
+
this.postboy.fireCallback(new GetLayerQuery(MapConstants.DrawingLayerId), (l) => action(l));
|
|
1024
1177
|
}
|
|
1025
1178
|
observeCancelation(ev, layer) {
|
|
1026
1179
|
return this.postboy
|
|
1027
|
-
.
|
|
1180
|
+
.sub(CancelFeatureModificationCommand)
|
|
1028
1181
|
.pipe(first())
|
|
1029
1182
|
.subscribe(() => {
|
|
1030
1183
|
ev.finish(null);
|
|
@@ -1055,7 +1208,7 @@ class ControlsService {
|
|
|
1055
1208
|
}
|
|
1056
1209
|
observeMapRender() {
|
|
1057
1210
|
this.postboy
|
|
1058
|
-
.
|
|
1211
|
+
.sub(MapRenderedEvent)
|
|
1059
1212
|
.pipe(first())
|
|
1060
1213
|
.subscribe((m) => {
|
|
1061
1214
|
this.map = m.map;
|
|
@@ -1064,12 +1217,10 @@ class ControlsService {
|
|
|
1064
1217
|
});
|
|
1065
1218
|
}
|
|
1066
1219
|
observeAdding() {
|
|
1067
|
-
this.postboy.
|
|
1220
|
+
this.postboy.sub(AddControlCommand).subscribe((c) => this.map?.addControl(c.item));
|
|
1068
1221
|
}
|
|
1069
1222
|
observeRemoving() {
|
|
1070
|
-
this.postboy
|
|
1071
|
-
.subscribe(RemoveControlCommand.ID)
|
|
1072
|
-
.subscribe((c) => this.map?.removeControl(c.item));
|
|
1223
|
+
this.postboy.sub(RemoveControlCommand).subscribe((c) => this.map?.removeControl(c.item));
|
|
1073
1224
|
}
|
|
1074
1225
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ControlsService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1075
1226
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: ControlsService });
|
|
@@ -1086,36 +1237,38 @@ class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
|
1086
1237
|
this.registerServices([management, state, interaction, mapFeature, drawing, featureModification, controls]);
|
|
1087
1238
|
}
|
|
1088
1239
|
_up() {
|
|
1089
|
-
this.
|
|
1090
|
-
this.
|
|
1091
|
-
this.
|
|
1092
|
-
this.
|
|
1093
|
-
this.
|
|
1094
|
-
this.
|
|
1095
|
-
this.
|
|
1096
|
-
this.
|
|
1097
|
-
this.
|
|
1098
|
-
this.
|
|
1099
|
-
this.
|
|
1100
|
-
this.
|
|
1101
|
-
this.
|
|
1102
|
-
this.
|
|
1103
|
-
this.
|
|
1104
|
-
this.
|
|
1105
|
-
this.
|
|
1106
|
-
this.
|
|
1107
|
-
this.
|
|
1108
|
-
this.
|
|
1109
|
-
this.
|
|
1110
|
-
this.
|
|
1240
|
+
this.recordReplay(MapRenderedEvent);
|
|
1241
|
+
this.recordReplay(PlaceLayerFeaturesCommand);
|
|
1242
|
+
this.recordReplay(RemoveControlCommand);
|
|
1243
|
+
this.recordReplay(AddControlCommand);
|
|
1244
|
+
this.recordReplay(SetMapCenterCommand);
|
|
1245
|
+
this.recordSubject(AddLayerCommand);
|
|
1246
|
+
this.recordSubject(RemoveLayerCommand);
|
|
1247
|
+
this.recordSubject(AddTileCommand);
|
|
1248
|
+
this.recordSubject(RemoveTileCommand);
|
|
1249
|
+
this.recordSubject(MapClickEvent);
|
|
1250
|
+
this.recordSubject(CloseTooltipCommand);
|
|
1251
|
+
this.recordSubject(FitToFeaturesCommand);
|
|
1252
|
+
this.recordSubject(FitToPolygonsCommand);
|
|
1253
|
+
this.recordSubject(MapMoveEndEvent);
|
|
1254
|
+
this.recordSubject(CancelDrawingCommand);
|
|
1255
|
+
this.recordSubject(StartDrawingCommand);
|
|
1256
|
+
this.recordSubject(GetLayerQuery);
|
|
1257
|
+
this.recordSubject(DrawingFinishedEvent);
|
|
1258
|
+
this.recordSubject(GetFeaturesInAreaQuery);
|
|
1259
|
+
this.recordSubject(DrawSelectionAreaCommand);
|
|
1260
|
+
this.recordSubject(CancelFeatureModificationCommand);
|
|
1261
|
+
this.recordSubject(ModifyFeatureCommand);
|
|
1262
|
+
this.recordSubject(GetFeaturesInPointQuery);
|
|
1111
1263
|
this.setExecutors();
|
|
1112
1264
|
}
|
|
1113
1265
|
setExecutors() {
|
|
1114
|
-
this.
|
|
1115
|
-
this.
|
|
1116
|
-
this.
|
|
1117
|
-
this.
|
|
1118
|
-
this.
|
|
1266
|
+
this.recordExecutor(FilterFeaturesInAreaExecutor, (e) => FeatureService.filterFeaturesInArea(e));
|
|
1267
|
+
this.recordExecutor(FilterFeaturesInPointExecutor, (e) => FeatureService.filterFeaturesInPoint(e));
|
|
1268
|
+
this.recordExecutor(CalculateAreaExecutor, (e) => FeatureService.calculateArea(e.polygon?.feature?.getGeometry()));
|
|
1269
|
+
this.recordExecutor(GenerateDrawExecutor, (e) => DrawingGenerationService.getDraw(e));
|
|
1270
|
+
this.recordExecutor(GenerateZoomControlExecutor, (e) => ZoomControlFactory.build(e.settings));
|
|
1271
|
+
this.recordExecutor(GetMapPositionExecutor, () => this.state.getMapPosition());
|
|
1119
1272
|
}
|
|
1120
1273
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", 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 });
|
|
1121
1274
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: MessageRegistratorService });
|
|
@@ -1344,7 +1497,7 @@ class TileLayerComponent extends DestructibleComponent {
|
|
|
1344
1497
|
}
|
|
1345
1498
|
ngOnInit() {
|
|
1346
1499
|
this.postboy
|
|
1347
|
-
.
|
|
1500
|
+
.sub(MapRenderedEvent)
|
|
1348
1501
|
.pipe(filter((m) => !!m), first())
|
|
1349
1502
|
.subscribe((m) => this.initLayer());
|
|
1350
1503
|
}
|
|
@@ -1573,7 +1726,7 @@ class FeatureLayerComponent extends DestructibleComponent {
|
|
|
1573
1726
|
}
|
|
1574
1727
|
ngOnInit() {
|
|
1575
1728
|
this.postboy
|
|
1576
|
-
.
|
|
1729
|
+
.sub(MapRenderedEvent)
|
|
1577
1730
|
.pipe(filter((m) => !!m), first())
|
|
1578
1731
|
.subscribe((m) => this.initLayer());
|
|
1579
1732
|
}
|
|
@@ -1754,14 +1907,14 @@ class ClusterLayerManager {
|
|
|
1754
1907
|
}
|
|
1755
1908
|
observeMapMovement() {
|
|
1756
1909
|
combineLatest([
|
|
1757
|
-
this.postboy.
|
|
1758
|
-
this.postboy.
|
|
1910
|
+
this.postboy.sub(MapMoveEndEvent).pipe(auditTime(250)),
|
|
1911
|
+
this.postboy.sub(MapRenderedEvent),
|
|
1759
1912
|
]).subscribe(([movement, renderEvent]) => {
|
|
1760
1913
|
this.checkClusterNecessity(renderEvent.map);
|
|
1761
1914
|
});
|
|
1762
1915
|
}
|
|
1763
1916
|
observeClick() {
|
|
1764
|
-
this.postboy.
|
|
1917
|
+
this.postboy.sub(MapClickEvent).subscribe((m) => {
|
|
1765
1918
|
if ((m.features[this.settings.name]?.length ?? 0) > 1) {
|
|
1766
1919
|
this.postboy.fire(new FitToFeaturesCommand(m.features[this.settings.name], -1));
|
|
1767
1920
|
}
|
|
@@ -1850,7 +2003,7 @@ class ClusterLayerComponent extends DestructibleComponent {
|
|
|
1850
2003
|
}
|
|
1851
2004
|
ngOnInit() {
|
|
1852
2005
|
this.postboy
|
|
1853
|
-
.
|
|
2006
|
+
.sub(MapRenderedEvent)
|
|
1854
2007
|
.pipe(filter((m) => !!m), first())
|
|
1855
2008
|
.subscribe((m) => this.initLayer());
|
|
1856
2009
|
}
|
|
@@ -1999,7 +2152,7 @@ class MarkersComponent extends DestructibleComponent {
|
|
|
1999
2152
|
}
|
|
2000
2153
|
ngOnInit() {
|
|
2001
2154
|
this.postboy
|
|
2002
|
-
.
|
|
2155
|
+
.sub(MapRenderedEvent)
|
|
2003
2156
|
.pipe(filter((m) => !!m), first())
|
|
2004
2157
|
.subscribe(() => this.putMarkers());
|
|
2005
2158
|
}
|
|
@@ -2090,18 +2243,18 @@ class TooltipComponent extends DestructibleComponent {
|
|
|
2090
2243
|
};
|
|
2091
2244
|
};
|
|
2092
2245
|
observeMapClick() {
|
|
2093
|
-
return this.postboy.
|
|
2246
|
+
return this.postboy.sub(MapClickEvent).subscribe((ev) => {
|
|
2094
2247
|
this._settings.show(ev) ? this.addOverlay(ev.coordinates) : this.removeOverlay();
|
|
2095
2248
|
});
|
|
2096
2249
|
}
|
|
2097
2250
|
observeClose() {
|
|
2098
2251
|
return this.postboy
|
|
2099
|
-
.
|
|
2252
|
+
.sub(CloseTooltipCommand)
|
|
2100
2253
|
.pipe(filter((ev) => ev.tooltipId === this._settings.id))
|
|
2101
2254
|
.subscribe(() => this.removeOverlay());
|
|
2102
2255
|
}
|
|
2103
2256
|
observeMapRender() {
|
|
2104
|
-
return this.postboy.
|
|
2257
|
+
return this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
2105
2258
|
this.map = m.map;
|
|
2106
2259
|
});
|
|
2107
2260
|
}
|
|
@@ -2146,7 +2299,7 @@ class PolygonsComponent extends DestructibleComponent {
|
|
|
2146
2299
|
}
|
|
2147
2300
|
ngOnInit() {
|
|
2148
2301
|
this.postboy
|
|
2149
|
-
.
|
|
2302
|
+
.sub(MapRenderedEvent)
|
|
2150
2303
|
.pipe(filter((m) => !!m), first())
|
|
2151
2304
|
.subscribe(() => this.putPolygons());
|
|
2152
2305
|
}
|
|
@@ -2317,7 +2470,7 @@ class MapControlZoomComponent extends DestructibleComponent {
|
|
|
2317
2470
|
}
|
|
2318
2471
|
ngOnInit() {
|
|
2319
2472
|
this.postboy
|
|
2320
|
-
.
|
|
2473
|
+
.sub(MapRenderedEvent)
|
|
2321
2474
|
.pipe(filter((m) => !!m), first())
|
|
2322
2475
|
.subscribe((m) => {
|
|
2323
2476
|
this.map = m.map;
|
|
@@ -2330,7 +2483,7 @@ class MapControlZoomComponent extends DestructibleComponent {
|
|
|
2330
2483
|
setControl() {
|
|
2331
2484
|
if (!this.map)
|
|
2332
2485
|
return;
|
|
2333
|
-
this.control = this.postboy.
|
|
2486
|
+
this.control = this.postboy.exec(new GenerateZoomControlExecutor(this._settings));
|
|
2334
2487
|
this.map.addControl(this.control);
|
|
2335
2488
|
}
|
|
2336
2489
|
eliminate = () => !!this.map && !!this.control && this.map.removeControl(this.control);
|
|
@@ -2586,5 +2739,5 @@ class StringifyFeatureHelper {
|
|
|
2586
2739
|
* Generated bundle index. Do not edit.
|
|
2587
2740
|
*/
|
|
2588
2741
|
|
|
2589
|
-
export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FitToPolygonsCommand, GetFeaturesInAreaQuery, 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 };
|
|
2742
|
+
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 };
|
|
2590
2743
|
//# sourceMappingURL=maps-components-src-map.mjs.map
|