@artstesh/maps 4.1.13 → 4.1.15
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/esm2020/map/map-plate/controls/map-control-zoom/map-control-zoom.component.mjs +3 -3
- package/dist/esm2020/map/map-plate/features/markers/markers.component.mjs +2 -2
- package/dist/esm2020/map/map-plate/features/polygons/polygons.component.mjs +2 -2
- package/dist/esm2020/map/map-plate/layers/cluster-layer/cluster-layer.component.mjs +2 -2
- package/dist/esm2020/map/map-plate/layers/cluster-layer/cluster-layer.manager.mjs +4 -4
- package/dist/esm2020/map/map-plate/layers/feature-layer/feature-layer.component.mjs +2 -2
- package/dist/esm2020/map/map-plate/layers/tile-layer/tile-layer.component.mjs +2 -2
- package/dist/esm2020/map/map-plate/tooltips/tooltip/tooltip.component.mjs +4 -4
- package/dist/esm2020/map/messages/commands/add-control.command.mjs +9 -5
- package/dist/esm2020/map/messages/commands/add-layer.command.mjs +1 -5
- package/dist/esm2020/map/messages/commands/add-tile.command.mjs +1 -5
- package/dist/esm2020/map/messages/commands/cancel-drawing.command.mjs +4 -5
- package/dist/esm2020/map/messages/commands/cancel-feature-modification.command.mjs +4 -5
- package/dist/esm2020/map/messages/commands/close-tooltip.command.mjs +9 -5
- package/dist/esm2020/map/messages/commands/draw-selection-area.command.mjs +13 -5
- package/dist/esm2020/map/messages/commands/fit-to-features.command.mjs +1 -5
- package/dist/esm2020/map/messages/commands/fit-to-polygons.command.mjs +11 -5
- package/dist/esm2020/map/messages/commands/modify-feature.command.mjs +14 -5
- package/dist/esm2020/map/messages/commands/place-layer-features.command.mjs +1 -5
- package/dist/esm2020/map/messages/commands/remove-control.command.mjs +14 -5
- package/dist/esm2020/map/messages/commands/remove-layer.command.mjs +1 -5
- package/dist/esm2020/map/messages/commands/remove-tile.command.mjs +1 -5
- package/dist/esm2020/map/messages/commands/set-map-center.command.mjs +1 -5
- package/dist/esm2020/map/messages/commands/start-drawing.command.mjs +11 -5
- package/dist/esm2020/map/messages/events/drawing-finished.event.mjs +1 -8
- package/dist/esm2020/map/messages/events/map-click.event.mjs +14 -5
- package/dist/esm2020/map/messages/events/map-move-end.event.mjs +7 -5
- package/dist/esm2020/map/messages/events/map-rendered.event.mjs +9 -5
- package/dist/esm2020/map/messages/executors/calculate-area.executor.mjs +8 -5
- package/dist/esm2020/map/messages/executors/filter-features-in-area.executor.mjs +9 -5
- package/dist/esm2020/map/messages/executors/filter-features-in-point.executor.mjs +24 -0
- package/dist/esm2020/map/messages/executors/generate-draw.executor.mjs +1 -5
- package/dist/esm2020/map/messages/executors/generate-zoom-control.executor.mjs +1 -5
- package/dist/esm2020/map/messages/executors/get-map-position.executor.mjs +1 -4
- package/dist/esm2020/map/messages/index.mjs +9 -7
- package/dist/esm2020/map/messages/queries/get-features-in-area.query.mjs +11 -5
- package/dist/esm2020/map/messages/queries/get-features-in-point.query.mjs +21 -0
- package/dist/esm2020/map/messages/queries/get-layer.query.mjs +1 -5
- package/dist/esm2020/map/models/drawing-type.enum.mjs +14 -1
- package/dist/esm2020/map/models/feature-format.enum.mjs +9 -1
- package/dist/esm2020/map/models/map-position.model.mjs +1 -1
- package/dist/esm2020/map/models/map-settings.mjs +47 -1
- package/dist/esm2020/map/services/controls/controls.service.mjs +4 -6
- package/dist/esm2020/map/services/drawing/drawing.service.mjs +9 -15
- package/dist/esm2020/map/services/drawing/feature-modification.service.mjs +5 -7
- package/dist/esm2020/map/services/feature.service.mjs +5 -1
- package/dist/esm2020/map/services/map-click.service.mjs +2 -2
- package/dist/esm2020/map/services/map-feature.service.mjs +4 -4
- package/dist/esm2020/map/services/map-management.service.mjs +36 -20
- package/dist/esm2020/map/services/map-postboy.service.mjs +6 -2
- package/dist/esm2020/map/services/map-state.service.mjs +3 -3
- package/dist/esm2020/map/services/message-registrator.service.mjs +32 -29
- package/dist/esm2020/src/map/map-plate/controls/map-control-zoom/map-control-zoom.component.mjs +3 -3
- package/dist/esm2020/src/map/map-plate/features/markers/markers.component.mjs +2 -2
- package/dist/esm2020/src/map/map-plate/features/polygons/polygons.component.mjs +2 -2
- package/dist/esm2020/src/map/map-plate/layers/cluster-layer/cluster-layer.component.mjs +2 -2
- package/dist/esm2020/src/map/map-plate/layers/cluster-layer/cluster-layer.manager.mjs +4 -4
- package/dist/esm2020/src/map/map-plate/layers/feature-layer/feature-layer.component.mjs +2 -2
- package/dist/esm2020/src/map/map-plate/layers/tile-layer/tile-layer.component.mjs +2 -2
- package/dist/esm2020/src/map/map-plate/tooltips/tooltip/tooltip.component.mjs +4 -4
- package/dist/esm2020/src/map/messages/commands/add-control.command.mjs +9 -5
- package/dist/esm2020/src/map/messages/commands/add-layer.command.mjs +1 -5
- package/dist/esm2020/src/map/messages/commands/add-tile.command.mjs +1 -5
- package/dist/esm2020/src/map/messages/commands/cancel-drawing.command.mjs +4 -5
- package/dist/esm2020/src/map/messages/commands/cancel-feature-modification.command.mjs +4 -5
- package/dist/esm2020/src/map/messages/commands/close-tooltip.command.mjs +9 -5
- package/dist/esm2020/src/map/messages/commands/draw-selection-area.command.mjs +13 -5
- package/dist/esm2020/src/map/messages/commands/fit-to-features.command.mjs +1 -5
- package/dist/esm2020/src/map/messages/commands/fit-to-polygons.command.mjs +11 -5
- package/dist/esm2020/src/map/messages/commands/modify-feature.command.mjs +14 -5
- package/dist/esm2020/src/map/messages/commands/place-layer-features.command.mjs +1 -5
- package/dist/esm2020/src/map/messages/commands/remove-control.command.mjs +14 -5
- package/dist/esm2020/src/map/messages/commands/remove-layer.command.mjs +1 -5
- package/dist/esm2020/src/map/messages/commands/remove-tile.command.mjs +1 -5
- package/dist/esm2020/src/map/messages/commands/set-map-center.command.mjs +1 -5
- package/dist/esm2020/src/map/messages/commands/start-drawing.command.mjs +11 -5
- package/dist/esm2020/src/map/messages/events/drawing-finished.event.mjs +1 -8
- package/dist/esm2020/src/map/messages/events/map-click.event.mjs +14 -5
- package/dist/esm2020/src/map/messages/events/map-move-end.event.mjs +7 -5
- package/dist/esm2020/src/map/messages/events/map-rendered.event.mjs +9 -5
- package/dist/esm2020/src/map/messages/executors/calculate-area.executor.mjs +8 -5
- package/dist/esm2020/src/map/messages/executors/filter-features-in-area.executor.mjs +9 -5
- package/dist/esm2020/src/map/messages/executors/filter-features-in-point.executor.mjs +24 -0
- package/dist/esm2020/src/map/messages/executors/generate-draw.executor.mjs +1 -5
- package/dist/esm2020/src/map/messages/executors/generate-zoom-control.executor.mjs +1 -5
- package/dist/esm2020/src/map/messages/executors/get-map-position.executor.mjs +1 -4
- package/dist/esm2020/src/map/messages/index.mjs +9 -7
- package/dist/esm2020/src/map/messages/queries/get-features-in-area.query.mjs +11 -5
- package/dist/esm2020/src/map/messages/queries/get-features-in-point.query.mjs +21 -0
- package/dist/esm2020/src/map/messages/queries/get-layer.query.mjs +1 -5
- package/dist/esm2020/src/map/models/drawing-type.enum.mjs +14 -1
- package/dist/esm2020/src/map/models/feature-format.enum.mjs +9 -1
- package/dist/esm2020/src/map/models/map-position.model.mjs +1 -1
- package/dist/esm2020/src/map/models/map-settings.mjs +47 -1
- package/dist/esm2020/src/map/services/controls/controls.service.mjs +4 -6
- package/dist/esm2020/src/map/services/drawing/drawing.service.mjs +9 -15
- package/dist/esm2020/src/map/services/drawing/feature-modification.service.mjs +5 -7
- package/dist/esm2020/src/map/services/feature.service.mjs +5 -1
- package/dist/esm2020/src/map/services/map-click.service.mjs +2 -2
- package/dist/esm2020/src/map/services/map-feature.service.mjs +4 -4
- package/dist/esm2020/src/map/services/map-management.service.mjs +36 -20
- package/dist/esm2020/src/map/services/map-postboy.service.mjs +6 -2
- package/dist/esm2020/src/map/services/map-state.service.mjs +3 -3
- package/dist/esm2020/src/map/services/message-registrator.service.mjs +32 -29
- package/dist/fesm2015/maps-components-src-map.mjs +405 -257
- package/dist/fesm2015/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2015/maps-components.mjs +405 -257
- package/dist/fesm2015/maps-components.mjs.map +1 -1
- package/dist/fesm2020/maps-components-src-map.mjs +404 -257
- package/dist/fesm2020/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2020/maps-components.mjs +404 -257
- package/dist/fesm2020/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/package.json +1 -1
- 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
|
@@ -65,6 +65,10 @@ MapLyrsLabel.lyrs = {
|
|
|
65
65
|
[MapLyrs.Terrain]: 'p',
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Represents the configurable settings for a map instance, providing
|
|
70
|
+
* options for center coordinates, zoom levels, map layers, and language.
|
|
71
|
+
*/
|
|
68
72
|
class MapSettings {
|
|
69
73
|
constructor() {
|
|
70
74
|
this.center = [0, 0];
|
|
@@ -84,24 +88,66 @@ class MapSettings {
|
|
|
84
88
|
result.language = model.language;
|
|
85
89
|
return result;
|
|
86
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Sets the center for the map settings.
|
|
93
|
+
*
|
|
94
|
+
* @param {number[]} center - A two-element array representing the latitude and longitude of the map's center.
|
|
95
|
+
* @return {MapSettings} A new MapSettings object with the updated center.
|
|
96
|
+
*/
|
|
87
97
|
setCenter(center) {
|
|
88
98
|
return MapSettings.copy({ ...this, center });
|
|
89
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Sets the maximum zoom level for the map.
|
|
102
|
+
*
|
|
103
|
+
* @param {number} maxZoom - The maximum zoom level to be set.
|
|
104
|
+
* @return {MapSettings} A new instance of MapSettings with the updated maximum zoom level.
|
|
105
|
+
*/
|
|
90
106
|
setMaxZoom(maxZoom) {
|
|
91
107
|
return MapSettings.copy({ ...this, maxZoom });
|
|
92
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Sets the minimum zoom level for the map settings.
|
|
111
|
+
*
|
|
112
|
+
* @param {number} minZoom The minimum zoom level to be set. Must be a valid numeric value.
|
|
113
|
+
* @return {MapSettings} A new MapSettings object with the updated minimum zoom level.
|
|
114
|
+
*/
|
|
93
115
|
setMinZoom(minZoom) {
|
|
94
116
|
return MapSettings.copy({ ...this, minZoom });
|
|
95
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Adjusts the zoom level of the map by setting the specified value.
|
|
120
|
+
*
|
|
121
|
+
* @param {number} zoom - The desired zoom level to be set.
|
|
122
|
+
* @return {MapSettings} A new MapSettings instance with the updated zoom level.
|
|
123
|
+
*/
|
|
96
124
|
setZoom(zoom) {
|
|
97
125
|
return MapSettings.copy({ ...this, zoom });
|
|
98
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Sets the layers in the map settings with the provided layers.
|
|
129
|
+
*
|
|
130
|
+
* @param {MapLyrs} lyrs - The layers to be set in the map settings.
|
|
131
|
+
* @return {MapSettings} A new instance of MapSettings with the updated layers.
|
|
132
|
+
*/
|
|
99
133
|
setLyrs(lyrs) {
|
|
100
134
|
return MapSettings.copy({ ...this, lyrs });
|
|
101
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Updates the language setting for the map configuration and returns a new instance with the updated language.
|
|
138
|
+
*
|
|
139
|
+
* @param {string} language - The language to be set for the map configuration.
|
|
140
|
+
* @return {MapSettings} A new instance of MapSettings with the updated language.
|
|
141
|
+
*/
|
|
102
142
|
setLanguage(language) {
|
|
103
143
|
return MapSettings.copy({ ...this, language });
|
|
104
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Compares the current MapSettings instance with another to determine if they are identical.
|
|
147
|
+
*
|
|
148
|
+
* @param {MapSettings} model - The MapSettings instance to compare with the current instance.
|
|
149
|
+
* @return {boolean} Returns true if both MapSettings instances have the same properties and values; otherwise, false.
|
|
150
|
+
*/
|
|
105
151
|
isSame(model) {
|
|
106
152
|
if (this.maxZoom !== model.maxZoom)
|
|
107
153
|
return false;
|
|
@@ -180,6 +226,19 @@ class PolygonModel {
|
|
|
180
226
|
}
|
|
181
227
|
}
|
|
182
228
|
|
|
229
|
+
/**
|
|
230
|
+
* Enum representing various drawing types.
|
|
231
|
+
*
|
|
232
|
+
* This enumeration is used to define the types of drawable shapes
|
|
233
|
+
* within a specific drawing context. Each member corresponds to
|
|
234
|
+
* a specific type of drawing.
|
|
235
|
+
*
|
|
236
|
+
* Members:
|
|
237
|
+
* - `Polygon`: Represents a polygonal shape (e.g., triangle, pentagon, etc.).
|
|
238
|
+
* - `Circle`: Represents a circular shape.
|
|
239
|
+
* - `Square`: Represents a square shape.
|
|
240
|
+
* - `Box`: Represents a rectangular box shape.
|
|
241
|
+
*/
|
|
183
242
|
var DrawingType;
|
|
184
243
|
(function (DrawingType) {
|
|
185
244
|
DrawingType[DrawingType["Polygon"] = 1] = "Polygon";
|
|
@@ -188,6 +247,14 @@ var DrawingType;
|
|
|
188
247
|
DrawingType[DrawingType["Box"] = 4] = "Box";
|
|
189
248
|
})(DrawingType || (DrawingType = {}));
|
|
190
249
|
|
|
250
|
+
/**
|
|
251
|
+
* An enumeration representing different formats for feature outputs.
|
|
252
|
+
* This can be used to specify the desired output format when dealing with geospatial data.
|
|
253
|
+
*
|
|
254
|
+
* Enumerators:
|
|
255
|
+
* - GeoJson: Represents the GeoJSON format for geospatial data.
|
|
256
|
+
* - WKT: Represents the Well-Known Text (WKT) format for geospatial data.
|
|
257
|
+
*/
|
|
191
258
|
var FeatureOutputFormat;
|
|
192
259
|
(function (FeatureOutputFormat) {
|
|
193
260
|
FeatureOutputFormat[FeatureOutputFormat["GeoJson"] = 1] = "GeoJson";
|
|
@@ -208,126 +275,129 @@ class MapControl extends Control {
|
|
|
208
275
|
}
|
|
209
276
|
}
|
|
210
277
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
class MapClickEvent extends PostboyGenericMessage {
|
|
223
|
-
constructor(coordinates, entities, features) {
|
|
224
|
-
super();
|
|
225
|
-
this.coordinates = coordinates;
|
|
226
|
-
this.entities = entities;
|
|
227
|
-
this.features = features;
|
|
228
|
-
}
|
|
229
|
-
get id() {
|
|
230
|
-
return MapClickEvent.ID;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
MapClickEvent.ID = '323df526-8d9c-49c6-83e8-6e9a1e7762f7';
|
|
234
|
-
|
|
235
|
-
class MapMoveEndEvent extends PostboyGenericMessage {
|
|
236
|
-
constructor(position) {
|
|
278
|
+
/**
|
|
279
|
+
* Represents a command to add a custom control to a map.
|
|
280
|
+
*/
|
|
281
|
+
class AddControlCommand extends PostboyGenericMessage {
|
|
282
|
+
/**
|
|
283
|
+
* Creates an instance of the class with the specified MapControl object.
|
|
284
|
+
*
|
|
285
|
+
* @param {MapControl} item - The MapControl object to be associated with the instance.
|
|
286
|
+
*/
|
|
287
|
+
constructor(item) {
|
|
237
288
|
super();
|
|
238
|
-
this.
|
|
239
|
-
}
|
|
240
|
-
get id() {
|
|
241
|
-
return MapMoveEndEvent.ID;
|
|
289
|
+
this.item = item;
|
|
242
290
|
}
|
|
243
|
-
}
|
|
244
|
-
MapMoveEndEvent.ID = 'f21f783e-b5af-4489-9fec-8027fd07a8ad';
|
|
291
|
+
}
|
|
245
292
|
|
|
293
|
+
/**
|
|
294
|
+
* A command class that represents the action to close a tooltip.
|
|
295
|
+
*/
|
|
246
296
|
class CloseTooltipCommand extends PostboyGenericMessage {
|
|
297
|
+
/**
|
|
298
|
+
* Creates an instance of the class with the specified tooltip ID.
|
|
299
|
+
*
|
|
300
|
+
* @param {string} tooltipId - The unique identifier for the tooltip.
|
|
301
|
+
*/
|
|
247
302
|
constructor(tooltipId) {
|
|
248
303
|
super();
|
|
249
304
|
this.tooltipId = tooltipId;
|
|
250
305
|
}
|
|
251
|
-
|
|
252
|
-
return CloseTooltipCommand.ID;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
CloseTooltipCommand.ID = '4896d52c-e34f-4994-bcfd-32832d12dbe4';
|
|
306
|
+
}
|
|
256
307
|
|
|
308
|
+
/**
|
|
309
|
+
* Represents a command to start a drawing operation.
|
|
310
|
+
*/
|
|
257
311
|
class StartDrawingCommand extends PostboyCallbackMessage {
|
|
312
|
+
/**
|
|
313
|
+
* Constructor for creating an instance of the class that represents a drawing feature with specific type, style, and output format.
|
|
314
|
+
*
|
|
315
|
+
* @param {DrawingType} type - The type of the drawing to be created.
|
|
316
|
+
* @param {Style} style - The style defining visual appearance of the drawing.
|
|
317
|
+
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The format of the feature output. Defaults to GeoJson.
|
|
318
|
+
*/
|
|
258
319
|
constructor(type, style, format = FeatureOutputFormat.GeoJson) {
|
|
259
320
|
super();
|
|
260
321
|
this.type = type;
|
|
261
322
|
this.style = style;
|
|
262
323
|
this.format = format;
|
|
263
324
|
}
|
|
264
|
-
|
|
265
|
-
return StartDrawingCommand.ID;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
StartDrawingCommand.ID = 'da904f4b-a1c8-4db7-a6af-14d9ee18ec8c';
|
|
325
|
+
}
|
|
269
326
|
|
|
327
|
+
/**
|
|
328
|
+
* Represents a command to cancel a drawing action.
|
|
329
|
+
*/
|
|
270
330
|
class CancelDrawingCommand extends PostboyGenericMessage {
|
|
271
|
-
|
|
272
|
-
return CancelDrawingCommand.ID;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
CancelDrawingCommand.ID = '7d38d983-feba-4176-a66b-18175e5ecd6b';
|
|
331
|
+
}
|
|
276
332
|
|
|
333
|
+
/**
|
|
334
|
+
* Class representing a command to draw a selection area with a specific type and style.
|
|
335
|
+
*
|
|
336
|
+
* @return {Dictionary<IIdentified[]>} - a collection of features inside the selected area, grouped by a layer's name
|
|
337
|
+
*/
|
|
277
338
|
class DrawSelectionAreaCommand extends PostboyCallbackMessage {
|
|
339
|
+
/**
|
|
340
|
+
* Constructs a new instance with the specified type, style, and optional set of ignored items.
|
|
341
|
+
*
|
|
342
|
+
* @param {DrawingType} type - The type of drawing to be created.
|
|
343
|
+
* @param {Style} style - The style information for the drawing.
|
|
344
|
+
* @param {Set<string>} [ignore=new Set<string>()] - Optional set of items to be ignored.
|
|
345
|
+
*/
|
|
278
346
|
constructor(type, style, ignore = new Set()) {
|
|
279
347
|
super();
|
|
280
348
|
this.type = type;
|
|
281
349
|
this.style = style;
|
|
282
350
|
this.ignore = ignore;
|
|
283
351
|
}
|
|
284
|
-
|
|
285
|
-
return DrawSelectionAreaCommand.ID;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
DrawSelectionAreaCommand.ID = '573d8a0d-f25b-42b7-9ad7-0ac6d86ac362';
|
|
352
|
+
}
|
|
289
353
|
|
|
354
|
+
/**
|
|
355
|
+
* Represents a command to modify a feature with a specific style and output format
|
|
356
|
+
* for a polygonal model.
|
|
357
|
+
*
|
|
358
|
+
* @return {string | null} a string representation of the modified feature in the appropriate format
|
|
359
|
+
*/
|
|
290
360
|
class ModifyFeatureCommand extends PostboyCallbackMessage {
|
|
361
|
+
/**
|
|
362
|
+
* Constructs an instance of the class.
|
|
363
|
+
*
|
|
364
|
+
* @param {PolygonModel} model - The polygon model to be used.
|
|
365
|
+
* @param {Style} style - The style configuration for the polygon.
|
|
366
|
+
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the features. Default is GeoJson.
|
|
367
|
+
*/
|
|
291
368
|
constructor(model, style, format = FeatureOutputFormat.GeoJson) {
|
|
292
369
|
super();
|
|
293
370
|
this.model = model;
|
|
294
371
|
this.style = style;
|
|
295
372
|
this.format = format;
|
|
296
373
|
}
|
|
297
|
-
|
|
298
|
-
return ModifyFeatureCommand.ID;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
ModifyFeatureCommand.ID = 'ead85caa-24c6-4844-a68c-2cea91774c8c';
|
|
374
|
+
}
|
|
302
375
|
|
|
376
|
+
/**
|
|
377
|
+
* Represents a command to cancel a feature modification.
|
|
378
|
+
*/
|
|
303
379
|
class CancelFeatureModificationCommand extends PostboyGenericMessage {
|
|
304
|
-
|
|
305
|
-
return CancelFeatureModificationCommand.ID;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
CancelFeatureModificationCommand.ID = '9c9fb40f-ea95-4704-8177-0e9ecabf36fa';
|
|
309
|
-
|
|
310
|
-
class AddControlCommand extends PostboyGenericMessage {
|
|
311
|
-
constructor(item) {
|
|
312
|
-
super();
|
|
313
|
-
this.item = item;
|
|
314
|
-
}
|
|
315
|
-
get id() {
|
|
316
|
-
return AddControlCommand.ID;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
AddControlCommand.ID = '8e1c06eb-b395-4fe1-929c-ebf0805eeb49';
|
|
380
|
+
}
|
|
320
381
|
|
|
382
|
+
/**
|
|
383
|
+
* Represents a command to remove a map control from the map.
|
|
384
|
+
*
|
|
385
|
+
* The command is identified by a unique static ID, and it requires a MapControl item
|
|
386
|
+
* to specify the control to be removed.
|
|
387
|
+
*
|
|
388
|
+
* @extends PostboyGenericMessage
|
|
389
|
+
*/
|
|
321
390
|
class RemoveControlCommand extends PostboyGenericMessage {
|
|
391
|
+
/**
|
|
392
|
+
* Constructs an instance of the class.
|
|
393
|
+
*
|
|
394
|
+
* @param {MapControl} item - The map control instance to be removed.
|
|
395
|
+
*/
|
|
322
396
|
constructor(item) {
|
|
323
397
|
super();
|
|
324
398
|
this.item = item;
|
|
325
399
|
}
|
|
326
|
-
|
|
327
|
-
return RemoveControlCommand.ID;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
RemoveControlCommand.ID = '361641e0-804a-4930-8c27-0cea6330dbfc';
|
|
400
|
+
}
|
|
331
401
|
|
|
332
402
|
/**
|
|
333
403
|
* Forces map to move to a specific point
|
|
@@ -345,34 +415,128 @@ class SetMapCenterCommand extends PostboyGenericMessage {
|
|
|
345
415
|
this.lng = lng;
|
|
346
416
|
this.zoom = zoom;
|
|
347
417
|
}
|
|
348
|
-
|
|
349
|
-
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* FitToPolygonsCommand is a command used to fit a given set of polygon features
|
|
422
|
+
* to the viewable area, optionally applying a zoom transformation afterwards.
|
|
423
|
+
*/
|
|
424
|
+
class FitToPolygonsCommand extends PostboyGenericMessage {
|
|
425
|
+
/**
|
|
426
|
+
* Creates an instance of the class with specified polygon features and an optional zoom level.
|
|
427
|
+
*
|
|
428
|
+
* @param {PolygonModel[]} features - An array of polygon models to fit to.
|
|
429
|
+
* @param {number} [zoomAfter=0] - Optional zoom level change to apply after initialization. Defaults to 0.
|
|
430
|
+
*/
|
|
431
|
+
constructor(features, zoomAfter = 0) {
|
|
432
|
+
super();
|
|
433
|
+
this.features = features;
|
|
434
|
+
this.zoomAfter = zoomAfter;
|
|
350
435
|
}
|
|
351
|
-
}
|
|
352
|
-
SetMapCenterCommand.ID = 'd50e89c9-6707-4f8c-ab57-65fcef232182';
|
|
436
|
+
}
|
|
353
437
|
|
|
354
|
-
|
|
355
|
-
|
|
438
|
+
/**
|
|
439
|
+
* Represents an event triggered when a map rendering process is completed.
|
|
440
|
+
*/
|
|
441
|
+
class MapRenderedEvent extends PostboyGenericMessage {
|
|
442
|
+
/**
|
|
443
|
+
* Constructor for creating an instance of the class.
|
|
444
|
+
*
|
|
445
|
+
* @param {Map} map - The map instance to be used by the class.
|
|
446
|
+
*/
|
|
447
|
+
constructor(map) {
|
|
356
448
|
super();
|
|
357
|
-
this.
|
|
449
|
+
this.map = map;
|
|
358
450
|
}
|
|
359
|
-
|
|
360
|
-
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Represents an event triggered by a click on a map, containing information about the
|
|
455
|
+
* click's location, relevant entities, and features present at the clicked position.
|
|
456
|
+
*
|
|
457
|
+
* @extends {PostboyGenericMessage}
|
|
458
|
+
*/
|
|
459
|
+
class MapClickEvent extends PostboyGenericMessage {
|
|
460
|
+
/**
|
|
461
|
+
* Creates an instance of this class with the provided coordinates, entities, and features.
|
|
462
|
+
*
|
|
463
|
+
* @param {number[]} coordinates - An array representing the coordinates.
|
|
464
|
+
* @param {{ [layer: string]: IIdentified[] }} entities - A mapping of layer names to arrays of IIdentified entities.
|
|
465
|
+
* @param {{ [layer: string]: Feature<Geometry>[] }} features - A mapping of layer names to arrays of features with geometry.
|
|
466
|
+
*/
|
|
467
|
+
constructor(coordinates, entities, features) {
|
|
468
|
+
super();
|
|
469
|
+
this.coordinates = coordinates;
|
|
470
|
+
this.entities = entities;
|
|
471
|
+
this.features = features;
|
|
361
472
|
}
|
|
362
|
-
}
|
|
363
|
-
CalculateAreaExecutor.ID = '172ecf46-86b5-4f46-a5f1-96ba2cbb1694';
|
|
473
|
+
}
|
|
364
474
|
|
|
365
|
-
|
|
366
|
-
|
|
475
|
+
/**
|
|
476
|
+
* Represents an event that is triggered when the movement of a map ends.
|
|
477
|
+
* This class is used to capture the final position of a map after a movement operation.
|
|
478
|
+
*
|
|
479
|
+
* @property {MapPosition | null} position - The final position of the map after movement ends. Can be null.
|
|
480
|
+
*/
|
|
481
|
+
class MapMoveEndEvent extends PostboyGenericMessage {
|
|
482
|
+
constructor(position) {
|
|
367
483
|
super();
|
|
484
|
+
this.position = position;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* A class responsible for executing filtering of geographical features
|
|
490
|
+
* based on a specific geographical point (latitude and longitude).
|
|
491
|
+
*
|
|
492
|
+
* @template Feature - A geographical feature that is processed by the executor.
|
|
493
|
+
* @template Geometry - The type of geometry associated with the feature.
|
|
494
|
+
*/
|
|
495
|
+
class FilterFeaturesInPointExecutor extends PostboyExecutor {
|
|
496
|
+
/**
|
|
497
|
+
* Constructs a new instance with the specified latitude, longitude, and features.
|
|
498
|
+
*
|
|
499
|
+
* @param {number} lat - The latitude coordinate.
|
|
500
|
+
* @param {number} lng - The longitude coordinate.
|
|
501
|
+
* @param {Feature<Geometry>[]} features - The array of features associated with the location.
|
|
502
|
+
*/
|
|
503
|
+
constructor(lat, lng, features) {
|
|
504
|
+
super();
|
|
505
|
+
this.lat = lat;
|
|
506
|
+
this.lng = lng;
|
|
368
507
|
this.features = features;
|
|
369
|
-
this.zoomAfter = zoomAfter;
|
|
370
508
|
}
|
|
371
|
-
|
|
372
|
-
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* A class that extends the PostboyExecutor to filter geographical features within a specified area.
|
|
513
|
+
* This class is designed to process a list of input features and determine which of them are located inside the provided area geometry.
|
|
514
|
+
*
|
|
515
|
+
* Parameters:
|
|
516
|
+
* - `area`: A Geometry object defining the area to filter geographical features.
|
|
517
|
+
* - `features`: An array of geographical features, represented as `Feature<Geometry>` objects, to be filtered by their presence within the specified area.
|
|
518
|
+
*/
|
|
519
|
+
class FilterFeaturesInAreaExecutor extends PostboyExecutor {
|
|
520
|
+
constructor(area, features) {
|
|
521
|
+
super();
|
|
522
|
+
this.area = area;
|
|
523
|
+
this.features = features;
|
|
373
524
|
}
|
|
374
|
-
}
|
|
375
|
-
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* An executor responsible for calculating the area of a given polygon.
|
|
529
|
+
*
|
|
530
|
+
* Use this class to manage and execute area-calculation logic for a polygon.
|
|
531
|
+
*
|
|
532
|
+
* @return {number} - the spherical area (in square meters)
|
|
533
|
+
*/
|
|
534
|
+
class CalculateAreaExecutor extends PostboyExecutor {
|
|
535
|
+
constructor(polygon) {
|
|
536
|
+
super();
|
|
537
|
+
this.polygon = polygon;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
376
540
|
|
|
377
541
|
/**
|
|
378
542
|
* A message that allows to get the current state of the map.
|
|
@@ -380,49 +544,56 @@ FitToPolygonsCommand.ID = 'a9e42b23-ffaf-4c46-8370-e0432cd14d60';
|
|
|
380
544
|
* @returns {MapPosition | null}
|
|
381
545
|
*/
|
|
382
546
|
class GetMapPositionExecutor extends PostboyExecutor {
|
|
383
|
-
get id() {
|
|
384
|
-
return GetMapPositionExecutor.ID;
|
|
385
|
-
}
|
|
386
547
|
constructor() {
|
|
387
548
|
super();
|
|
388
549
|
}
|
|
389
550
|
}
|
|
390
551
|
GetMapPositionExecutor.ID = '52c95689-d09b-4082-ba58-9183ea96a213';
|
|
391
552
|
|
|
553
|
+
/**
|
|
554
|
+
* Class representing a query to get features within a specified geographical area.
|
|
555
|
+
* The query optionally takes a set of layer names to ignore during the operation.
|
|
556
|
+
*/
|
|
392
557
|
class GetFeaturesInAreaQuery extends PostboyCallbackMessage {
|
|
558
|
+
/**
|
|
559
|
+
* Constructor to initialize the object with a Geometry instance and an optional set of strings to ignore.
|
|
560
|
+
*
|
|
561
|
+
* @param {Geometry} area - The Geometry object used to define the area.
|
|
562
|
+
* @param {Set<string>} [ignore] - An optional set of layer names that will be ignored. Defaults to an empty set.
|
|
563
|
+
*/
|
|
393
564
|
constructor(area, ignore = new Set()) {
|
|
394
565
|
super();
|
|
395
566
|
this.area = area;
|
|
396
567
|
this.ignore = ignore;
|
|
397
568
|
}
|
|
398
|
-
|
|
399
|
-
return GetFeaturesInAreaQuery.ID;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
GetFeaturesInAreaQuery.ID = 'efcf4271-a07a-40e0-9f02-d4dade40b8ac';
|
|
569
|
+
}
|
|
403
570
|
|
|
404
|
-
|
|
405
|
-
|
|
571
|
+
/**
|
|
572
|
+
* Represents a query to retrieve features located at a specific geographical point.
|
|
573
|
+
* The query is defined by latitude, longitude, and an optional set of features to ignore.
|
|
574
|
+
*/
|
|
575
|
+
class GetFeaturesInPointQuery extends PostboyCallbackMessage {
|
|
576
|
+
/**
|
|
577
|
+
* Constructor for initializing a geographic coordinate object.
|
|
578
|
+
*
|
|
579
|
+
* @param {number} lat - The latitude of the location.
|
|
580
|
+
* @param {number} lng - The longitude of the location.
|
|
581
|
+
* @param {Set<string>} [ignore=new Set<string>()] - An optional set of strings to ignore during processing.
|
|
582
|
+
*/
|
|
583
|
+
constructor(lat, lng, ignore = new Set()) {
|
|
406
584
|
super();
|
|
407
|
-
this.
|
|
408
|
-
this.
|
|
409
|
-
|
|
410
|
-
get id() {
|
|
411
|
-
return FilterFeaturesInAreaExecutor.ID;
|
|
585
|
+
this.lat = lat;
|
|
586
|
+
this.lng = lng;
|
|
587
|
+
this.ignore = ignore;
|
|
412
588
|
}
|
|
413
|
-
}
|
|
414
|
-
FilterFeaturesInAreaExecutor.ID = '36bb2d94-8028-4512-90dd-2386af3fc67c';
|
|
589
|
+
}
|
|
415
590
|
|
|
416
591
|
class AddLayerCommand extends PostboyGenericMessage {
|
|
417
592
|
constructor(layer) {
|
|
418
593
|
super();
|
|
419
594
|
this.layer = layer;
|
|
420
595
|
}
|
|
421
|
-
|
|
422
|
-
return AddLayerCommand.ID;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
AddLayerCommand.ID = 'd93e250f-92bc-43ac-9c6a-46c521a1aaa5';
|
|
596
|
+
}
|
|
426
597
|
|
|
427
598
|
class PlaceLayerFeaturesCommand extends PostboyGenericMessage {
|
|
428
599
|
constructor(layer, features) {
|
|
@@ -430,44 +601,28 @@ class PlaceLayerFeaturesCommand extends PostboyGenericMessage {
|
|
|
430
601
|
this.layer = layer;
|
|
431
602
|
this.features = features;
|
|
432
603
|
}
|
|
433
|
-
|
|
434
|
-
return PlaceLayerFeaturesCommand.ID;
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
PlaceLayerFeaturesCommand.ID = '8caf86bc-869b-426f-b36d-4642f6b8aab0';
|
|
604
|
+
}
|
|
438
605
|
|
|
439
606
|
class RemoveLayerCommand extends PostboyGenericMessage {
|
|
440
607
|
constructor(layer) {
|
|
441
608
|
super();
|
|
442
609
|
this.layer = layer;
|
|
443
610
|
}
|
|
444
|
-
|
|
445
|
-
return RemoveLayerCommand.ID;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
RemoveLayerCommand.ID = 'ab484e0e-e185-45cd-8434-12101f3c7eb1';
|
|
611
|
+
}
|
|
449
612
|
|
|
450
613
|
class AddTileCommand extends PostboyGenericMessage {
|
|
451
614
|
constructor(layer) {
|
|
452
615
|
super();
|
|
453
616
|
this.layer = layer;
|
|
454
617
|
}
|
|
455
|
-
|
|
456
|
-
return AddTileCommand.ID;
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
AddTileCommand.ID = '25b7df28-72ce-4453-9fe6-54285a2fdc57';
|
|
618
|
+
}
|
|
460
619
|
|
|
461
620
|
class RemoveTileCommand extends PostboyGenericMessage {
|
|
462
621
|
constructor(layer) {
|
|
463
622
|
super();
|
|
464
623
|
this.layer = layer;
|
|
465
624
|
}
|
|
466
|
-
|
|
467
|
-
return RemoveTileCommand.ID;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
RemoveTileCommand.ID = 'c36ccc0b-5638-4819-b148-2de57a59a5b7';
|
|
625
|
+
}
|
|
471
626
|
|
|
472
627
|
class FitToFeaturesCommand extends PostboyGenericMessage {
|
|
473
628
|
constructor(features, zoomAfter = 0) {
|
|
@@ -475,32 +630,17 @@ class FitToFeaturesCommand extends PostboyGenericMessage {
|
|
|
475
630
|
this.features = features;
|
|
476
631
|
this.zoomAfter = zoomAfter;
|
|
477
632
|
}
|
|
478
|
-
|
|
479
|
-
return FitToFeaturesCommand.ID;
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
FitToFeaturesCommand.ID = '76cdc091-3793-4b6c-82f7-1e0334cf08a8';
|
|
633
|
+
}
|
|
483
634
|
|
|
484
635
|
class GetLayerQuery extends PostboyCallbackMessage {
|
|
485
636
|
constructor(name) {
|
|
486
637
|
super();
|
|
487
638
|
this.name = name;
|
|
488
639
|
}
|
|
489
|
-
|
|
490
|
-
return GetLayerQuery.ID;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
GetLayerQuery.ID = '5c04c87b-8a93-4c2a-979e-d1e313d860ed';
|
|
640
|
+
}
|
|
494
641
|
|
|
495
642
|
class DrawingFinishedEvent extends PostboyGenericMessage {
|
|
496
|
-
|
|
497
|
-
super();
|
|
498
|
-
}
|
|
499
|
-
get id() {
|
|
500
|
-
return DrawingFinishedEvent.ID;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
DrawingFinishedEvent.ID = 'c724b68e-b4eb-4783-90f1-a8e31973fd36';
|
|
643
|
+
}
|
|
504
644
|
|
|
505
645
|
class DrawingGenerationService {
|
|
506
646
|
static getDraw(ev) {
|
|
@@ -529,6 +669,9 @@ class FeatureService {
|
|
|
529
669
|
static filterFeaturesInArea(query) {
|
|
530
670
|
return query.features.filter((f) => FeatureService.booleanIntersects(query.area, f.getGeometry()));
|
|
531
671
|
}
|
|
672
|
+
static filterFeaturesInPoint(query) {
|
|
673
|
+
return query.features.filter((f) => FeatureService.booleanIntersects(f.getGeometry(), new Point([query.lng, query.lat])));
|
|
674
|
+
}
|
|
532
675
|
static calculateArea(g) {
|
|
533
676
|
if (!g)
|
|
534
677
|
return 0;
|
|
@@ -552,22 +695,14 @@ class GenerateDrawExecutor extends PostboyExecutor {
|
|
|
552
695
|
this.style = style;
|
|
553
696
|
this.type = type;
|
|
554
697
|
}
|
|
555
|
-
|
|
556
|
-
return GenerateDrawExecutor.ID;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
GenerateDrawExecutor.ID = 'f01c99ba-0953-4ab5-82f9-04e6fbb678c1';
|
|
698
|
+
}
|
|
560
699
|
|
|
561
700
|
class GenerateZoomControlExecutor extends PostboyExecutor {
|
|
562
701
|
constructor(settings) {
|
|
563
702
|
super();
|
|
564
703
|
this.settings = settings;
|
|
565
704
|
}
|
|
566
|
-
|
|
567
|
-
return GenerateZoomControlExecutor.ID;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
GenerateZoomControlExecutor.ID = 'ff16a833-c68e-4b1a-bc23-c0d16b002810';
|
|
705
|
+
}
|
|
571
706
|
|
|
572
707
|
class ZoomControlFactory {
|
|
573
708
|
static build(settings) {
|
|
@@ -584,7 +719,11 @@ class ZoomControlFactory {
|
|
|
584
719
|
class MapPostboyService extends PostboyService {
|
|
585
720
|
constructor() {
|
|
586
721
|
super();
|
|
587
|
-
this.addLocker({
|
|
722
|
+
this.addLocker({
|
|
723
|
+
locker: StartDrawingCommand.name,
|
|
724
|
+
unlocker: DrawingFinishedEvent.name,
|
|
725
|
+
locking: [MapClickEvent.name],
|
|
726
|
+
});
|
|
588
727
|
}
|
|
589
728
|
}
|
|
590
729
|
MapPostboyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapPostboyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -607,31 +746,32 @@ class MapManagementService {
|
|
|
607
746
|
this.observeRemoveTile();
|
|
608
747
|
this.observeLayerQuery();
|
|
609
748
|
this.observeFeaturesInArea();
|
|
749
|
+
this.observeFeaturesInPoint();
|
|
610
750
|
}
|
|
611
751
|
observeRemoveTile() {
|
|
612
|
-
this.postboy.
|
|
752
|
+
this.postboy.sub(RemoveTileCommand).subscribe((c) => {
|
|
613
753
|
if (!this.map)
|
|
614
754
|
return;
|
|
615
755
|
this.map.removeLayer(c.layer);
|
|
616
756
|
});
|
|
617
757
|
}
|
|
618
758
|
observeLayerQuery() {
|
|
619
|
-
this.postboy.
|
|
759
|
+
this.postboy.sub(GetLayerQuery).subscribe((ev) => ev.finish(this.layers.take(ev.name)));
|
|
620
760
|
}
|
|
621
761
|
observeAddTile() {
|
|
622
|
-
this.postboy.
|
|
762
|
+
this.postboy.sub(AddTileCommand).subscribe((c) => {
|
|
623
763
|
if (!this.map)
|
|
624
764
|
return;
|
|
625
765
|
this.map.addLayer(c.layer);
|
|
626
766
|
});
|
|
627
767
|
}
|
|
628
768
|
observeMapRender() {
|
|
629
|
-
this.postboy.
|
|
769
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
630
770
|
this.map = m.map;
|
|
631
771
|
});
|
|
632
772
|
}
|
|
633
773
|
observeAddLayer() {
|
|
634
|
-
this.postboy.
|
|
774
|
+
this.postboy.sub(AddLayerCommand).subscribe((c) => {
|
|
635
775
|
if (!this.map)
|
|
636
776
|
return;
|
|
637
777
|
this.layers.put(c.layer.get('name'), c.layer);
|
|
@@ -639,7 +779,7 @@ class MapManagementService {
|
|
|
639
779
|
});
|
|
640
780
|
}
|
|
641
781
|
observePlaceFeatures() {
|
|
642
|
-
this.postboy.
|
|
782
|
+
this.postboy.sub(PlaceLayerFeaturesCommand).subscribe((c) => {
|
|
643
783
|
if (!this.layers.has(c.layer))
|
|
644
784
|
return;
|
|
645
785
|
let source = this.layers.take(c.layer).getSource();
|
|
@@ -650,7 +790,7 @@ class MapManagementService {
|
|
|
650
790
|
});
|
|
651
791
|
}
|
|
652
792
|
observeRemoveLayer() {
|
|
653
|
-
this.postboy.
|
|
793
|
+
this.postboy.sub(RemoveLayerCommand).subscribe((c) => {
|
|
654
794
|
if (!this.map)
|
|
655
795
|
return;
|
|
656
796
|
this.layers.rmv(c.layer.get('name'));
|
|
@@ -658,21 +798,36 @@ class MapManagementService {
|
|
|
658
798
|
});
|
|
659
799
|
}
|
|
660
800
|
observeFeaturesInArea() {
|
|
661
|
-
this.postboy.
|
|
801
|
+
this.postboy.sub(GetFeaturesInAreaQuery).subscribe((qr) => {
|
|
662
802
|
let result = new Dictionary();
|
|
663
|
-
this.
|
|
664
|
-
let
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
let source = l.getSource();
|
|
668
|
-
if (!!source['getSource'])
|
|
669
|
-
source = source?.getSource();
|
|
670
|
-
let features = this.postboy.execute(new FilterFeaturesInAreaExecutor(qr.area, source?.getFeatures() ?? []));
|
|
671
|
-
result.put(layerName, features.map((e) => ({ id: e.getId(), ...e.get(MapConstants.FeatureInfo) })));
|
|
672
|
-
});
|
|
803
|
+
this.forEachLayer((l, s) => {
|
|
804
|
+
let features = this.postboy.exec(new FilterFeaturesInAreaExecutor(qr.area, s?.getFeatures() ?? []));
|
|
805
|
+
result.put(l.get('name'), features.map((e) => ({ id: e.getId(), ...e.get(MapConstants.FeatureInfo) })));
|
|
806
|
+
}, qr.ignore);
|
|
673
807
|
qr.finish(result);
|
|
674
808
|
});
|
|
675
809
|
}
|
|
810
|
+
observeFeaturesInPoint() {
|
|
811
|
+
this.postboy.sub(GetFeaturesInPointQuery).subscribe((qr) => {
|
|
812
|
+
let result = new Dictionary();
|
|
813
|
+
this.forEachLayer((l, s) => {
|
|
814
|
+
let features = this.postboy.exec(new FilterFeaturesInPointExecutor(qr.lat, qr.lng, s?.getFeatures() ?? []));
|
|
815
|
+
result.put(l.get('name'), features.map((e) => ({ id: e.getId(), ...e.get(MapConstants.FeatureInfo) })));
|
|
816
|
+
}, qr.ignore);
|
|
817
|
+
qr.finish(result);
|
|
818
|
+
});
|
|
819
|
+
}
|
|
820
|
+
forEachLayer(action, ignore) {
|
|
821
|
+
this.layers.forEach((l) => {
|
|
822
|
+
let layerName = l.get('name');
|
|
823
|
+
if (ignore.has(layerName) || layerName === MapConstants.DrawingLayerId)
|
|
824
|
+
return;
|
|
825
|
+
let source = l.getSource();
|
|
826
|
+
if (!!source['getSource'])
|
|
827
|
+
source = source?.getSource();
|
|
828
|
+
action(l, source);
|
|
829
|
+
});
|
|
830
|
+
}
|
|
676
831
|
}
|
|
677
832
|
MapManagementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapManagementService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
678
833
|
MapManagementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapManagementService });
|
|
@@ -698,7 +853,7 @@ class MapStateService {
|
|
|
698
853
|
}
|
|
699
854
|
observeMapRendering() {
|
|
700
855
|
this.postboy
|
|
701
|
-
.
|
|
856
|
+
.sub(MapRenderedEvent)
|
|
702
857
|
.pipe(first())
|
|
703
858
|
.subscribe((ev) => {
|
|
704
859
|
this.map = ev.map;
|
|
@@ -708,7 +863,7 @@ class MapStateService {
|
|
|
708
863
|
});
|
|
709
864
|
}
|
|
710
865
|
observeCenter() {
|
|
711
|
-
this.postboy.
|
|
866
|
+
this.postboy.sub(SetMapCenterCommand).subscribe((c) => {
|
|
712
867
|
this.map?.getView().setCenter([c.lng, c.lat]);
|
|
713
868
|
if (c.zoom)
|
|
714
869
|
this.map?.getView().setZoom(c.zoom);
|
|
@@ -731,19 +886,19 @@ class MapFeatureService {
|
|
|
731
886
|
this.observeFitToPolygons();
|
|
732
887
|
}
|
|
733
888
|
observeMapRender() {
|
|
734
|
-
this.postboy.
|
|
889
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
735
890
|
this.map = m.map;
|
|
736
891
|
if (this.fitPolygonsWaiting)
|
|
737
892
|
this.postboy.fire(this.fitPolygonsWaiting);
|
|
738
893
|
});
|
|
739
894
|
}
|
|
740
895
|
observeFitToFeatures() {
|
|
741
|
-
this.postboy.
|
|
896
|
+
this.postboy.sub(FitToFeaturesCommand).subscribe((cmd) => {
|
|
742
897
|
this.fitToGeometries(cmd.features.map((f) => f.getGeometry()), cmd.zoomAfter);
|
|
743
898
|
});
|
|
744
899
|
}
|
|
745
900
|
observeFitToPolygons() {
|
|
746
|
-
this.postboy.
|
|
901
|
+
this.postboy.sub(FitToPolygonsCommand).subscribe((cmd) => {
|
|
747
902
|
if (!this.map) {
|
|
748
903
|
this.fitPolygonsWaiting = cmd;
|
|
749
904
|
return;
|
|
@@ -792,7 +947,7 @@ class MapClickService {
|
|
|
792
947
|
return model;
|
|
793
948
|
}
|
|
794
949
|
observeMapRender() {
|
|
795
|
-
this.postboy.
|
|
950
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
796
951
|
this.map = m.map;
|
|
797
952
|
this.map?.on('singleclick', (e) => {
|
|
798
953
|
this.postboy.fire(this.onClick(e));
|
|
@@ -824,30 +979,26 @@ class DrawingService {
|
|
|
824
979
|
this.observeMapRender();
|
|
825
980
|
}
|
|
826
981
|
observeSelectArea() {
|
|
827
|
-
this.postboy.
|
|
828
|
-
|
|
829
|
-
drawingCommand.result.subscribe((r) => {
|
|
982
|
+
this.postboy.sub(DrawSelectionAreaCommand).subscribe((ev) => {
|
|
983
|
+
this.postboy.fireCallback(new StartDrawingCommand(ev.type, ev.style), (r) => {
|
|
830
984
|
if (!r) {
|
|
831
985
|
ev.finish(new Dictionary());
|
|
832
986
|
return;
|
|
833
987
|
}
|
|
834
988
|
const area = PolygonModel.fromGeoJson(1, r).feature.getGeometry();
|
|
835
|
-
|
|
836
|
-
getFeaturesCommand.result.subscribe((result) => ev.finish(result));
|
|
837
|
-
this.postboy.fire(getFeaturesCommand);
|
|
989
|
+
this.postboy.fireCallback(new GetFeaturesInAreaQuery(area, ev.ignore), (result) => ev.finish(result));
|
|
838
990
|
});
|
|
839
|
-
this.postboy.fire(drawingCommand);
|
|
840
991
|
});
|
|
841
992
|
}
|
|
842
993
|
observeDrawing() {
|
|
843
|
-
this.postboy.
|
|
994
|
+
this.postboy.sub(StartDrawingCommand).subscribe((ev) => {
|
|
844
995
|
this.draw((l) => {
|
|
845
996
|
if (!l || !this.map) {
|
|
846
997
|
this.clearInteraction(l);
|
|
847
998
|
return;
|
|
848
999
|
}
|
|
849
1000
|
const cancelSub = this.observeCancelation(ev, l);
|
|
850
|
-
this.drawInteraction = this.postboy.
|
|
1001
|
+
this.drawInteraction = this.postboy.exec(new GenerateDrawExecutor(l, ev.style, ev.type));
|
|
851
1002
|
this.map?.addInteraction(this.drawInteraction);
|
|
852
1003
|
this.drawInteraction.on('drawend', (evt) => {
|
|
853
1004
|
cancelSub.unsubscribe();
|
|
@@ -863,18 +1014,16 @@ class DrawingService {
|
|
|
863
1014
|
this.clearInteraction(layer);
|
|
864
1015
|
}
|
|
865
1016
|
observeMapRender() {
|
|
866
|
-
this.postboy.
|
|
1017
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
867
1018
|
this.map = m.map;
|
|
868
1019
|
});
|
|
869
1020
|
}
|
|
870
1021
|
draw(action) {
|
|
871
|
-
|
|
872
|
-
query.result.subscribe((l) => action(l));
|
|
873
|
-
this.postboy.fire(query);
|
|
1022
|
+
this.postboy.fireCallback(new GetLayerQuery(MapConstants.DrawingLayerId), (l) => action(l));
|
|
874
1023
|
}
|
|
875
1024
|
observeCancelation(ev, layer) {
|
|
876
1025
|
return this.postboy
|
|
877
|
-
.
|
|
1026
|
+
.sub(CancelDrawingCommand)
|
|
878
1027
|
.pipe(first())
|
|
879
1028
|
.subscribe(() => {
|
|
880
1029
|
ev.finish(null);
|
|
@@ -904,7 +1053,7 @@ class FeatureModificationService {
|
|
|
904
1053
|
this.observeMapRender();
|
|
905
1054
|
}
|
|
906
1055
|
observeModification() {
|
|
907
|
-
this.postboy.
|
|
1056
|
+
this.postboy.sub(ModifyFeatureCommand).subscribe((ev) => {
|
|
908
1057
|
this.defineLayer((l) => {
|
|
909
1058
|
if (!l || !this.map) {
|
|
910
1059
|
this.clearInteraction(l);
|
|
@@ -950,18 +1099,16 @@ class FeatureModificationService {
|
|
|
950
1099
|
: new WKT().writeFeature(command.model.feature));
|
|
951
1100
|
}
|
|
952
1101
|
observeMapRender() {
|
|
953
|
-
this.postboy.
|
|
1102
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
954
1103
|
this.map = m.map;
|
|
955
1104
|
});
|
|
956
1105
|
}
|
|
957
1106
|
defineLayer(action) {
|
|
958
|
-
|
|
959
|
-
query.result.subscribe((l) => action(l));
|
|
960
|
-
this.postboy.fire(query);
|
|
1107
|
+
this.postboy.fireCallback(new GetLayerQuery(MapConstants.DrawingLayerId), (l) => action(l));
|
|
961
1108
|
}
|
|
962
1109
|
observeCancelation(ev, layer) {
|
|
963
1110
|
return this.postboy
|
|
964
|
-
.
|
|
1111
|
+
.sub(CancelFeatureModificationCommand)
|
|
965
1112
|
.pipe(first())
|
|
966
1113
|
.subscribe(() => {
|
|
967
1114
|
ev.finish(null);
|
|
@@ -990,7 +1137,7 @@ class ControlsService {
|
|
|
990
1137
|
}
|
|
991
1138
|
observeMapRender() {
|
|
992
1139
|
this.postboy
|
|
993
|
-
.
|
|
1140
|
+
.sub(MapRenderedEvent)
|
|
994
1141
|
.pipe(first())
|
|
995
1142
|
.subscribe((m) => {
|
|
996
1143
|
this.map = m.map;
|
|
@@ -999,12 +1146,10 @@ class ControlsService {
|
|
|
999
1146
|
});
|
|
1000
1147
|
}
|
|
1001
1148
|
observeAdding() {
|
|
1002
|
-
this.postboy.
|
|
1149
|
+
this.postboy.sub(AddControlCommand).subscribe((c) => this.map?.addControl(c.item));
|
|
1003
1150
|
}
|
|
1004
1151
|
observeRemoving() {
|
|
1005
|
-
this.postboy
|
|
1006
|
-
.subscribe(RemoveControlCommand.ID)
|
|
1007
|
-
.subscribe((c) => this.map?.removeControl(c.item));
|
|
1152
|
+
this.postboy.sub(RemoveControlCommand).subscribe((c) => this.map?.removeControl(c.item));
|
|
1008
1153
|
}
|
|
1009
1154
|
}
|
|
1010
1155
|
ControlsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ControlsService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -1020,36 +1165,38 @@ class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
|
1020
1165
|
this.registerServices([management, state, interaction, mapFeature, drawing, featureModification, controls]);
|
|
1021
1166
|
}
|
|
1022
1167
|
_up() {
|
|
1023
|
-
this.
|
|
1024
|
-
this.
|
|
1025
|
-
this.
|
|
1026
|
-
this.
|
|
1027
|
-
this.
|
|
1028
|
-
this.
|
|
1029
|
-
this.
|
|
1030
|
-
this.
|
|
1031
|
-
this.
|
|
1032
|
-
this.
|
|
1033
|
-
this.
|
|
1034
|
-
this.
|
|
1035
|
-
this.
|
|
1036
|
-
this.
|
|
1037
|
-
this.
|
|
1038
|
-
this.
|
|
1039
|
-
this.
|
|
1040
|
-
this.
|
|
1041
|
-
this.
|
|
1042
|
-
this.
|
|
1043
|
-
this.
|
|
1044
|
-
this.
|
|
1168
|
+
this.recordReplay(MapRenderedEvent);
|
|
1169
|
+
this.recordReplay(PlaceLayerFeaturesCommand);
|
|
1170
|
+
this.recordReplay(RemoveControlCommand);
|
|
1171
|
+
this.recordReplay(AddControlCommand);
|
|
1172
|
+
this.recordReplay(SetMapCenterCommand);
|
|
1173
|
+
this.recordSubject(AddLayerCommand);
|
|
1174
|
+
this.recordSubject(RemoveLayerCommand);
|
|
1175
|
+
this.recordSubject(AddTileCommand);
|
|
1176
|
+
this.recordSubject(RemoveTileCommand);
|
|
1177
|
+
this.recordSubject(MapClickEvent);
|
|
1178
|
+
this.recordSubject(CloseTooltipCommand);
|
|
1179
|
+
this.recordSubject(FitToFeaturesCommand);
|
|
1180
|
+
this.recordSubject(FitToPolygonsCommand);
|
|
1181
|
+
this.recordSubject(MapMoveEndEvent);
|
|
1182
|
+
this.recordSubject(CancelDrawingCommand);
|
|
1183
|
+
this.recordSubject(StartDrawingCommand);
|
|
1184
|
+
this.recordSubject(GetLayerQuery);
|
|
1185
|
+
this.recordSubject(DrawingFinishedEvent);
|
|
1186
|
+
this.recordSubject(GetFeaturesInAreaQuery);
|
|
1187
|
+
this.recordSubject(DrawSelectionAreaCommand);
|
|
1188
|
+
this.recordSubject(CancelFeatureModificationCommand);
|
|
1189
|
+
this.recordSubject(ModifyFeatureCommand);
|
|
1190
|
+
this.recordSubject(GetFeaturesInPointQuery);
|
|
1045
1191
|
this.setExecutors();
|
|
1046
1192
|
}
|
|
1047
1193
|
setExecutors() {
|
|
1048
|
-
this.
|
|
1049
|
-
this.
|
|
1050
|
-
this.
|
|
1051
|
-
this.
|
|
1052
|
-
this.
|
|
1194
|
+
this.recordExecutor(FilterFeaturesInAreaExecutor, (e) => FeatureService.filterFeaturesInArea(e));
|
|
1195
|
+
this.recordExecutor(FilterFeaturesInPointExecutor, (e) => FeatureService.filterFeaturesInPoint(e));
|
|
1196
|
+
this.recordExecutor(CalculateAreaExecutor, (e) => FeatureService.calculateArea(e.polygon?.feature?.getGeometry()));
|
|
1197
|
+
this.recordExecutor(GenerateDrawExecutor, (e) => DrawingGenerationService.getDraw(e));
|
|
1198
|
+
this.recordExecutor(GenerateZoomControlExecutor, (e) => ZoomControlFactory.build(e.settings));
|
|
1199
|
+
this.recordExecutor(GetMapPositionExecutor, () => this.state.getMapPosition());
|
|
1053
1200
|
}
|
|
1054
1201
|
}
|
|
1055
1202
|
MessageRegistratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", 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 });
|
|
@@ -1278,7 +1425,7 @@ class TileLayerComponent extends DestructibleComponent {
|
|
|
1278
1425
|
}
|
|
1279
1426
|
ngOnInit() {
|
|
1280
1427
|
this.postboy
|
|
1281
|
-
.
|
|
1428
|
+
.sub(MapRenderedEvent)
|
|
1282
1429
|
.pipe(filter((m) => !!m), first())
|
|
1283
1430
|
.subscribe((m) => this.initLayer());
|
|
1284
1431
|
}
|
|
@@ -1501,7 +1648,7 @@ class FeatureLayerComponent extends DestructibleComponent {
|
|
|
1501
1648
|
}
|
|
1502
1649
|
ngOnInit() {
|
|
1503
1650
|
this.postboy
|
|
1504
|
-
.
|
|
1651
|
+
.sub(MapRenderedEvent)
|
|
1505
1652
|
.pipe(filter((m) => !!m), first())
|
|
1506
1653
|
.subscribe((m) => this.initLayer());
|
|
1507
1654
|
}
|
|
@@ -1679,14 +1826,14 @@ class ClusterLayerManager {
|
|
|
1679
1826
|
}
|
|
1680
1827
|
observeMapMovement() {
|
|
1681
1828
|
combineLatest([
|
|
1682
|
-
this.postboy.
|
|
1683
|
-
this.postboy.
|
|
1829
|
+
this.postboy.sub(MapMoveEndEvent).pipe(auditTime(250)),
|
|
1830
|
+
this.postboy.sub(MapRenderedEvent),
|
|
1684
1831
|
]).subscribe(([movement, renderEvent]) => {
|
|
1685
1832
|
this.checkClusterNecessity(renderEvent.map);
|
|
1686
1833
|
});
|
|
1687
1834
|
}
|
|
1688
1835
|
observeClick() {
|
|
1689
|
-
this.postboy.
|
|
1836
|
+
this.postboy.sub(MapClickEvent).subscribe((m) => {
|
|
1690
1837
|
if ((m.features[this.settings.name]?.length ?? 0) > 1) {
|
|
1691
1838
|
this.postboy.fire(new FitToFeaturesCommand(m.features[this.settings.name], -1));
|
|
1692
1839
|
}
|
|
@@ -1774,7 +1921,7 @@ class ClusterLayerComponent extends DestructibleComponent {
|
|
|
1774
1921
|
}
|
|
1775
1922
|
ngOnInit() {
|
|
1776
1923
|
this.postboy
|
|
1777
|
-
.
|
|
1924
|
+
.sub(MapRenderedEvent)
|
|
1778
1925
|
.pipe(filter((m) => !!m), first())
|
|
1779
1926
|
.subscribe((m) => this.initLayer());
|
|
1780
1927
|
}
|
|
@@ -1915,7 +2062,7 @@ class MarkersComponent extends DestructibleComponent {
|
|
|
1915
2062
|
}
|
|
1916
2063
|
ngOnInit() {
|
|
1917
2064
|
this.postboy
|
|
1918
|
-
.
|
|
2065
|
+
.sub(MapRenderedEvent)
|
|
1919
2066
|
.pipe(filter((m) => !!m), first())
|
|
1920
2067
|
.subscribe(() => this.putMarkers());
|
|
1921
2068
|
}
|
|
@@ -2004,18 +2151,18 @@ class TooltipComponent extends DestructibleComponent {
|
|
|
2004
2151
|
this.detector.detectChanges();
|
|
2005
2152
|
}
|
|
2006
2153
|
observeMapClick() {
|
|
2007
|
-
return this.postboy.
|
|
2154
|
+
return this.postboy.sub(MapClickEvent).subscribe((ev) => {
|
|
2008
2155
|
this._settings.show(ev) ? this.addOverlay(ev.coordinates) : this.removeOverlay();
|
|
2009
2156
|
});
|
|
2010
2157
|
}
|
|
2011
2158
|
observeClose() {
|
|
2012
2159
|
return this.postboy
|
|
2013
|
-
.
|
|
2160
|
+
.sub(CloseTooltipCommand)
|
|
2014
2161
|
.pipe(filter((ev) => ev.tooltipId === this._settings.id))
|
|
2015
2162
|
.subscribe(() => this.removeOverlay());
|
|
2016
2163
|
}
|
|
2017
2164
|
observeMapRender() {
|
|
2018
|
-
return this.postboy.
|
|
2165
|
+
return this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
2019
2166
|
this.map = m.map;
|
|
2020
2167
|
});
|
|
2021
2168
|
}
|
|
@@ -2055,7 +2202,7 @@ class PolygonsComponent extends DestructibleComponent {
|
|
|
2055
2202
|
}
|
|
2056
2203
|
ngOnInit() {
|
|
2057
2204
|
this.postboy
|
|
2058
|
-
.
|
|
2205
|
+
.sub(MapRenderedEvent)
|
|
2059
2206
|
.pipe(filter((m) => !!m), first())
|
|
2060
2207
|
.subscribe(() => this.putPolygons());
|
|
2061
2208
|
}
|
|
@@ -2229,7 +2376,7 @@ class MapControlZoomComponent extends DestructibleComponent {
|
|
|
2229
2376
|
}
|
|
2230
2377
|
ngOnInit() {
|
|
2231
2378
|
this.postboy
|
|
2232
|
-
.
|
|
2379
|
+
.sub(MapRenderedEvent)
|
|
2233
2380
|
.pipe(filter((m) => !!m), first())
|
|
2234
2381
|
.subscribe((m) => {
|
|
2235
2382
|
this.map = m.map;
|
|
@@ -2239,7 +2386,7 @@ class MapControlZoomComponent extends DestructibleComponent {
|
|
|
2239
2386
|
setControl() {
|
|
2240
2387
|
if (!this.map)
|
|
2241
2388
|
return;
|
|
2242
|
-
this.control = this.postboy.
|
|
2389
|
+
this.control = this.postboy.exec(new GenerateZoomControlExecutor(this._settings));
|
|
2243
2390
|
this.map.addControl(this.control);
|
|
2244
2391
|
}
|
|
2245
2392
|
}
|
|
@@ -2498,5 +2645,5 @@ class StringifyFeatureHelper {
|
|
|
2498
2645
|
* Generated bundle index. Do not edit.
|
|
2499
2646
|
*/
|
|
2500
2647
|
|
|
2501
|
-
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 };
|
|
2648
|
+
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 };
|
|
2502
2649
|
//# sourceMappingURL=maps-components.mjs.map
|