@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(Object.assign(Object.assign({}, 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(Object.assign(Object.assign({}, 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(Object.assign(Object.assign({}, 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(Object.assign(Object.assign({}, 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(Object.assign(Object.assign({}, 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(Object.assign(Object.assign({}, 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;
|
|
@@ -181,6 +227,19 @@ class PolygonModel {
|
|
|
181
227
|
}
|
|
182
228
|
}
|
|
183
229
|
|
|
230
|
+
/**
|
|
231
|
+
* Enum representing various drawing types.
|
|
232
|
+
*
|
|
233
|
+
* This enumeration is used to define the types of drawable shapes
|
|
234
|
+
* within a specific drawing context. Each member corresponds to
|
|
235
|
+
* a specific type of drawing.
|
|
236
|
+
*
|
|
237
|
+
* Members:
|
|
238
|
+
* - `Polygon`: Represents a polygonal shape (e.g., triangle, pentagon, etc.).
|
|
239
|
+
* - `Circle`: Represents a circular shape.
|
|
240
|
+
* - `Square`: Represents a square shape.
|
|
241
|
+
* - `Box`: Represents a rectangular box shape.
|
|
242
|
+
*/
|
|
184
243
|
var DrawingType;
|
|
185
244
|
(function (DrawingType) {
|
|
186
245
|
DrawingType[DrawingType["Polygon"] = 1] = "Polygon";
|
|
@@ -189,6 +248,14 @@ var DrawingType;
|
|
|
189
248
|
DrawingType[DrawingType["Box"] = 4] = "Box";
|
|
190
249
|
})(DrawingType || (DrawingType = {}));
|
|
191
250
|
|
|
251
|
+
/**
|
|
252
|
+
* An enumeration representing different formats for feature outputs.
|
|
253
|
+
* This can be used to specify the desired output format when dealing with geospatial data.
|
|
254
|
+
*
|
|
255
|
+
* Enumerators:
|
|
256
|
+
* - GeoJson: Represents the GeoJSON format for geospatial data.
|
|
257
|
+
* - WKT: Represents the Well-Known Text (WKT) format for geospatial data.
|
|
258
|
+
*/
|
|
192
259
|
var FeatureOutputFormat;
|
|
193
260
|
(function (FeatureOutputFormat) {
|
|
194
261
|
FeatureOutputFormat[FeatureOutputFormat["GeoJson"] = 1] = "GeoJson";
|
|
@@ -209,126 +276,129 @@ class MapControl extends Control {
|
|
|
209
276
|
}
|
|
210
277
|
}
|
|
211
278
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
class MapClickEvent extends PostboyGenericMessage {
|
|
224
|
-
constructor(coordinates, entities, features) {
|
|
225
|
-
super();
|
|
226
|
-
this.coordinates = coordinates;
|
|
227
|
-
this.entities = entities;
|
|
228
|
-
this.features = features;
|
|
229
|
-
}
|
|
230
|
-
get id() {
|
|
231
|
-
return MapClickEvent.ID;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
MapClickEvent.ID = '323df526-8d9c-49c6-83e8-6e9a1e7762f7';
|
|
235
|
-
|
|
236
|
-
class MapMoveEndEvent extends PostboyGenericMessage {
|
|
237
|
-
constructor(position) {
|
|
279
|
+
/**
|
|
280
|
+
* Represents a command to add a custom control to a map.
|
|
281
|
+
*/
|
|
282
|
+
class AddControlCommand extends PostboyGenericMessage {
|
|
283
|
+
/**
|
|
284
|
+
* Creates an instance of the class with the specified MapControl object.
|
|
285
|
+
*
|
|
286
|
+
* @param {MapControl} item - The MapControl object to be associated with the instance.
|
|
287
|
+
*/
|
|
288
|
+
constructor(item) {
|
|
238
289
|
super();
|
|
239
|
-
this.
|
|
240
|
-
}
|
|
241
|
-
get id() {
|
|
242
|
-
return MapMoveEndEvent.ID;
|
|
290
|
+
this.item = item;
|
|
243
291
|
}
|
|
244
|
-
}
|
|
245
|
-
MapMoveEndEvent.ID = 'f21f783e-b5af-4489-9fec-8027fd07a8ad';
|
|
292
|
+
}
|
|
246
293
|
|
|
294
|
+
/**
|
|
295
|
+
* A command class that represents the action to close a tooltip.
|
|
296
|
+
*/
|
|
247
297
|
class CloseTooltipCommand extends PostboyGenericMessage {
|
|
298
|
+
/**
|
|
299
|
+
* Creates an instance of the class with the specified tooltip ID.
|
|
300
|
+
*
|
|
301
|
+
* @param {string} tooltipId - The unique identifier for the tooltip.
|
|
302
|
+
*/
|
|
248
303
|
constructor(tooltipId) {
|
|
249
304
|
super();
|
|
250
305
|
this.tooltipId = tooltipId;
|
|
251
306
|
}
|
|
252
|
-
|
|
253
|
-
return CloseTooltipCommand.ID;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
CloseTooltipCommand.ID = '4896d52c-e34f-4994-bcfd-32832d12dbe4';
|
|
307
|
+
}
|
|
257
308
|
|
|
309
|
+
/**
|
|
310
|
+
* Represents a command to start a drawing operation.
|
|
311
|
+
*/
|
|
258
312
|
class StartDrawingCommand extends PostboyCallbackMessage {
|
|
313
|
+
/**
|
|
314
|
+
* Constructor for creating an instance of the class that represents a drawing feature with specific type, style, and output format.
|
|
315
|
+
*
|
|
316
|
+
* @param {DrawingType} type - The type of the drawing to be created.
|
|
317
|
+
* @param {Style} style - The style defining visual appearance of the drawing.
|
|
318
|
+
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The format of the feature output. Defaults to GeoJson.
|
|
319
|
+
*/
|
|
259
320
|
constructor(type, style, format = FeatureOutputFormat.GeoJson) {
|
|
260
321
|
super();
|
|
261
322
|
this.type = type;
|
|
262
323
|
this.style = style;
|
|
263
324
|
this.format = format;
|
|
264
325
|
}
|
|
265
|
-
|
|
266
|
-
return StartDrawingCommand.ID;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
StartDrawingCommand.ID = 'da904f4b-a1c8-4db7-a6af-14d9ee18ec8c';
|
|
326
|
+
}
|
|
270
327
|
|
|
328
|
+
/**
|
|
329
|
+
* Represents a command to cancel a drawing action.
|
|
330
|
+
*/
|
|
271
331
|
class CancelDrawingCommand extends PostboyGenericMessage {
|
|
272
|
-
|
|
273
|
-
return CancelDrawingCommand.ID;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
CancelDrawingCommand.ID = '7d38d983-feba-4176-a66b-18175e5ecd6b';
|
|
332
|
+
}
|
|
277
333
|
|
|
334
|
+
/**
|
|
335
|
+
* Class representing a command to draw a selection area with a specific type and style.
|
|
336
|
+
*
|
|
337
|
+
* @return {Dictionary<IIdentified[]>} - a collection of features inside the selected area, grouped by a layer's name
|
|
338
|
+
*/
|
|
278
339
|
class DrawSelectionAreaCommand extends PostboyCallbackMessage {
|
|
340
|
+
/**
|
|
341
|
+
* Constructs a new instance with the specified type, style, and optional set of ignored items.
|
|
342
|
+
*
|
|
343
|
+
* @param {DrawingType} type - The type of drawing to be created.
|
|
344
|
+
* @param {Style} style - The style information for the drawing.
|
|
345
|
+
* @param {Set<string>} [ignore=new Set<string>()] - Optional set of items to be ignored.
|
|
346
|
+
*/
|
|
279
347
|
constructor(type, style, ignore = new Set()) {
|
|
280
348
|
super();
|
|
281
349
|
this.type = type;
|
|
282
350
|
this.style = style;
|
|
283
351
|
this.ignore = ignore;
|
|
284
352
|
}
|
|
285
|
-
|
|
286
|
-
return DrawSelectionAreaCommand.ID;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
DrawSelectionAreaCommand.ID = '573d8a0d-f25b-42b7-9ad7-0ac6d86ac362';
|
|
353
|
+
}
|
|
290
354
|
|
|
355
|
+
/**
|
|
356
|
+
* Represents a command to modify a feature with a specific style and output format
|
|
357
|
+
* for a polygonal model.
|
|
358
|
+
*
|
|
359
|
+
* @return {string | null} a string representation of the modified feature in the appropriate format
|
|
360
|
+
*/
|
|
291
361
|
class ModifyFeatureCommand extends PostboyCallbackMessage {
|
|
362
|
+
/**
|
|
363
|
+
* Constructs an instance of the class.
|
|
364
|
+
*
|
|
365
|
+
* @param {PolygonModel} model - The polygon model to be used.
|
|
366
|
+
* @param {Style} style - The style configuration for the polygon.
|
|
367
|
+
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the features. Default is GeoJson.
|
|
368
|
+
*/
|
|
292
369
|
constructor(model, style, format = FeatureOutputFormat.GeoJson) {
|
|
293
370
|
super();
|
|
294
371
|
this.model = model;
|
|
295
372
|
this.style = style;
|
|
296
373
|
this.format = format;
|
|
297
374
|
}
|
|
298
|
-
|
|
299
|
-
return ModifyFeatureCommand.ID;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
ModifyFeatureCommand.ID = 'ead85caa-24c6-4844-a68c-2cea91774c8c';
|
|
375
|
+
}
|
|
303
376
|
|
|
377
|
+
/**
|
|
378
|
+
* Represents a command to cancel a feature modification.
|
|
379
|
+
*/
|
|
304
380
|
class CancelFeatureModificationCommand extends PostboyGenericMessage {
|
|
305
|
-
|
|
306
|
-
return CancelFeatureModificationCommand.ID;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
CancelFeatureModificationCommand.ID = '9c9fb40f-ea95-4704-8177-0e9ecabf36fa';
|
|
310
|
-
|
|
311
|
-
class AddControlCommand extends PostboyGenericMessage {
|
|
312
|
-
constructor(item) {
|
|
313
|
-
super();
|
|
314
|
-
this.item = item;
|
|
315
|
-
}
|
|
316
|
-
get id() {
|
|
317
|
-
return AddControlCommand.ID;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
AddControlCommand.ID = '8e1c06eb-b395-4fe1-929c-ebf0805eeb49';
|
|
381
|
+
}
|
|
321
382
|
|
|
383
|
+
/**
|
|
384
|
+
* Represents a command to remove a map control from the map.
|
|
385
|
+
*
|
|
386
|
+
* The command is identified by a unique static ID, and it requires a MapControl item
|
|
387
|
+
* to specify the control to be removed.
|
|
388
|
+
*
|
|
389
|
+
* @extends PostboyGenericMessage
|
|
390
|
+
*/
|
|
322
391
|
class RemoveControlCommand extends PostboyGenericMessage {
|
|
392
|
+
/**
|
|
393
|
+
* Constructs an instance of the class.
|
|
394
|
+
*
|
|
395
|
+
* @param {MapControl} item - The map control instance to be removed.
|
|
396
|
+
*/
|
|
323
397
|
constructor(item) {
|
|
324
398
|
super();
|
|
325
399
|
this.item = item;
|
|
326
400
|
}
|
|
327
|
-
|
|
328
|
-
return RemoveControlCommand.ID;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
RemoveControlCommand.ID = '361641e0-804a-4930-8c27-0cea6330dbfc';
|
|
401
|
+
}
|
|
332
402
|
|
|
333
403
|
/**
|
|
334
404
|
* Forces map to move to a specific point
|
|
@@ -346,34 +416,128 @@ class SetMapCenterCommand extends PostboyGenericMessage {
|
|
|
346
416
|
this.lng = lng;
|
|
347
417
|
this.zoom = zoom;
|
|
348
418
|
}
|
|
349
|
-
|
|
350
|
-
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* FitToPolygonsCommand is a command used to fit a given set of polygon features
|
|
423
|
+
* to the viewable area, optionally applying a zoom transformation afterwards.
|
|
424
|
+
*/
|
|
425
|
+
class FitToPolygonsCommand extends PostboyGenericMessage {
|
|
426
|
+
/**
|
|
427
|
+
* Creates an instance of the class with specified polygon features and an optional zoom level.
|
|
428
|
+
*
|
|
429
|
+
* @param {PolygonModel[]} features - An array of polygon models to fit to.
|
|
430
|
+
* @param {number} [zoomAfter=0] - Optional zoom level change to apply after initialization. Defaults to 0.
|
|
431
|
+
*/
|
|
432
|
+
constructor(features, zoomAfter = 0) {
|
|
433
|
+
super();
|
|
434
|
+
this.features = features;
|
|
435
|
+
this.zoomAfter = zoomAfter;
|
|
351
436
|
}
|
|
352
|
-
}
|
|
353
|
-
SetMapCenterCommand.ID = 'd50e89c9-6707-4f8c-ab57-65fcef232182';
|
|
437
|
+
}
|
|
354
438
|
|
|
355
|
-
|
|
356
|
-
|
|
439
|
+
/**
|
|
440
|
+
* Represents an event triggered when a map rendering process is completed.
|
|
441
|
+
*/
|
|
442
|
+
class MapRenderedEvent extends PostboyGenericMessage {
|
|
443
|
+
/**
|
|
444
|
+
* Constructor for creating an instance of the class.
|
|
445
|
+
*
|
|
446
|
+
* @param {Map} map - The map instance to be used by the class.
|
|
447
|
+
*/
|
|
448
|
+
constructor(map) {
|
|
357
449
|
super();
|
|
358
|
-
this.
|
|
450
|
+
this.map = map;
|
|
359
451
|
}
|
|
360
|
-
|
|
361
|
-
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Represents an event triggered by a click on a map, containing information about the
|
|
456
|
+
* click's location, relevant entities, and features present at the clicked position.
|
|
457
|
+
*
|
|
458
|
+
* @extends {PostboyGenericMessage}
|
|
459
|
+
*/
|
|
460
|
+
class MapClickEvent extends PostboyGenericMessage {
|
|
461
|
+
/**
|
|
462
|
+
* Creates an instance of this class with the provided coordinates, entities, and features.
|
|
463
|
+
*
|
|
464
|
+
* @param {number[]} coordinates - An array representing the coordinates.
|
|
465
|
+
* @param {{ [layer: string]: IIdentified[] }} entities - A mapping of layer names to arrays of IIdentified entities.
|
|
466
|
+
* @param {{ [layer: string]: Feature<Geometry>[] }} features - A mapping of layer names to arrays of features with geometry.
|
|
467
|
+
*/
|
|
468
|
+
constructor(coordinates, entities, features) {
|
|
469
|
+
super();
|
|
470
|
+
this.coordinates = coordinates;
|
|
471
|
+
this.entities = entities;
|
|
472
|
+
this.features = features;
|
|
362
473
|
}
|
|
363
|
-
}
|
|
364
|
-
CalculateAreaExecutor.ID = '172ecf46-86b5-4f46-a5f1-96ba2cbb1694';
|
|
474
|
+
}
|
|
365
475
|
|
|
366
|
-
|
|
367
|
-
|
|
476
|
+
/**
|
|
477
|
+
* Represents an event that is triggered when the movement of a map ends.
|
|
478
|
+
* This class is used to capture the final position of a map after a movement operation.
|
|
479
|
+
*
|
|
480
|
+
* @property {MapPosition | null} position - The final position of the map after movement ends. Can be null.
|
|
481
|
+
*/
|
|
482
|
+
class MapMoveEndEvent extends PostboyGenericMessage {
|
|
483
|
+
constructor(position) {
|
|
368
484
|
super();
|
|
485
|
+
this.position = position;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* A class responsible for executing filtering of geographical features
|
|
491
|
+
* based on a specific geographical point (latitude and longitude).
|
|
492
|
+
*
|
|
493
|
+
* @template Feature - A geographical feature that is processed by the executor.
|
|
494
|
+
* @template Geometry - The type of geometry associated with the feature.
|
|
495
|
+
*/
|
|
496
|
+
class FilterFeaturesInPointExecutor extends PostboyExecutor {
|
|
497
|
+
/**
|
|
498
|
+
* Constructs a new instance with the specified latitude, longitude, and features.
|
|
499
|
+
*
|
|
500
|
+
* @param {number} lat - The latitude coordinate.
|
|
501
|
+
* @param {number} lng - The longitude coordinate.
|
|
502
|
+
* @param {Feature<Geometry>[]} features - The array of features associated with the location.
|
|
503
|
+
*/
|
|
504
|
+
constructor(lat, lng, features) {
|
|
505
|
+
super();
|
|
506
|
+
this.lat = lat;
|
|
507
|
+
this.lng = lng;
|
|
369
508
|
this.features = features;
|
|
370
|
-
this.zoomAfter = zoomAfter;
|
|
371
509
|
}
|
|
372
|
-
|
|
373
|
-
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* A class that extends the PostboyExecutor to filter geographical features within a specified area.
|
|
514
|
+
* This class is designed to process a list of input features and determine which of them are located inside the provided area geometry.
|
|
515
|
+
*
|
|
516
|
+
* Parameters:
|
|
517
|
+
* - `area`: A Geometry object defining the area to filter geographical features.
|
|
518
|
+
* - `features`: An array of geographical features, represented as `Feature<Geometry>` objects, to be filtered by their presence within the specified area.
|
|
519
|
+
*/
|
|
520
|
+
class FilterFeaturesInAreaExecutor extends PostboyExecutor {
|
|
521
|
+
constructor(area, features) {
|
|
522
|
+
super();
|
|
523
|
+
this.area = area;
|
|
524
|
+
this.features = features;
|
|
374
525
|
}
|
|
375
|
-
}
|
|
376
|
-
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* An executor responsible for calculating the area of a given polygon.
|
|
530
|
+
*
|
|
531
|
+
* Use this class to manage and execute area-calculation logic for a polygon.
|
|
532
|
+
*
|
|
533
|
+
* @return {number} - the spherical area (in square meters)
|
|
534
|
+
*/
|
|
535
|
+
class CalculateAreaExecutor extends PostboyExecutor {
|
|
536
|
+
constructor(polygon) {
|
|
537
|
+
super();
|
|
538
|
+
this.polygon = polygon;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
377
541
|
|
|
378
542
|
/**
|
|
379
543
|
* A message that allows to get the current state of the map.
|
|
@@ -381,49 +545,56 @@ FitToPolygonsCommand.ID = 'a9e42b23-ffaf-4c46-8370-e0432cd14d60';
|
|
|
381
545
|
* @returns {MapPosition | null}
|
|
382
546
|
*/
|
|
383
547
|
class GetMapPositionExecutor extends PostboyExecutor {
|
|
384
|
-
get id() {
|
|
385
|
-
return GetMapPositionExecutor.ID;
|
|
386
|
-
}
|
|
387
548
|
constructor() {
|
|
388
549
|
super();
|
|
389
550
|
}
|
|
390
551
|
}
|
|
391
552
|
GetMapPositionExecutor.ID = '52c95689-d09b-4082-ba58-9183ea96a213';
|
|
392
553
|
|
|
554
|
+
/**
|
|
555
|
+
* Class representing a query to get features within a specified geographical area.
|
|
556
|
+
* The query optionally takes a set of layer names to ignore during the operation.
|
|
557
|
+
*/
|
|
393
558
|
class GetFeaturesInAreaQuery extends PostboyCallbackMessage {
|
|
559
|
+
/**
|
|
560
|
+
* Constructor to initialize the object with a Geometry instance and an optional set of strings to ignore.
|
|
561
|
+
*
|
|
562
|
+
* @param {Geometry} area - The Geometry object used to define the area.
|
|
563
|
+
* @param {Set<string>} [ignore] - An optional set of layer names that will be ignored. Defaults to an empty set.
|
|
564
|
+
*/
|
|
394
565
|
constructor(area, ignore = new Set()) {
|
|
395
566
|
super();
|
|
396
567
|
this.area = area;
|
|
397
568
|
this.ignore = ignore;
|
|
398
569
|
}
|
|
399
|
-
|
|
400
|
-
return GetFeaturesInAreaQuery.ID;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
GetFeaturesInAreaQuery.ID = 'efcf4271-a07a-40e0-9f02-d4dade40b8ac';
|
|
570
|
+
}
|
|
404
571
|
|
|
405
|
-
|
|
406
|
-
|
|
572
|
+
/**
|
|
573
|
+
* Represents a query to retrieve features located at a specific geographical point.
|
|
574
|
+
* The query is defined by latitude, longitude, and an optional set of features to ignore.
|
|
575
|
+
*/
|
|
576
|
+
class GetFeaturesInPointQuery extends PostboyCallbackMessage {
|
|
577
|
+
/**
|
|
578
|
+
* Constructor for initializing a geographic coordinate object.
|
|
579
|
+
*
|
|
580
|
+
* @param {number} lat - The latitude of the location.
|
|
581
|
+
* @param {number} lng - The longitude of the location.
|
|
582
|
+
* @param {Set<string>} [ignore=new Set<string>()] - An optional set of strings to ignore during processing.
|
|
583
|
+
*/
|
|
584
|
+
constructor(lat, lng, ignore = new Set()) {
|
|
407
585
|
super();
|
|
408
|
-
this.
|
|
409
|
-
this.
|
|
410
|
-
|
|
411
|
-
get id() {
|
|
412
|
-
return FilterFeaturesInAreaExecutor.ID;
|
|
586
|
+
this.lat = lat;
|
|
587
|
+
this.lng = lng;
|
|
588
|
+
this.ignore = ignore;
|
|
413
589
|
}
|
|
414
|
-
}
|
|
415
|
-
FilterFeaturesInAreaExecutor.ID = '36bb2d94-8028-4512-90dd-2386af3fc67c';
|
|
590
|
+
}
|
|
416
591
|
|
|
417
592
|
class AddLayerCommand extends PostboyGenericMessage {
|
|
418
593
|
constructor(layer) {
|
|
419
594
|
super();
|
|
420
595
|
this.layer = layer;
|
|
421
596
|
}
|
|
422
|
-
|
|
423
|
-
return AddLayerCommand.ID;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
AddLayerCommand.ID = 'd93e250f-92bc-43ac-9c6a-46c521a1aaa5';
|
|
597
|
+
}
|
|
427
598
|
|
|
428
599
|
class PlaceLayerFeaturesCommand extends PostboyGenericMessage {
|
|
429
600
|
constructor(layer, features) {
|
|
@@ -431,44 +602,28 @@ class PlaceLayerFeaturesCommand extends PostboyGenericMessage {
|
|
|
431
602
|
this.layer = layer;
|
|
432
603
|
this.features = features;
|
|
433
604
|
}
|
|
434
|
-
|
|
435
|
-
return PlaceLayerFeaturesCommand.ID;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
PlaceLayerFeaturesCommand.ID = '8caf86bc-869b-426f-b36d-4642f6b8aab0';
|
|
605
|
+
}
|
|
439
606
|
|
|
440
607
|
class RemoveLayerCommand extends PostboyGenericMessage {
|
|
441
608
|
constructor(layer) {
|
|
442
609
|
super();
|
|
443
610
|
this.layer = layer;
|
|
444
611
|
}
|
|
445
|
-
|
|
446
|
-
return RemoveLayerCommand.ID;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
RemoveLayerCommand.ID = 'ab484e0e-e185-45cd-8434-12101f3c7eb1';
|
|
612
|
+
}
|
|
450
613
|
|
|
451
614
|
class AddTileCommand extends PostboyGenericMessage {
|
|
452
615
|
constructor(layer) {
|
|
453
616
|
super();
|
|
454
617
|
this.layer = layer;
|
|
455
618
|
}
|
|
456
|
-
|
|
457
|
-
return AddTileCommand.ID;
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
AddTileCommand.ID = '25b7df28-72ce-4453-9fe6-54285a2fdc57';
|
|
619
|
+
}
|
|
461
620
|
|
|
462
621
|
class RemoveTileCommand extends PostboyGenericMessage {
|
|
463
622
|
constructor(layer) {
|
|
464
623
|
super();
|
|
465
624
|
this.layer = layer;
|
|
466
625
|
}
|
|
467
|
-
|
|
468
|
-
return RemoveTileCommand.ID;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
RemoveTileCommand.ID = 'c36ccc0b-5638-4819-b148-2de57a59a5b7';
|
|
626
|
+
}
|
|
472
627
|
|
|
473
628
|
class FitToFeaturesCommand extends PostboyGenericMessage {
|
|
474
629
|
constructor(features, zoomAfter = 0) {
|
|
@@ -476,32 +631,17 @@ class FitToFeaturesCommand extends PostboyGenericMessage {
|
|
|
476
631
|
this.features = features;
|
|
477
632
|
this.zoomAfter = zoomAfter;
|
|
478
633
|
}
|
|
479
|
-
|
|
480
|
-
return FitToFeaturesCommand.ID;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
FitToFeaturesCommand.ID = '76cdc091-3793-4b6c-82f7-1e0334cf08a8';
|
|
634
|
+
}
|
|
484
635
|
|
|
485
636
|
class GetLayerQuery extends PostboyCallbackMessage {
|
|
486
637
|
constructor(name) {
|
|
487
638
|
super();
|
|
488
639
|
this.name = name;
|
|
489
640
|
}
|
|
490
|
-
|
|
491
|
-
return GetLayerQuery.ID;
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
GetLayerQuery.ID = '5c04c87b-8a93-4c2a-979e-d1e313d860ed';
|
|
641
|
+
}
|
|
495
642
|
|
|
496
643
|
class DrawingFinishedEvent extends PostboyGenericMessage {
|
|
497
|
-
|
|
498
|
-
super();
|
|
499
|
-
}
|
|
500
|
-
get id() {
|
|
501
|
-
return DrawingFinishedEvent.ID;
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
DrawingFinishedEvent.ID = 'c724b68e-b4eb-4783-90f1-a8e31973fd36';
|
|
644
|
+
}
|
|
505
645
|
|
|
506
646
|
class DrawingGenerationService {
|
|
507
647
|
static getDraw(ev) {
|
|
@@ -530,6 +670,9 @@ class FeatureService {
|
|
|
530
670
|
static filterFeaturesInArea(query) {
|
|
531
671
|
return query.features.filter((f) => FeatureService.booleanIntersects(query.area, f.getGeometry()));
|
|
532
672
|
}
|
|
673
|
+
static filterFeaturesInPoint(query) {
|
|
674
|
+
return query.features.filter((f) => FeatureService.booleanIntersects(f.getGeometry(), new Point([query.lng, query.lat])));
|
|
675
|
+
}
|
|
533
676
|
static calculateArea(g) {
|
|
534
677
|
if (!g)
|
|
535
678
|
return 0;
|
|
@@ -553,22 +696,14 @@ class GenerateDrawExecutor extends PostboyExecutor {
|
|
|
553
696
|
this.style = style;
|
|
554
697
|
this.type = type;
|
|
555
698
|
}
|
|
556
|
-
|
|
557
|
-
return GenerateDrawExecutor.ID;
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
GenerateDrawExecutor.ID = 'f01c99ba-0953-4ab5-82f9-04e6fbb678c1';
|
|
699
|
+
}
|
|
561
700
|
|
|
562
701
|
class GenerateZoomControlExecutor extends PostboyExecutor {
|
|
563
702
|
constructor(settings) {
|
|
564
703
|
super();
|
|
565
704
|
this.settings = settings;
|
|
566
705
|
}
|
|
567
|
-
|
|
568
|
-
return GenerateZoomControlExecutor.ID;
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
GenerateZoomControlExecutor.ID = 'ff16a833-c68e-4b1a-bc23-c0d16b002810';
|
|
706
|
+
}
|
|
572
707
|
|
|
573
708
|
class ZoomControlFactory {
|
|
574
709
|
static build(settings) {
|
|
@@ -585,7 +720,11 @@ class ZoomControlFactory {
|
|
|
585
720
|
class MapPostboyService extends PostboyService {
|
|
586
721
|
constructor() {
|
|
587
722
|
super();
|
|
588
|
-
this.addLocker({
|
|
723
|
+
this.addLocker({
|
|
724
|
+
locker: StartDrawingCommand.name,
|
|
725
|
+
unlocker: DrawingFinishedEvent.name,
|
|
726
|
+
locking: [MapClickEvent.name],
|
|
727
|
+
});
|
|
589
728
|
}
|
|
590
729
|
}
|
|
591
730
|
MapPostboyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapPostboyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -608,31 +747,32 @@ class MapManagementService {
|
|
|
608
747
|
this.observeRemoveTile();
|
|
609
748
|
this.observeLayerQuery();
|
|
610
749
|
this.observeFeaturesInArea();
|
|
750
|
+
this.observeFeaturesInPoint();
|
|
611
751
|
}
|
|
612
752
|
observeRemoveTile() {
|
|
613
|
-
this.postboy.
|
|
753
|
+
this.postboy.sub(RemoveTileCommand).subscribe((c) => {
|
|
614
754
|
if (!this.map)
|
|
615
755
|
return;
|
|
616
756
|
this.map.removeLayer(c.layer);
|
|
617
757
|
});
|
|
618
758
|
}
|
|
619
759
|
observeLayerQuery() {
|
|
620
|
-
this.postboy.
|
|
760
|
+
this.postboy.sub(GetLayerQuery).subscribe((ev) => ev.finish(this.layers.take(ev.name)));
|
|
621
761
|
}
|
|
622
762
|
observeAddTile() {
|
|
623
|
-
this.postboy.
|
|
763
|
+
this.postboy.sub(AddTileCommand).subscribe((c) => {
|
|
624
764
|
if (!this.map)
|
|
625
765
|
return;
|
|
626
766
|
this.map.addLayer(c.layer);
|
|
627
767
|
});
|
|
628
768
|
}
|
|
629
769
|
observeMapRender() {
|
|
630
|
-
this.postboy.
|
|
770
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
631
771
|
this.map = m.map;
|
|
632
772
|
});
|
|
633
773
|
}
|
|
634
774
|
observeAddLayer() {
|
|
635
|
-
this.postboy.
|
|
775
|
+
this.postboy.sub(AddLayerCommand).subscribe((c) => {
|
|
636
776
|
if (!this.map)
|
|
637
777
|
return;
|
|
638
778
|
this.layers.put(c.layer.get('name'), c.layer);
|
|
@@ -640,7 +780,7 @@ class MapManagementService {
|
|
|
640
780
|
});
|
|
641
781
|
}
|
|
642
782
|
observePlaceFeatures() {
|
|
643
|
-
this.postboy.
|
|
783
|
+
this.postboy.sub(PlaceLayerFeaturesCommand).subscribe((c) => {
|
|
644
784
|
var _a;
|
|
645
785
|
if (!this.layers.has(c.layer))
|
|
646
786
|
return;
|
|
@@ -652,7 +792,7 @@ class MapManagementService {
|
|
|
652
792
|
});
|
|
653
793
|
}
|
|
654
794
|
observeRemoveLayer() {
|
|
655
|
-
this.postboy.
|
|
795
|
+
this.postboy.sub(RemoveLayerCommand).subscribe((c) => {
|
|
656
796
|
if (!this.map)
|
|
657
797
|
return;
|
|
658
798
|
this.layers.rmv(c.layer.get('name'));
|
|
@@ -660,22 +800,38 @@ class MapManagementService {
|
|
|
660
800
|
});
|
|
661
801
|
}
|
|
662
802
|
observeFeaturesInArea() {
|
|
663
|
-
this.postboy.
|
|
803
|
+
this.postboy.sub(GetFeaturesInAreaQuery).subscribe((qr) => {
|
|
664
804
|
let result = new Dictionary();
|
|
665
|
-
this.
|
|
805
|
+
this.forEachLayer((l, s) => {
|
|
666
806
|
var _a;
|
|
667
|
-
let
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
let source = l.getSource();
|
|
671
|
-
if (!!source['getSource'])
|
|
672
|
-
source = source === null || source === void 0 ? void 0 : source.getSource();
|
|
673
|
-
let features = this.postboy.execute(new FilterFeaturesInAreaExecutor(qr.area, (_a = source === null || source === void 0 ? void 0 : source.getFeatures()) !== null && _a !== void 0 ? _a : []));
|
|
674
|
-
result.put(layerName, features.map((e) => (Object.assign({ id: e.getId() }, e.get(MapConstants.FeatureInfo)))));
|
|
675
|
-
});
|
|
807
|
+
let features = this.postboy.exec(new FilterFeaturesInAreaExecutor(qr.area, (_a = s === null || s === void 0 ? void 0 : s.getFeatures()) !== null && _a !== void 0 ? _a : []));
|
|
808
|
+
result.put(l.get('name'), features.map((e) => (Object.assign({ id: e.getId() }, e.get(MapConstants.FeatureInfo)))));
|
|
809
|
+
}, qr.ignore);
|
|
676
810
|
qr.finish(result);
|
|
677
811
|
});
|
|
678
812
|
}
|
|
813
|
+
observeFeaturesInPoint() {
|
|
814
|
+
this.postboy.sub(GetFeaturesInPointQuery).subscribe((qr) => {
|
|
815
|
+
let result = new Dictionary();
|
|
816
|
+
this.forEachLayer((l, s) => {
|
|
817
|
+
var _a;
|
|
818
|
+
let features = this.postboy.exec(new FilterFeaturesInPointExecutor(qr.lat, qr.lng, (_a = s === null || s === void 0 ? void 0 : s.getFeatures()) !== null && _a !== void 0 ? _a : []));
|
|
819
|
+
result.put(l.get('name'), features.map((e) => (Object.assign({ id: e.getId() }, e.get(MapConstants.FeatureInfo)))));
|
|
820
|
+
}, qr.ignore);
|
|
821
|
+
qr.finish(result);
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
forEachLayer(action, ignore) {
|
|
825
|
+
this.layers.forEach((l) => {
|
|
826
|
+
let layerName = l.get('name');
|
|
827
|
+
if (ignore.has(layerName) || layerName === MapConstants.DrawingLayerId)
|
|
828
|
+
return;
|
|
829
|
+
let source = l.getSource();
|
|
830
|
+
if (!!source['getSource'])
|
|
831
|
+
source = source === null || source === void 0 ? void 0 : source.getSource();
|
|
832
|
+
action(l, source);
|
|
833
|
+
});
|
|
834
|
+
}
|
|
679
835
|
}
|
|
680
836
|
MapManagementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapManagementService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
681
837
|
MapManagementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapManagementService });
|
|
@@ -701,7 +857,7 @@ class MapStateService {
|
|
|
701
857
|
}
|
|
702
858
|
observeMapRendering() {
|
|
703
859
|
this.postboy
|
|
704
|
-
.
|
|
860
|
+
.sub(MapRenderedEvent)
|
|
705
861
|
.pipe(first())
|
|
706
862
|
.subscribe((ev) => {
|
|
707
863
|
var _a;
|
|
@@ -712,7 +868,7 @@ class MapStateService {
|
|
|
712
868
|
});
|
|
713
869
|
}
|
|
714
870
|
observeCenter() {
|
|
715
|
-
this.postboy.
|
|
871
|
+
this.postboy.sub(SetMapCenterCommand).subscribe((c) => {
|
|
716
872
|
var _a, _b;
|
|
717
873
|
(_a = this.map) === null || _a === void 0 ? void 0 : _a.getView().setCenter([c.lng, c.lat]);
|
|
718
874
|
if (c.zoom)
|
|
@@ -736,19 +892,19 @@ class MapFeatureService {
|
|
|
736
892
|
this.observeFitToPolygons();
|
|
737
893
|
}
|
|
738
894
|
observeMapRender() {
|
|
739
|
-
this.postboy.
|
|
895
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
740
896
|
this.map = m.map;
|
|
741
897
|
if (this.fitPolygonsWaiting)
|
|
742
898
|
this.postboy.fire(this.fitPolygonsWaiting);
|
|
743
899
|
});
|
|
744
900
|
}
|
|
745
901
|
observeFitToFeatures() {
|
|
746
|
-
this.postboy.
|
|
902
|
+
this.postboy.sub(FitToFeaturesCommand).subscribe((cmd) => {
|
|
747
903
|
this.fitToGeometries(cmd.features.map((f) => f.getGeometry()), cmd.zoomAfter);
|
|
748
904
|
});
|
|
749
905
|
}
|
|
750
906
|
observeFitToPolygons() {
|
|
751
|
-
this.postboy.
|
|
907
|
+
this.postboy.sub(FitToPolygonsCommand).subscribe((cmd) => {
|
|
752
908
|
if (!this.map) {
|
|
753
909
|
this.fitPolygonsWaiting = cmd;
|
|
754
910
|
return;
|
|
@@ -798,7 +954,7 @@ class MapClickService {
|
|
|
798
954
|
return model;
|
|
799
955
|
}
|
|
800
956
|
observeMapRender() {
|
|
801
|
-
this.postboy.
|
|
957
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
802
958
|
var _a;
|
|
803
959
|
this.map = m.map;
|
|
804
960
|
(_a = this.map) === null || _a === void 0 ? void 0 : _a.on('singleclick', (e) => {
|
|
@@ -831,23 +987,19 @@ class DrawingService {
|
|
|
831
987
|
this.observeMapRender();
|
|
832
988
|
}
|
|
833
989
|
observeSelectArea() {
|
|
834
|
-
this.postboy.
|
|
835
|
-
|
|
836
|
-
drawingCommand.result.subscribe((r) => {
|
|
990
|
+
this.postboy.sub(DrawSelectionAreaCommand).subscribe((ev) => {
|
|
991
|
+
this.postboy.fireCallback(new StartDrawingCommand(ev.type, ev.style), (r) => {
|
|
837
992
|
if (!r) {
|
|
838
993
|
ev.finish(new Dictionary());
|
|
839
994
|
return;
|
|
840
995
|
}
|
|
841
996
|
const area = PolygonModel.fromGeoJson(1, r).feature.getGeometry();
|
|
842
|
-
|
|
843
|
-
getFeaturesCommand.result.subscribe((result) => ev.finish(result));
|
|
844
|
-
this.postboy.fire(getFeaturesCommand);
|
|
997
|
+
this.postboy.fireCallback(new GetFeaturesInAreaQuery(area, ev.ignore), (result) => ev.finish(result));
|
|
845
998
|
});
|
|
846
|
-
this.postboy.fire(drawingCommand);
|
|
847
999
|
});
|
|
848
1000
|
}
|
|
849
1001
|
observeDrawing() {
|
|
850
|
-
this.postboy.
|
|
1002
|
+
this.postboy.sub(StartDrawingCommand).subscribe((ev) => {
|
|
851
1003
|
this.draw((l) => {
|
|
852
1004
|
var _a;
|
|
853
1005
|
if (!l || !this.map) {
|
|
@@ -855,7 +1007,7 @@ class DrawingService {
|
|
|
855
1007
|
return;
|
|
856
1008
|
}
|
|
857
1009
|
const cancelSub = this.observeCancelation(ev, l);
|
|
858
|
-
this.drawInteraction = this.postboy.
|
|
1010
|
+
this.drawInteraction = this.postboy.exec(new GenerateDrawExecutor(l, ev.style, ev.type));
|
|
859
1011
|
(_a = this.map) === null || _a === void 0 ? void 0 : _a.addInteraction(this.drawInteraction);
|
|
860
1012
|
this.drawInteraction.on('drawend', (evt) => {
|
|
861
1013
|
cancelSub.unsubscribe();
|
|
@@ -871,18 +1023,16 @@ class DrawingService {
|
|
|
871
1023
|
this.clearInteraction(layer);
|
|
872
1024
|
}
|
|
873
1025
|
observeMapRender() {
|
|
874
|
-
this.postboy.
|
|
1026
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
875
1027
|
this.map = m.map;
|
|
876
1028
|
});
|
|
877
1029
|
}
|
|
878
1030
|
draw(action) {
|
|
879
|
-
|
|
880
|
-
query.result.subscribe((l) => action(l));
|
|
881
|
-
this.postboy.fire(query);
|
|
1031
|
+
this.postboy.fireCallback(new GetLayerQuery(MapConstants.DrawingLayerId), (l) => action(l));
|
|
882
1032
|
}
|
|
883
1033
|
observeCancelation(ev, layer) {
|
|
884
1034
|
return this.postboy
|
|
885
|
-
.
|
|
1035
|
+
.sub(CancelDrawingCommand)
|
|
886
1036
|
.pipe(first())
|
|
887
1037
|
.subscribe(() => {
|
|
888
1038
|
ev.finish(null);
|
|
@@ -913,7 +1063,7 @@ class FeatureModificationService {
|
|
|
913
1063
|
this.observeMapRender();
|
|
914
1064
|
}
|
|
915
1065
|
observeModification() {
|
|
916
|
-
this.postboy.
|
|
1066
|
+
this.postboy.sub(ModifyFeatureCommand).subscribe((ev) => {
|
|
917
1067
|
this.defineLayer((l) => {
|
|
918
1068
|
if (!l || !this.map) {
|
|
919
1069
|
this.clearInteraction(l);
|
|
@@ -963,18 +1113,16 @@ class FeatureModificationService {
|
|
|
963
1113
|
: new WKT().writeFeature(command.model.feature));
|
|
964
1114
|
}
|
|
965
1115
|
observeMapRender() {
|
|
966
|
-
this.postboy.
|
|
1116
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
967
1117
|
this.map = m.map;
|
|
968
1118
|
});
|
|
969
1119
|
}
|
|
970
1120
|
defineLayer(action) {
|
|
971
|
-
|
|
972
|
-
query.result.subscribe((l) => action(l));
|
|
973
|
-
this.postboy.fire(query);
|
|
1121
|
+
this.postboy.fireCallback(new GetLayerQuery(MapConstants.DrawingLayerId), (l) => action(l));
|
|
974
1122
|
}
|
|
975
1123
|
observeCancelation(ev, layer) {
|
|
976
1124
|
return this.postboy
|
|
977
|
-
.
|
|
1125
|
+
.sub(CancelFeatureModificationCommand)
|
|
978
1126
|
.pipe(first())
|
|
979
1127
|
.subscribe(() => {
|
|
980
1128
|
ev.finish(null);
|
|
@@ -1004,7 +1152,7 @@ class ControlsService {
|
|
|
1004
1152
|
}
|
|
1005
1153
|
observeMapRender() {
|
|
1006
1154
|
this.postboy
|
|
1007
|
-
.
|
|
1155
|
+
.sub(MapRenderedEvent)
|
|
1008
1156
|
.pipe(first())
|
|
1009
1157
|
.subscribe((m) => {
|
|
1010
1158
|
this.map = m.map;
|
|
@@ -1013,12 +1161,10 @@ class ControlsService {
|
|
|
1013
1161
|
});
|
|
1014
1162
|
}
|
|
1015
1163
|
observeAdding() {
|
|
1016
|
-
this.postboy.
|
|
1164
|
+
this.postboy.sub(AddControlCommand).subscribe((c) => { var _a; return (_a = this.map) === null || _a === void 0 ? void 0 : _a.addControl(c.item); });
|
|
1017
1165
|
}
|
|
1018
1166
|
observeRemoving() {
|
|
1019
|
-
this.postboy
|
|
1020
|
-
.subscribe(RemoveControlCommand.ID)
|
|
1021
|
-
.subscribe((c) => { var _a; return (_a = this.map) === null || _a === void 0 ? void 0 : _a.removeControl(c.item); });
|
|
1167
|
+
this.postboy.sub(RemoveControlCommand).subscribe((c) => { var _a; return (_a = this.map) === null || _a === void 0 ? void 0 : _a.removeControl(c.item); });
|
|
1022
1168
|
}
|
|
1023
1169
|
}
|
|
1024
1170
|
ControlsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ControlsService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -1034,36 +1180,38 @@ class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
|
1034
1180
|
this.registerServices([management, state, interaction, mapFeature, drawing, featureModification, controls]);
|
|
1035
1181
|
}
|
|
1036
1182
|
_up() {
|
|
1037
|
-
this.
|
|
1038
|
-
this.
|
|
1039
|
-
this.
|
|
1040
|
-
this.
|
|
1041
|
-
this.
|
|
1042
|
-
this.
|
|
1043
|
-
this.
|
|
1044
|
-
this.
|
|
1045
|
-
this.
|
|
1046
|
-
this.
|
|
1047
|
-
this.
|
|
1048
|
-
this.
|
|
1049
|
-
this.
|
|
1050
|
-
this.
|
|
1051
|
-
this.
|
|
1052
|
-
this.
|
|
1053
|
-
this.
|
|
1054
|
-
this.
|
|
1055
|
-
this.
|
|
1056
|
-
this.
|
|
1057
|
-
this.
|
|
1058
|
-
this.
|
|
1183
|
+
this.recordReplay(MapRenderedEvent);
|
|
1184
|
+
this.recordReplay(PlaceLayerFeaturesCommand);
|
|
1185
|
+
this.recordReplay(RemoveControlCommand);
|
|
1186
|
+
this.recordReplay(AddControlCommand);
|
|
1187
|
+
this.recordReplay(SetMapCenterCommand);
|
|
1188
|
+
this.recordSubject(AddLayerCommand);
|
|
1189
|
+
this.recordSubject(RemoveLayerCommand);
|
|
1190
|
+
this.recordSubject(AddTileCommand);
|
|
1191
|
+
this.recordSubject(RemoveTileCommand);
|
|
1192
|
+
this.recordSubject(MapClickEvent);
|
|
1193
|
+
this.recordSubject(CloseTooltipCommand);
|
|
1194
|
+
this.recordSubject(FitToFeaturesCommand);
|
|
1195
|
+
this.recordSubject(FitToPolygonsCommand);
|
|
1196
|
+
this.recordSubject(MapMoveEndEvent);
|
|
1197
|
+
this.recordSubject(CancelDrawingCommand);
|
|
1198
|
+
this.recordSubject(StartDrawingCommand);
|
|
1199
|
+
this.recordSubject(GetLayerQuery);
|
|
1200
|
+
this.recordSubject(DrawingFinishedEvent);
|
|
1201
|
+
this.recordSubject(GetFeaturesInAreaQuery);
|
|
1202
|
+
this.recordSubject(DrawSelectionAreaCommand);
|
|
1203
|
+
this.recordSubject(CancelFeatureModificationCommand);
|
|
1204
|
+
this.recordSubject(ModifyFeatureCommand);
|
|
1205
|
+
this.recordSubject(GetFeaturesInPointQuery);
|
|
1059
1206
|
this.setExecutors();
|
|
1060
1207
|
}
|
|
1061
1208
|
setExecutors() {
|
|
1062
|
-
this.
|
|
1063
|
-
this.
|
|
1064
|
-
this.
|
|
1065
|
-
this.
|
|
1066
|
-
this.
|
|
1209
|
+
this.recordExecutor(FilterFeaturesInAreaExecutor, (e) => FeatureService.filterFeaturesInArea(e));
|
|
1210
|
+
this.recordExecutor(FilterFeaturesInPointExecutor, (e) => FeatureService.filterFeaturesInPoint(e));
|
|
1211
|
+
this.recordExecutor(CalculateAreaExecutor, (e) => { var _a, _b; return FeatureService.calculateArea((_b = (_a = e.polygon) === null || _a === void 0 ? void 0 : _a.feature) === null || _b === void 0 ? void 0 : _b.getGeometry()); });
|
|
1212
|
+
this.recordExecutor(GenerateDrawExecutor, (e) => DrawingGenerationService.getDraw(e));
|
|
1213
|
+
this.recordExecutor(GenerateZoomControlExecutor, (e) => ZoomControlFactory.build(e.settings));
|
|
1214
|
+
this.recordExecutor(GetMapPositionExecutor, () => this.state.getMapPosition());
|
|
1067
1215
|
}
|
|
1068
1216
|
}
|
|
1069
1217
|
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 });
|
|
@@ -1292,7 +1440,7 @@ class TileLayerComponent extends DestructibleComponent {
|
|
|
1292
1440
|
}
|
|
1293
1441
|
ngOnInit() {
|
|
1294
1442
|
this.postboy
|
|
1295
|
-
.
|
|
1443
|
+
.sub(MapRenderedEvent)
|
|
1296
1444
|
.pipe(filter((m) => !!m), first())
|
|
1297
1445
|
.subscribe((m) => this.initLayer());
|
|
1298
1446
|
}
|
|
@@ -1516,7 +1664,7 @@ class FeatureLayerComponent extends DestructibleComponent {
|
|
|
1516
1664
|
}
|
|
1517
1665
|
ngOnInit() {
|
|
1518
1666
|
this.postboy
|
|
1519
|
-
.
|
|
1667
|
+
.sub(MapRenderedEvent)
|
|
1520
1668
|
.pipe(filter((m) => !!m), first())
|
|
1521
1669
|
.subscribe((m) => this.initLayer());
|
|
1522
1670
|
}
|
|
@@ -1694,14 +1842,14 @@ class ClusterLayerManager {
|
|
|
1694
1842
|
}
|
|
1695
1843
|
observeMapMovement() {
|
|
1696
1844
|
combineLatest([
|
|
1697
|
-
this.postboy.
|
|
1698
|
-
this.postboy.
|
|
1845
|
+
this.postboy.sub(MapMoveEndEvent).pipe(auditTime(250)),
|
|
1846
|
+
this.postboy.sub(MapRenderedEvent),
|
|
1699
1847
|
]).subscribe(([movement, renderEvent]) => {
|
|
1700
1848
|
this.checkClusterNecessity(renderEvent.map);
|
|
1701
1849
|
});
|
|
1702
1850
|
}
|
|
1703
1851
|
observeClick() {
|
|
1704
|
-
this.postboy.
|
|
1852
|
+
this.postboy.sub(MapClickEvent).subscribe((m) => {
|
|
1705
1853
|
var _a, _b;
|
|
1706
1854
|
if (((_b = (_a = m.features[this.settings.name]) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 1) {
|
|
1707
1855
|
this.postboy.fire(new FitToFeaturesCommand(m.features[this.settings.name], -1));
|
|
@@ -1792,7 +1940,7 @@ class ClusterLayerComponent extends DestructibleComponent {
|
|
|
1792
1940
|
}
|
|
1793
1941
|
ngOnInit() {
|
|
1794
1942
|
this.postboy
|
|
1795
|
-
.
|
|
1943
|
+
.sub(MapRenderedEvent)
|
|
1796
1944
|
.pipe(filter((m) => !!m), first())
|
|
1797
1945
|
.subscribe((m) => this.initLayer());
|
|
1798
1946
|
}
|
|
@@ -1934,7 +2082,7 @@ class MarkersComponent extends DestructibleComponent {
|
|
|
1934
2082
|
}
|
|
1935
2083
|
ngOnInit() {
|
|
1936
2084
|
this.postboy
|
|
1937
|
-
.
|
|
2085
|
+
.sub(MapRenderedEvent)
|
|
1938
2086
|
.pipe(filter((m) => !!m), first())
|
|
1939
2087
|
.subscribe(() => this.putMarkers());
|
|
1940
2088
|
}
|
|
@@ -2026,18 +2174,18 @@ class TooltipComponent extends DestructibleComponent {
|
|
|
2026
2174
|
this.detector.detectChanges();
|
|
2027
2175
|
}
|
|
2028
2176
|
observeMapClick() {
|
|
2029
|
-
return this.postboy.
|
|
2177
|
+
return this.postboy.sub(MapClickEvent).subscribe((ev) => {
|
|
2030
2178
|
this._settings.show(ev) ? this.addOverlay(ev.coordinates) : this.removeOverlay();
|
|
2031
2179
|
});
|
|
2032
2180
|
}
|
|
2033
2181
|
observeClose() {
|
|
2034
2182
|
return this.postboy
|
|
2035
|
-
.
|
|
2183
|
+
.sub(CloseTooltipCommand)
|
|
2036
2184
|
.pipe(filter((ev) => ev.tooltipId === this._settings.id))
|
|
2037
2185
|
.subscribe(() => this.removeOverlay());
|
|
2038
2186
|
}
|
|
2039
2187
|
observeMapRender() {
|
|
2040
|
-
return this.postboy.
|
|
2188
|
+
return this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
2041
2189
|
this.map = m.map;
|
|
2042
2190
|
});
|
|
2043
2191
|
}
|
|
@@ -2077,7 +2225,7 @@ class PolygonsComponent extends DestructibleComponent {
|
|
|
2077
2225
|
}
|
|
2078
2226
|
ngOnInit() {
|
|
2079
2227
|
this.postboy
|
|
2080
|
-
.
|
|
2228
|
+
.sub(MapRenderedEvent)
|
|
2081
2229
|
.pipe(filter((m) => !!m), first())
|
|
2082
2230
|
.subscribe(() => this.putPolygons());
|
|
2083
2231
|
}
|
|
@@ -2251,7 +2399,7 @@ class MapControlZoomComponent extends DestructibleComponent {
|
|
|
2251
2399
|
}
|
|
2252
2400
|
ngOnInit() {
|
|
2253
2401
|
this.postboy
|
|
2254
|
-
.
|
|
2402
|
+
.sub(MapRenderedEvent)
|
|
2255
2403
|
.pipe(filter((m) => !!m), first())
|
|
2256
2404
|
.subscribe((m) => {
|
|
2257
2405
|
this.map = m.map;
|
|
@@ -2261,7 +2409,7 @@ class MapControlZoomComponent extends DestructibleComponent {
|
|
|
2261
2409
|
setControl() {
|
|
2262
2410
|
if (!this.map)
|
|
2263
2411
|
return;
|
|
2264
|
-
this.control = this.postboy.
|
|
2412
|
+
this.control = this.postboy.exec(new GenerateZoomControlExecutor(this._settings));
|
|
2265
2413
|
this.map.addControl(this.control);
|
|
2266
2414
|
}
|
|
2267
2415
|
}
|
|
@@ -2516,5 +2664,5 @@ class StringifyFeatureHelper {
|
|
|
2516
2664
|
* Generated bundle index. Do not edit.
|
|
2517
2665
|
*/
|
|
2518
2666
|
|
|
2519
|
-
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 };
|
|
2667
|
+
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 };
|
|
2520
2668
|
//# sourceMappingURL=maps-components-src-map.mjs.map
|