@artstesh/maps 4.1.14 → 4.1.16
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 +10 -5
- package/dist/esm2020/map/messages/commands/add-layer.command.mjs +2 -5
- package/dist/esm2020/map/messages/commands/add-tile.command.mjs +2 -5
- package/dist/esm2020/map/messages/commands/cancel-drawing.command.mjs +5 -5
- package/dist/esm2020/map/messages/commands/cancel-feature-modification.command.mjs +5 -5
- package/dist/esm2020/map/messages/commands/close-tooltip.command.mjs +10 -5
- package/dist/esm2020/map/messages/commands/draw-selection-area.command.mjs +14 -5
- package/dist/esm2020/map/messages/commands/fit-to-features.command.mjs +2 -5
- package/dist/esm2020/map/messages/commands/fit-to-polygons.command.mjs +12 -5
- package/dist/esm2020/map/messages/commands/modify-feature.command.mjs +15 -5
- package/dist/esm2020/map/messages/commands/place-layer-features.command.mjs +2 -5
- package/dist/esm2020/map/messages/commands/remove-control.command.mjs +15 -5
- package/dist/esm2020/map/messages/commands/remove-layer.command.mjs +2 -5
- package/dist/esm2020/map/messages/commands/remove-tile.command.mjs +2 -5
- package/dist/esm2020/map/messages/commands/set-map-center.command.mjs +2 -5
- package/dist/esm2020/map/messages/commands/start-drawing.command.mjs +12 -5
- package/dist/esm2020/map/messages/events/drawing-finished.event.mjs +2 -8
- package/dist/esm2020/map/messages/events/map-click.event.mjs +15 -5
- package/dist/esm2020/map/messages/events/map-move-end.event.mjs +8 -5
- package/dist/esm2020/map/messages/events/map-rendered.event.mjs +10 -5
- package/dist/esm2020/map/messages/executors/calculate-area.executor.mjs +9 -5
- package/dist/esm2020/map/messages/executors/filter-features-in-area.executor.mjs +10 -5
- package/dist/esm2020/map/messages/executors/filter-features-in-point.executor.mjs +14 -6
- package/dist/esm2020/map/messages/executors/generate-draw.executor.mjs +2 -5
- package/dist/esm2020/map/messages/executors/generate-zoom-control.executor.mjs +2 -5
- package/dist/esm2020/map/messages/executors/get-map-position.executor.mjs +1 -4
- package/dist/esm2020/map/messages/index.mjs +8 -8
- package/dist/esm2020/map/messages/queries/get-features-in-area.query.mjs +12 -5
- package/dist/esm2020/map/messages/queries/get-features-in-point.query.mjs +9 -5
- package/dist/esm2020/map/messages/queries/get-layer.query.mjs +2 -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/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 +12 -12
- 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 +30 -30
- 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 +10 -5
- package/dist/esm2020/src/map/messages/commands/add-layer.command.mjs +2 -5
- package/dist/esm2020/src/map/messages/commands/add-tile.command.mjs +2 -5
- package/dist/esm2020/src/map/messages/commands/cancel-drawing.command.mjs +5 -5
- package/dist/esm2020/src/map/messages/commands/cancel-feature-modification.command.mjs +5 -5
- package/dist/esm2020/src/map/messages/commands/close-tooltip.command.mjs +10 -5
- package/dist/esm2020/src/map/messages/commands/draw-selection-area.command.mjs +14 -5
- package/dist/esm2020/src/map/messages/commands/fit-to-features.command.mjs +2 -5
- package/dist/esm2020/src/map/messages/commands/fit-to-polygons.command.mjs +12 -5
- package/dist/esm2020/src/map/messages/commands/modify-feature.command.mjs +15 -5
- package/dist/esm2020/src/map/messages/commands/place-layer-features.command.mjs +2 -5
- package/dist/esm2020/src/map/messages/commands/remove-control.command.mjs +15 -5
- package/dist/esm2020/src/map/messages/commands/remove-layer.command.mjs +2 -5
- package/dist/esm2020/src/map/messages/commands/remove-tile.command.mjs +2 -5
- package/dist/esm2020/src/map/messages/commands/set-map-center.command.mjs +2 -5
- package/dist/esm2020/src/map/messages/commands/start-drawing.command.mjs +12 -5
- package/dist/esm2020/src/map/messages/events/drawing-finished.event.mjs +2 -8
- package/dist/esm2020/src/map/messages/events/map-click.event.mjs +15 -5
- package/dist/esm2020/src/map/messages/events/map-move-end.event.mjs +8 -5
- package/dist/esm2020/src/map/messages/events/map-rendered.event.mjs +10 -5
- package/dist/esm2020/src/map/messages/executors/calculate-area.executor.mjs +9 -5
- package/dist/esm2020/src/map/messages/executors/filter-features-in-area.executor.mjs +10 -5
- package/dist/esm2020/src/map/messages/executors/filter-features-in-point.executor.mjs +14 -6
- package/dist/esm2020/src/map/messages/executors/generate-draw.executor.mjs +2 -5
- package/dist/esm2020/src/map/messages/executors/generate-zoom-control.executor.mjs +2 -5
- package/dist/esm2020/src/map/messages/executors/get-map-position.executor.mjs +1 -4
- package/dist/esm2020/src/map/messages/index.mjs +8 -8
- package/dist/esm2020/src/map/messages/queries/get-features-in-area.query.mjs +12 -5
- package/dist/esm2020/src/map/messages/queries/get-features-in-point.query.mjs +9 -5
- package/dist/esm2020/src/map/messages/queries/get-layer.query.mjs +2 -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/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 +12 -12
- 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 +30 -30
- package/dist/fesm2015/maps-components-src-map.mjs +373 -252
- package/dist/fesm2015/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2015/maps-components.mjs +373 -252
- package/dist/fesm2015/maps-components.mjs.map +1 -1
- package/dist/fesm2020/maps-components-src-map.mjs +373 -252
- package/dist/fesm2020/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2020/maps-components.mjs +373 -252
- package/dist/fesm2020/maps-components.mjs.map +1 -1
- package/dist/map/messages/commands/add-control.command.d.ts +9 -2
- package/dist/map/messages/commands/add-layer.command.d.ts +1 -2
- package/dist/map/messages/commands/add-tile.command.d.ts +1 -2
- package/dist/map/messages/commands/cancel-drawing.command.d.ts +4 -2
- package/dist/map/messages/commands/cancel-feature-modification.command.d.ts +4 -2
- package/dist/map/messages/commands/close-tooltip.command.d.ts +9 -2
- package/dist/map/messages/commands/draw-selection-area.command.d.ts +13 -2
- package/dist/map/messages/commands/fit-to-features.command.d.ts +1 -2
- package/dist/map/messages/commands/fit-to-polygons.command.d.ts +11 -2
- package/dist/map/messages/commands/modify-feature.command.d.ts +14 -2
- package/dist/map/messages/commands/place-layer-features.command.d.ts +1 -2
- package/dist/map/messages/commands/remove-control.command.d.ts +14 -2
- package/dist/map/messages/commands/remove-layer.command.d.ts +1 -2
- package/dist/map/messages/commands/remove-tile.command.d.ts +1 -2
- package/dist/map/messages/commands/set-map-center.command.d.ts +1 -2
- package/dist/map/messages/commands/start-drawing.command.d.ts +11 -2
- package/dist/map/messages/events/drawing-finished.event.d.ts +1 -3
- package/dist/map/messages/events/map-click.event.d.ts +14 -2
- package/dist/map/messages/events/map-move-end.event.d.ts +7 -2
- package/dist/map/messages/events/map-rendered.event.d.ts +9 -2
- package/dist/map/messages/executors/calculate-area.executor.d.ts +8 -2
- package/dist/map/messages/executors/filter-features-in-area.executor.d.ts +9 -2
- package/dist/map/messages/executors/filter-features-in-point.executor.d.ts +13 -3
- package/dist/map/messages/executors/generate-draw.executor.d.ts +1 -2
- package/dist/map/messages/executors/generate-zoom-control.executor.d.ts +1 -2
- package/dist/map/messages/executors/get-map-position.executor.d.ts +0 -1
- package/dist/map/messages/index.d.ts +7 -7
- package/dist/map/messages/queries/get-features-in-area.query.d.ts +11 -2
- package/dist/map/messages/queries/get-features-in-point.query.d.ts +8 -2
- package/dist/map/messages/queries/get-layer.query.d.ts +1 -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/package.json +1 -1
- package/dist/src/map/messages/commands/add-control.command.d.ts +9 -2
- package/dist/src/map/messages/commands/add-layer.command.d.ts +1 -2
- package/dist/src/map/messages/commands/add-tile.command.d.ts +1 -2
- package/dist/src/map/messages/commands/cancel-drawing.command.d.ts +4 -2
- package/dist/src/map/messages/commands/cancel-feature-modification.command.d.ts +4 -2
- package/dist/src/map/messages/commands/close-tooltip.command.d.ts +9 -2
- package/dist/src/map/messages/commands/draw-selection-area.command.d.ts +13 -2
- package/dist/src/map/messages/commands/fit-to-features.command.d.ts +1 -2
- package/dist/src/map/messages/commands/fit-to-polygons.command.d.ts +11 -2
- package/dist/src/map/messages/commands/modify-feature.command.d.ts +14 -2
- package/dist/src/map/messages/commands/place-layer-features.command.d.ts +1 -2
- package/dist/src/map/messages/commands/remove-control.command.d.ts +14 -2
- package/dist/src/map/messages/commands/remove-layer.command.d.ts +1 -2
- package/dist/src/map/messages/commands/remove-tile.command.d.ts +1 -2
- package/dist/src/map/messages/commands/set-map-center.command.d.ts +1 -2
- package/dist/src/map/messages/commands/start-drawing.command.d.ts +11 -2
- package/dist/src/map/messages/events/drawing-finished.event.d.ts +1 -3
- package/dist/src/map/messages/events/map-click.event.d.ts +14 -2
- package/dist/src/map/messages/events/map-move-end.event.d.ts +7 -2
- package/dist/src/map/messages/events/map-rendered.event.d.ts +9 -2
- package/dist/src/map/messages/executors/calculate-area.executor.d.ts +8 -2
- package/dist/src/map/messages/executors/filter-features-in-area.executor.d.ts +9 -2
- package/dist/src/map/messages/executors/filter-features-in-point.executor.d.ts +13 -3
- package/dist/src/map/messages/executors/generate-draw.executor.d.ts +1 -2
- package/dist/src/map/messages/executors/generate-zoom-control.executor.d.ts +1 -2
- package/dist/src/map/messages/executors/get-map-position.executor.d.ts +0 -1
- package/dist/src/map/messages/index.d.ts +7 -7
- package/dist/src/map/messages/queries/get-features-in-area.query.d.ts +11 -2
- package/dist/src/map/messages/queries/get-features-in-point.query.d.ts +8 -2
- package/dist/src/map/messages/queries/get-layer.query.d.ts +1 -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/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,137 @@ 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
292
|
}
|
|
245
|
-
|
|
293
|
+
AddControlCommand.ID = '2921fb19-f1c4-4bf4-97be-001f98241f3b';
|
|
246
294
|
|
|
295
|
+
/**
|
|
296
|
+
* A command class that represents the action to close a tooltip.
|
|
297
|
+
*/
|
|
247
298
|
class CloseTooltipCommand extends PostboyGenericMessage {
|
|
299
|
+
/**
|
|
300
|
+
* Creates an instance of the class with the specified tooltip ID.
|
|
301
|
+
*
|
|
302
|
+
* @param {string} tooltipId - The unique identifier for the tooltip.
|
|
303
|
+
*/
|
|
248
304
|
constructor(tooltipId) {
|
|
249
305
|
super();
|
|
250
306
|
this.tooltipId = tooltipId;
|
|
251
307
|
}
|
|
252
|
-
get id() {
|
|
253
|
-
return CloseTooltipCommand.ID;
|
|
254
|
-
}
|
|
255
308
|
}
|
|
256
|
-
CloseTooltipCommand.ID = '
|
|
309
|
+
CloseTooltipCommand.ID = 'df687e26-7298-46d7-8911-d014801dafac';
|
|
257
310
|
|
|
311
|
+
/**
|
|
312
|
+
* Represents a command to start a drawing operation.
|
|
313
|
+
*/
|
|
258
314
|
class StartDrawingCommand extends PostboyCallbackMessage {
|
|
315
|
+
/**
|
|
316
|
+
* Constructor for creating an instance of the class that represents a drawing feature with specific type, style, and output format.
|
|
317
|
+
*
|
|
318
|
+
* @param {DrawingType} type - The type of the drawing to be created.
|
|
319
|
+
* @param {Style} style - The style defining visual appearance of the drawing.
|
|
320
|
+
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The format of the feature output. Defaults to GeoJson.
|
|
321
|
+
*/
|
|
259
322
|
constructor(type, style, format = FeatureOutputFormat.GeoJson) {
|
|
260
323
|
super();
|
|
261
324
|
this.type = type;
|
|
262
325
|
this.style = style;
|
|
263
326
|
this.format = format;
|
|
264
327
|
}
|
|
265
|
-
get id() {
|
|
266
|
-
return StartDrawingCommand.ID;
|
|
267
|
-
}
|
|
268
328
|
}
|
|
269
|
-
StartDrawingCommand.ID = '
|
|
329
|
+
StartDrawingCommand.ID = '4407e9ee-d6c3-4e77-8000-c1aae7433fb6';
|
|
270
330
|
|
|
331
|
+
/**
|
|
332
|
+
* Represents a command to cancel a drawing action.
|
|
333
|
+
*/
|
|
271
334
|
class CancelDrawingCommand extends PostboyGenericMessage {
|
|
272
|
-
get id() {
|
|
273
|
-
return CancelDrawingCommand.ID;
|
|
274
|
-
}
|
|
275
335
|
}
|
|
276
|
-
CancelDrawingCommand.ID = '
|
|
336
|
+
CancelDrawingCommand.ID = '192d70f8-9d12-4cb3-a8ad-0fc2dc5af1de';
|
|
277
337
|
|
|
338
|
+
/**
|
|
339
|
+
* Class representing a command to draw a selection area with a specific type and style.
|
|
340
|
+
*
|
|
341
|
+
* @return {Dictionary<IIdentified[]>} - a collection of features inside the selected area, grouped by a layer's name
|
|
342
|
+
*/
|
|
278
343
|
class DrawSelectionAreaCommand extends PostboyCallbackMessage {
|
|
344
|
+
/**
|
|
345
|
+
* Constructs a new instance with the specified type, style, and optional set of ignored items.
|
|
346
|
+
*
|
|
347
|
+
* @param {DrawingType} type - The type of drawing to be created.
|
|
348
|
+
* @param {Style} style - The style information for the drawing.
|
|
349
|
+
* @param {Set<string>} [ignore=new Set<string>()] - Optional set of items to be ignored.
|
|
350
|
+
*/
|
|
279
351
|
constructor(type, style, ignore = new Set()) {
|
|
280
352
|
super();
|
|
281
353
|
this.type = type;
|
|
282
354
|
this.style = style;
|
|
283
355
|
this.ignore = ignore;
|
|
284
356
|
}
|
|
285
|
-
get id() {
|
|
286
|
-
return DrawSelectionAreaCommand.ID;
|
|
287
|
-
}
|
|
288
357
|
}
|
|
289
|
-
DrawSelectionAreaCommand.ID = '
|
|
358
|
+
DrawSelectionAreaCommand.ID = '06e43f59-c6ba-41bb-9c5b-f6534d914905';
|
|
290
359
|
|
|
360
|
+
/**
|
|
361
|
+
* Represents a command to modify a feature with a specific style and output format
|
|
362
|
+
* for a polygonal model.
|
|
363
|
+
*
|
|
364
|
+
* @return {string | null} a string representation of the modified feature in the appropriate format
|
|
365
|
+
*/
|
|
291
366
|
class ModifyFeatureCommand extends PostboyCallbackMessage {
|
|
367
|
+
/**
|
|
368
|
+
* Constructs an instance of the class.
|
|
369
|
+
*
|
|
370
|
+
* @param {PolygonModel} model - The polygon model to be used.
|
|
371
|
+
* @param {Style} style - The style configuration for the polygon.
|
|
372
|
+
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the features. Default is GeoJson.
|
|
373
|
+
*/
|
|
292
374
|
constructor(model, style, format = FeatureOutputFormat.GeoJson) {
|
|
293
375
|
super();
|
|
294
376
|
this.model = model;
|
|
295
377
|
this.style = style;
|
|
296
378
|
this.format = format;
|
|
297
379
|
}
|
|
298
|
-
get id() {
|
|
299
|
-
return ModifyFeatureCommand.ID;
|
|
300
|
-
}
|
|
301
380
|
}
|
|
302
|
-
ModifyFeatureCommand.ID = '
|
|
381
|
+
ModifyFeatureCommand.ID = '8f76507e-f18d-4232-bab7-f3d4e3d707bb';
|
|
303
382
|
|
|
383
|
+
/**
|
|
384
|
+
* Represents a command to cancel a feature modification.
|
|
385
|
+
*/
|
|
304
386
|
class CancelFeatureModificationCommand extends PostboyGenericMessage {
|
|
305
|
-
get id() {
|
|
306
|
-
return CancelFeatureModificationCommand.ID;
|
|
307
|
-
}
|
|
308
387
|
}
|
|
309
|
-
CancelFeatureModificationCommand.ID = '
|
|
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';
|
|
388
|
+
CancelFeatureModificationCommand.ID = 'e7886353-53b3-4bbe-93b5-6490e5f1305e';
|
|
321
389
|
|
|
390
|
+
/**
|
|
391
|
+
* Represents a command to remove a map control from the map.
|
|
392
|
+
*
|
|
393
|
+
* The command is identified by a unique static ID, and it requires a MapControl item
|
|
394
|
+
* to specify the control to be removed.
|
|
395
|
+
*
|
|
396
|
+
* @extends PostboyGenericMessage
|
|
397
|
+
*/
|
|
322
398
|
class RemoveControlCommand extends PostboyGenericMessage {
|
|
399
|
+
/**
|
|
400
|
+
* Constructs an instance of the class.
|
|
401
|
+
*
|
|
402
|
+
* @param {MapControl} item - The map control instance to be removed.
|
|
403
|
+
*/
|
|
323
404
|
constructor(item) {
|
|
324
405
|
super();
|
|
325
406
|
this.item = item;
|
|
326
407
|
}
|
|
327
|
-
get id() {
|
|
328
|
-
return RemoveControlCommand.ID;
|
|
329
|
-
}
|
|
330
408
|
}
|
|
331
|
-
RemoveControlCommand.ID = '
|
|
409
|
+
RemoveControlCommand.ID = '73bcb4f5-ce7d-4c71-b70d-e772100136a1';
|
|
332
410
|
|
|
333
411
|
/**
|
|
334
412
|
* Forces map to move to a specific point
|
|
@@ -346,34 +424,136 @@ class SetMapCenterCommand extends PostboyGenericMessage {
|
|
|
346
424
|
this.lng = lng;
|
|
347
425
|
this.zoom = zoom;
|
|
348
426
|
}
|
|
349
|
-
|
|
350
|
-
|
|
427
|
+
}
|
|
428
|
+
SetMapCenterCommand.ID = 'd4e3cf4f-0be7-4c1a-8355-8607d02c3dea';
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* FitToPolygonsCommand is a command used to fit a given set of polygon features
|
|
432
|
+
* to the viewable area, optionally applying a zoom transformation afterwards.
|
|
433
|
+
*/
|
|
434
|
+
class FitToPolygonsCommand extends PostboyGenericMessage {
|
|
435
|
+
/**
|
|
436
|
+
* Creates an instance of the class with specified polygon features and an optional zoom level.
|
|
437
|
+
*
|
|
438
|
+
* @param {PolygonModel[]} features - An array of polygon models to fit to.
|
|
439
|
+
* @param {number} [zoomAfter=0] - Optional zoom level change to apply after initialization. Defaults to 0.
|
|
440
|
+
*/
|
|
441
|
+
constructor(features, zoomAfter = 0) {
|
|
442
|
+
super();
|
|
443
|
+
this.features = features;
|
|
444
|
+
this.zoomAfter = zoomAfter;
|
|
351
445
|
}
|
|
352
446
|
}
|
|
353
|
-
|
|
447
|
+
FitToPolygonsCommand.ID = '308394ce-48d3-45f5-8671-52207fba4be3';
|
|
354
448
|
|
|
355
|
-
|
|
356
|
-
|
|
449
|
+
/**
|
|
450
|
+
* Represents an event triggered when a map rendering process is completed.
|
|
451
|
+
*/
|
|
452
|
+
class MapRenderedEvent extends PostboyGenericMessage {
|
|
453
|
+
/**
|
|
454
|
+
* Constructor for creating an instance of the class.
|
|
455
|
+
*
|
|
456
|
+
* @param {Map} map - The map instance to be used by the class.
|
|
457
|
+
*/
|
|
458
|
+
constructor(map) {
|
|
357
459
|
super();
|
|
358
|
-
this.
|
|
460
|
+
this.map = map;
|
|
359
461
|
}
|
|
360
|
-
|
|
361
|
-
|
|
462
|
+
}
|
|
463
|
+
MapRenderedEvent.ID = '4515dde8-1519-4e3f-a0e3-10d3c52deabe';
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Represents an event triggered by a click on a map, containing information about the
|
|
467
|
+
* click's location, relevant entities, and features present at the clicked position.
|
|
468
|
+
*
|
|
469
|
+
* @extends {PostboyGenericMessage}
|
|
470
|
+
*/
|
|
471
|
+
class MapClickEvent extends PostboyGenericMessage {
|
|
472
|
+
/**
|
|
473
|
+
* Creates an instance of this class with the provided coordinates, entities, and features.
|
|
474
|
+
*
|
|
475
|
+
* @param {number[]} coordinates - An array representing the coordinates.
|
|
476
|
+
* @param {{ [layer: string]: IIdentified[] }} entities - A mapping of layer names to arrays of IIdentified entities.
|
|
477
|
+
* @param {{ [layer: string]: Feature<Geometry>[] }} features - A mapping of layer names to arrays of features with geometry.
|
|
478
|
+
*/
|
|
479
|
+
constructor(coordinates, entities, features) {
|
|
480
|
+
super();
|
|
481
|
+
this.coordinates = coordinates;
|
|
482
|
+
this.entities = entities;
|
|
483
|
+
this.features = features;
|
|
362
484
|
}
|
|
363
485
|
}
|
|
364
|
-
|
|
486
|
+
MapClickEvent.ID = 'ee31a86c-e838-4531-8399-983753a354df';
|
|
365
487
|
|
|
366
|
-
|
|
367
|
-
|
|
488
|
+
/**
|
|
489
|
+
* Represents an event that is triggered when the movement of a map ends.
|
|
490
|
+
* This class is used to capture the final position of a map after a movement operation.
|
|
491
|
+
*
|
|
492
|
+
* @property {MapPosition | null} position - The final position of the map after movement ends. Can be null.
|
|
493
|
+
*/
|
|
494
|
+
class MapMoveEndEvent extends PostboyGenericMessage {
|
|
495
|
+
constructor(position) {
|
|
368
496
|
super();
|
|
497
|
+
this.position = position;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
MapMoveEndEvent.ID = 'd210ec7e-032f-4ce8-8a39-7b816519eaae';
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* A class responsible for executing filtering of geographical features
|
|
504
|
+
* based on a specific geographical point (latitude and longitude).
|
|
505
|
+
*
|
|
506
|
+
* @template Feature - A geographical feature that is processed by the executor.
|
|
507
|
+
* @template Geometry - The type of geometry associated with the feature.
|
|
508
|
+
*/
|
|
509
|
+
class FilterFeaturesInPointExecutor extends PostboyExecutor {
|
|
510
|
+
/**
|
|
511
|
+
* Constructs a new instance with the specified latitude, longitude, and features.
|
|
512
|
+
*
|
|
513
|
+
* @param {number} lat - The latitude coordinate.
|
|
514
|
+
* @param {number} lng - The longitude coordinate.
|
|
515
|
+
* @param {Feature<Geometry>[]} features - The array of features associated with the location.
|
|
516
|
+
*/
|
|
517
|
+
constructor(lat, lng, features) {
|
|
518
|
+
super();
|
|
519
|
+
this.lat = lat;
|
|
520
|
+
this.lng = lng;
|
|
521
|
+
this.features = features;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
FilterFeaturesInPointExecutor.ID = 'dcbb156d-def3-45b4-91af-84d1483d8941';
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* A class that extends the PostboyExecutor to filter geographical features within a specified area.
|
|
528
|
+
* This class is designed to process a list of input features and determine which of them are located inside the provided area geometry.
|
|
529
|
+
*
|
|
530
|
+
* Parameters:
|
|
531
|
+
* - `area`: A Geometry object defining the area to filter geographical features.
|
|
532
|
+
* - `features`: An array of geographical features, represented as `Feature<Geometry>` objects, to be filtered by their presence within the specified area.
|
|
533
|
+
*/
|
|
534
|
+
class FilterFeaturesInAreaExecutor extends PostboyExecutor {
|
|
535
|
+
constructor(area, features) {
|
|
536
|
+
super();
|
|
537
|
+
this.area = area;
|
|
369
538
|
this.features = features;
|
|
370
|
-
this.zoomAfter = zoomAfter;
|
|
371
539
|
}
|
|
372
|
-
|
|
373
|
-
|
|
540
|
+
}
|
|
541
|
+
FilterFeaturesInAreaExecutor.ID = '4d26e1e3-e60f-4e49-804b-5b3eadc2adce';
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* An executor responsible for calculating the area of a given polygon.
|
|
545
|
+
*
|
|
546
|
+
* Use this class to manage and execute area-calculation logic for a polygon.
|
|
547
|
+
*
|
|
548
|
+
* @return {number} - the spherical area (in square meters)
|
|
549
|
+
*/
|
|
550
|
+
class CalculateAreaExecutor extends PostboyExecutor {
|
|
551
|
+
constructor(polygon) {
|
|
552
|
+
super();
|
|
553
|
+
this.polygon = polygon;
|
|
374
554
|
}
|
|
375
555
|
}
|
|
376
|
-
|
|
556
|
+
CalculateAreaExecutor.ID = '82347b8c-7635-45ec-85ef-75aaf43bc34c';
|
|
377
557
|
|
|
378
558
|
/**
|
|
379
559
|
* A message that allows to get the current state of the map.
|
|
@@ -381,82 +561,59 @@ FitToPolygonsCommand.ID = 'a9e42b23-ffaf-4c46-8370-e0432cd14d60';
|
|
|
381
561
|
* @returns {MapPosition | null}
|
|
382
562
|
*/
|
|
383
563
|
class GetMapPositionExecutor extends PostboyExecutor {
|
|
384
|
-
get id() {
|
|
385
|
-
return GetMapPositionExecutor.ID;
|
|
386
|
-
}
|
|
387
564
|
constructor() {
|
|
388
565
|
super();
|
|
389
566
|
}
|
|
390
567
|
}
|
|
391
568
|
GetMapPositionExecutor.ID = '52c95689-d09b-4082-ba58-9183ea96a213';
|
|
392
569
|
|
|
570
|
+
/**
|
|
571
|
+
* Class representing a query to get features within a specified geographical area.
|
|
572
|
+
* The query optionally takes a set of layer names to ignore during the operation.
|
|
573
|
+
*/
|
|
393
574
|
class GetFeaturesInAreaQuery extends PostboyCallbackMessage {
|
|
575
|
+
/**
|
|
576
|
+
* Constructor to initialize the object with a Geometry instance and an optional set of strings to ignore.
|
|
577
|
+
*
|
|
578
|
+
* @param {Geometry} area - The Geometry object used to define the area.
|
|
579
|
+
* @param {Set<string>} [ignore] - An optional set of layer names that will be ignored. Defaults to an empty set.
|
|
580
|
+
*/
|
|
394
581
|
constructor(area, ignore = new Set()) {
|
|
395
582
|
super();
|
|
396
583
|
this.area = area;
|
|
397
584
|
this.ignore = ignore;
|
|
398
585
|
}
|
|
399
|
-
get id() {
|
|
400
|
-
return GetFeaturesInAreaQuery.ID;
|
|
401
|
-
}
|
|
402
586
|
}
|
|
403
|
-
GetFeaturesInAreaQuery.ID = '
|
|
404
|
-
|
|
405
|
-
class FilterFeaturesInAreaExecutor extends PostboyExecutor {
|
|
406
|
-
constructor(area, features) {
|
|
407
|
-
super();
|
|
408
|
-
this.area = area;
|
|
409
|
-
this.features = features;
|
|
410
|
-
}
|
|
411
|
-
get id() {
|
|
412
|
-
return FilterFeaturesInAreaExecutor.ID;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
FilterFeaturesInAreaExecutor.ID = '36bb2d94-8028-4512-90dd-2386af3fc67c';
|
|
587
|
+
GetFeaturesInAreaQuery.ID = '317cf427-a029-4a43-97c4-cb6b8148ff65';
|
|
416
588
|
|
|
417
589
|
/**
|
|
418
590
|
* Represents a query to retrieve features located at a specific geographical point.
|
|
419
591
|
* The query is defined by latitude, longitude, and an optional set of features to ignore.
|
|
420
592
|
*/
|
|
421
593
|
class GetFeaturesInPointQuery extends PostboyCallbackMessage {
|
|
594
|
+
/**
|
|
595
|
+
* Constructor for initializing a geographic coordinate object.
|
|
596
|
+
*
|
|
597
|
+
* @param {number} lat - The latitude of the location.
|
|
598
|
+
* @param {number} lng - The longitude of the location.
|
|
599
|
+
* @param {Set<string>} [ignore=new Set<string>()] - An optional set of strings to ignore during processing.
|
|
600
|
+
*/
|
|
422
601
|
constructor(lat, lng, ignore = new Set()) {
|
|
423
602
|
super();
|
|
424
603
|
this.lat = lat;
|
|
425
604
|
this.lng = lng;
|
|
426
605
|
this.ignore = ignore;
|
|
427
606
|
}
|
|
428
|
-
get id() {
|
|
429
|
-
return GetFeaturesInPointQuery.ID;
|
|
430
|
-
}
|
|
431
607
|
}
|
|
432
|
-
GetFeaturesInPointQuery.ID = '
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* The FilterFeaturesInPointExecutor class is responsible for filtering features within a given point.
|
|
436
|
-
*/
|
|
437
|
-
class FilterFeaturesInPointExecutor extends PostboyExecutor {
|
|
438
|
-
get id() {
|
|
439
|
-
return FilterFeaturesInPointExecutor.ID;
|
|
440
|
-
}
|
|
441
|
-
constructor(lat, lng, features) {
|
|
442
|
-
super();
|
|
443
|
-
this.lat = lat;
|
|
444
|
-
this.lng = lng;
|
|
445
|
-
this.features = features;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
FilterFeaturesInPointExecutor.ID = '5b859282-5d5a-47ca-a6ad-863a66c8b82b';
|
|
608
|
+
GetFeaturesInPointQuery.ID = '99bbc56f-34a2-4064-8300-13bb3d0662c1';
|
|
449
609
|
|
|
450
610
|
class AddLayerCommand extends PostboyGenericMessage {
|
|
451
611
|
constructor(layer) {
|
|
452
612
|
super();
|
|
453
613
|
this.layer = layer;
|
|
454
614
|
}
|
|
455
|
-
get id() {
|
|
456
|
-
return AddLayerCommand.ID;
|
|
457
|
-
}
|
|
458
615
|
}
|
|
459
|
-
AddLayerCommand.ID = '
|
|
616
|
+
AddLayerCommand.ID = '7fe68d71-350f-47e2-b1ae-62cc333e1572';
|
|
460
617
|
|
|
461
618
|
class PlaceLayerFeaturesCommand extends PostboyGenericMessage {
|
|
462
619
|
constructor(layer, features) {
|
|
@@ -464,44 +621,32 @@ class PlaceLayerFeaturesCommand extends PostboyGenericMessage {
|
|
|
464
621
|
this.layer = layer;
|
|
465
622
|
this.features = features;
|
|
466
623
|
}
|
|
467
|
-
get id() {
|
|
468
|
-
return PlaceLayerFeaturesCommand.ID;
|
|
469
|
-
}
|
|
470
624
|
}
|
|
471
|
-
PlaceLayerFeaturesCommand.ID = '
|
|
625
|
+
PlaceLayerFeaturesCommand.ID = '5f27a2cd-8d8a-4929-b703-8aee6dcdc21c';
|
|
472
626
|
|
|
473
627
|
class RemoveLayerCommand extends PostboyGenericMessage {
|
|
474
628
|
constructor(layer) {
|
|
475
629
|
super();
|
|
476
630
|
this.layer = layer;
|
|
477
631
|
}
|
|
478
|
-
get id() {
|
|
479
|
-
return RemoveLayerCommand.ID;
|
|
480
|
-
}
|
|
481
632
|
}
|
|
482
|
-
RemoveLayerCommand.ID = '
|
|
633
|
+
RemoveLayerCommand.ID = '1b60599c-599a-4fdb-bad2-23b12e435e1a';
|
|
483
634
|
|
|
484
635
|
class AddTileCommand extends PostboyGenericMessage {
|
|
485
636
|
constructor(layer) {
|
|
486
637
|
super();
|
|
487
638
|
this.layer = layer;
|
|
488
639
|
}
|
|
489
|
-
get id() {
|
|
490
|
-
return AddTileCommand.ID;
|
|
491
|
-
}
|
|
492
640
|
}
|
|
493
|
-
AddTileCommand.ID = '
|
|
641
|
+
AddTileCommand.ID = 'ae29b7af-21aa-4b0a-8586-92c23779e6cb';
|
|
494
642
|
|
|
495
643
|
class RemoveTileCommand extends PostboyGenericMessage {
|
|
496
644
|
constructor(layer) {
|
|
497
645
|
super();
|
|
498
646
|
this.layer = layer;
|
|
499
647
|
}
|
|
500
|
-
get id() {
|
|
501
|
-
return RemoveTileCommand.ID;
|
|
502
|
-
}
|
|
503
648
|
}
|
|
504
|
-
RemoveTileCommand.ID = '
|
|
649
|
+
RemoveTileCommand.ID = 'dab0f861-bb25-46da-9388-717bfaae798f';
|
|
505
650
|
|
|
506
651
|
class FitToFeaturesCommand extends PostboyGenericMessage {
|
|
507
652
|
constructor(features, zoomAfter = 0) {
|
|
@@ -509,32 +654,20 @@ class FitToFeaturesCommand extends PostboyGenericMessage {
|
|
|
509
654
|
this.features = features;
|
|
510
655
|
this.zoomAfter = zoomAfter;
|
|
511
656
|
}
|
|
512
|
-
get id() {
|
|
513
|
-
return FitToFeaturesCommand.ID;
|
|
514
|
-
}
|
|
515
657
|
}
|
|
516
|
-
FitToFeaturesCommand.ID = '
|
|
658
|
+
FitToFeaturesCommand.ID = '04d67609-0b4c-4f52-aa53-ad0a3db967dc';
|
|
517
659
|
|
|
518
660
|
class GetLayerQuery extends PostboyCallbackMessage {
|
|
519
661
|
constructor(name) {
|
|
520
662
|
super();
|
|
521
663
|
this.name = name;
|
|
522
664
|
}
|
|
523
|
-
get id() {
|
|
524
|
-
return GetLayerQuery.ID;
|
|
525
|
-
}
|
|
526
665
|
}
|
|
527
|
-
GetLayerQuery.ID = '
|
|
666
|
+
GetLayerQuery.ID = 'd2683490-2aa2-4dee-855d-f752ce4d3be5';
|
|
528
667
|
|
|
529
668
|
class DrawingFinishedEvent extends PostboyGenericMessage {
|
|
530
|
-
constructor() {
|
|
531
|
-
super();
|
|
532
|
-
}
|
|
533
|
-
get id() {
|
|
534
|
-
return DrawingFinishedEvent.ID;
|
|
535
|
-
}
|
|
536
669
|
}
|
|
537
|
-
DrawingFinishedEvent.ID = '
|
|
670
|
+
DrawingFinishedEvent.ID = '9094e160-8df7-4868-883a-3436724106dd';
|
|
538
671
|
|
|
539
672
|
class DrawingGenerationService {
|
|
540
673
|
static getDraw(ev) {
|
|
@@ -589,22 +722,16 @@ class GenerateDrawExecutor extends PostboyExecutor {
|
|
|
589
722
|
this.style = style;
|
|
590
723
|
this.type = type;
|
|
591
724
|
}
|
|
592
|
-
get id() {
|
|
593
|
-
return GenerateDrawExecutor.ID;
|
|
594
|
-
}
|
|
595
725
|
}
|
|
596
|
-
GenerateDrawExecutor.ID = '
|
|
726
|
+
GenerateDrawExecutor.ID = '5d5f0737-ff70-461e-9a2e-bf6166c914cb';
|
|
597
727
|
|
|
598
728
|
class GenerateZoomControlExecutor extends PostboyExecutor {
|
|
599
729
|
constructor(settings) {
|
|
600
730
|
super();
|
|
601
731
|
this.settings = settings;
|
|
602
732
|
}
|
|
603
|
-
get id() {
|
|
604
|
-
return GenerateZoomControlExecutor.ID;
|
|
605
|
-
}
|
|
606
733
|
}
|
|
607
|
-
GenerateZoomControlExecutor.ID = '
|
|
734
|
+
GenerateZoomControlExecutor.ID = 'c59f4fc3-ccf6-4cb3-a38b-3a8c249114a2';
|
|
608
735
|
|
|
609
736
|
class ZoomControlFactory {
|
|
610
737
|
static build(settings) {
|
|
@@ -621,7 +748,11 @@ class ZoomControlFactory {
|
|
|
621
748
|
class MapPostboyService extends PostboyService {
|
|
622
749
|
constructor() {
|
|
623
750
|
super();
|
|
624
|
-
this.addLocker({
|
|
751
|
+
this.addLocker({
|
|
752
|
+
locker: StartDrawingCommand.name,
|
|
753
|
+
unlocker: DrawingFinishedEvent.name,
|
|
754
|
+
locking: [MapClickEvent.name],
|
|
755
|
+
});
|
|
625
756
|
}
|
|
626
757
|
}
|
|
627
758
|
MapPostboyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapPostboyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -647,29 +778,29 @@ class MapManagementService {
|
|
|
647
778
|
this.observeFeaturesInPoint();
|
|
648
779
|
}
|
|
649
780
|
observeRemoveTile() {
|
|
650
|
-
this.postboy.
|
|
781
|
+
this.postboy.sub(RemoveTileCommand).subscribe((c) => {
|
|
651
782
|
if (!this.map)
|
|
652
783
|
return;
|
|
653
784
|
this.map.removeLayer(c.layer);
|
|
654
785
|
});
|
|
655
786
|
}
|
|
656
787
|
observeLayerQuery() {
|
|
657
|
-
this.postboy.
|
|
788
|
+
this.postboy.sub(GetLayerQuery).subscribe((ev) => ev.finish(this.layers.take(ev.name)));
|
|
658
789
|
}
|
|
659
790
|
observeAddTile() {
|
|
660
|
-
this.postboy.
|
|
791
|
+
this.postboy.sub(AddTileCommand).subscribe((c) => {
|
|
661
792
|
if (!this.map)
|
|
662
793
|
return;
|
|
663
794
|
this.map.addLayer(c.layer);
|
|
664
795
|
});
|
|
665
796
|
}
|
|
666
797
|
observeMapRender() {
|
|
667
|
-
this.postboy.
|
|
798
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
668
799
|
this.map = m.map;
|
|
669
800
|
});
|
|
670
801
|
}
|
|
671
802
|
observeAddLayer() {
|
|
672
|
-
this.postboy.
|
|
803
|
+
this.postboy.sub(AddLayerCommand).subscribe((c) => {
|
|
673
804
|
if (!this.map)
|
|
674
805
|
return;
|
|
675
806
|
this.layers.put(c.layer.get('name'), c.layer);
|
|
@@ -677,7 +808,7 @@ class MapManagementService {
|
|
|
677
808
|
});
|
|
678
809
|
}
|
|
679
810
|
observePlaceFeatures() {
|
|
680
|
-
this.postboy.
|
|
811
|
+
this.postboy.sub(PlaceLayerFeaturesCommand).subscribe((c) => {
|
|
681
812
|
var _a;
|
|
682
813
|
if (!this.layers.has(c.layer))
|
|
683
814
|
return;
|
|
@@ -689,7 +820,7 @@ class MapManagementService {
|
|
|
689
820
|
});
|
|
690
821
|
}
|
|
691
822
|
observeRemoveLayer() {
|
|
692
|
-
this.postboy.
|
|
823
|
+
this.postboy.sub(RemoveLayerCommand).subscribe((c) => {
|
|
693
824
|
if (!this.map)
|
|
694
825
|
return;
|
|
695
826
|
this.layers.rmv(c.layer.get('name'));
|
|
@@ -697,22 +828,22 @@ class MapManagementService {
|
|
|
697
828
|
});
|
|
698
829
|
}
|
|
699
830
|
observeFeaturesInArea() {
|
|
700
|
-
this.postboy.
|
|
831
|
+
this.postboy.sub(GetFeaturesInAreaQuery).subscribe((qr) => {
|
|
701
832
|
let result = new Dictionary();
|
|
702
833
|
this.forEachLayer((l, s) => {
|
|
703
834
|
var _a;
|
|
704
|
-
let features = this.postboy.
|
|
835
|
+
let features = this.postboy.exec(new FilterFeaturesInAreaExecutor(qr.area, (_a = s === null || s === void 0 ? void 0 : s.getFeatures()) !== null && _a !== void 0 ? _a : []));
|
|
705
836
|
result.put(l.get('name'), features.map((e) => (Object.assign({ id: e.getId() }, e.get(MapConstants.FeatureInfo)))));
|
|
706
837
|
}, qr.ignore);
|
|
707
838
|
qr.finish(result);
|
|
708
839
|
});
|
|
709
840
|
}
|
|
710
841
|
observeFeaturesInPoint() {
|
|
711
|
-
this.postboy.
|
|
842
|
+
this.postboy.sub(GetFeaturesInPointQuery).subscribe((qr) => {
|
|
712
843
|
let result = new Dictionary();
|
|
713
844
|
this.forEachLayer((l, s) => {
|
|
714
845
|
var _a;
|
|
715
|
-
let features = this.postboy.
|
|
846
|
+
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 : []));
|
|
716
847
|
result.put(l.get('name'), features.map((e) => (Object.assign({ id: e.getId() }, e.get(MapConstants.FeatureInfo)))));
|
|
717
848
|
}, qr.ignore);
|
|
718
849
|
qr.finish(result);
|
|
@@ -754,7 +885,7 @@ class MapStateService {
|
|
|
754
885
|
}
|
|
755
886
|
observeMapRendering() {
|
|
756
887
|
this.postboy
|
|
757
|
-
.
|
|
888
|
+
.sub(MapRenderedEvent)
|
|
758
889
|
.pipe(first())
|
|
759
890
|
.subscribe((ev) => {
|
|
760
891
|
var _a;
|
|
@@ -765,7 +896,7 @@ class MapStateService {
|
|
|
765
896
|
});
|
|
766
897
|
}
|
|
767
898
|
observeCenter() {
|
|
768
|
-
this.postboy.
|
|
899
|
+
this.postboy.sub(SetMapCenterCommand).subscribe((c) => {
|
|
769
900
|
var _a, _b;
|
|
770
901
|
(_a = this.map) === null || _a === void 0 ? void 0 : _a.getView().setCenter([c.lng, c.lat]);
|
|
771
902
|
if (c.zoom)
|
|
@@ -789,19 +920,19 @@ class MapFeatureService {
|
|
|
789
920
|
this.observeFitToPolygons();
|
|
790
921
|
}
|
|
791
922
|
observeMapRender() {
|
|
792
|
-
this.postboy.
|
|
923
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
793
924
|
this.map = m.map;
|
|
794
925
|
if (this.fitPolygonsWaiting)
|
|
795
926
|
this.postboy.fire(this.fitPolygonsWaiting);
|
|
796
927
|
});
|
|
797
928
|
}
|
|
798
929
|
observeFitToFeatures() {
|
|
799
|
-
this.postboy.
|
|
930
|
+
this.postboy.sub(FitToFeaturesCommand).subscribe((cmd) => {
|
|
800
931
|
this.fitToGeometries(cmd.features.map((f) => f.getGeometry()), cmd.zoomAfter);
|
|
801
932
|
});
|
|
802
933
|
}
|
|
803
934
|
observeFitToPolygons() {
|
|
804
|
-
this.postboy.
|
|
935
|
+
this.postboy.sub(FitToPolygonsCommand).subscribe((cmd) => {
|
|
805
936
|
if (!this.map) {
|
|
806
937
|
this.fitPolygonsWaiting = cmd;
|
|
807
938
|
return;
|
|
@@ -851,7 +982,7 @@ class MapClickService {
|
|
|
851
982
|
return model;
|
|
852
983
|
}
|
|
853
984
|
observeMapRender() {
|
|
854
|
-
this.postboy.
|
|
985
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
855
986
|
var _a;
|
|
856
987
|
this.map = m.map;
|
|
857
988
|
(_a = this.map) === null || _a === void 0 ? void 0 : _a.on('singleclick', (e) => {
|
|
@@ -884,23 +1015,19 @@ class DrawingService {
|
|
|
884
1015
|
this.observeMapRender();
|
|
885
1016
|
}
|
|
886
1017
|
observeSelectArea() {
|
|
887
|
-
this.postboy.
|
|
888
|
-
|
|
889
|
-
drawingCommand.result.subscribe((r) => {
|
|
1018
|
+
this.postboy.sub(DrawSelectionAreaCommand).subscribe((ev) => {
|
|
1019
|
+
this.postboy.fireCallback(new StartDrawingCommand(ev.type, ev.style), (r) => {
|
|
890
1020
|
if (!r) {
|
|
891
1021
|
ev.finish(new Dictionary());
|
|
892
1022
|
return;
|
|
893
1023
|
}
|
|
894
1024
|
const area = PolygonModel.fromGeoJson(1, r).feature.getGeometry();
|
|
895
|
-
|
|
896
|
-
getFeaturesCommand.result.subscribe((result) => ev.finish(result));
|
|
897
|
-
this.postboy.fire(getFeaturesCommand);
|
|
1025
|
+
this.postboy.fireCallback(new GetFeaturesInAreaQuery(area, ev.ignore), (result) => ev.finish(result));
|
|
898
1026
|
});
|
|
899
|
-
this.postboy.fire(drawingCommand);
|
|
900
1027
|
});
|
|
901
1028
|
}
|
|
902
1029
|
observeDrawing() {
|
|
903
|
-
this.postboy.
|
|
1030
|
+
this.postboy.sub(StartDrawingCommand).subscribe((ev) => {
|
|
904
1031
|
this.draw((l) => {
|
|
905
1032
|
var _a;
|
|
906
1033
|
if (!l || !this.map) {
|
|
@@ -908,7 +1035,7 @@ class DrawingService {
|
|
|
908
1035
|
return;
|
|
909
1036
|
}
|
|
910
1037
|
const cancelSub = this.observeCancelation(ev, l);
|
|
911
|
-
this.drawInteraction = this.postboy.
|
|
1038
|
+
this.drawInteraction = this.postboy.exec(new GenerateDrawExecutor(l, ev.style, ev.type));
|
|
912
1039
|
(_a = this.map) === null || _a === void 0 ? void 0 : _a.addInteraction(this.drawInteraction);
|
|
913
1040
|
this.drawInteraction.on('drawend', (evt) => {
|
|
914
1041
|
cancelSub.unsubscribe();
|
|
@@ -924,18 +1051,16 @@ class DrawingService {
|
|
|
924
1051
|
this.clearInteraction(layer);
|
|
925
1052
|
}
|
|
926
1053
|
observeMapRender() {
|
|
927
|
-
this.postboy.
|
|
1054
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
928
1055
|
this.map = m.map;
|
|
929
1056
|
});
|
|
930
1057
|
}
|
|
931
1058
|
draw(action) {
|
|
932
|
-
|
|
933
|
-
query.result.subscribe((l) => action(l));
|
|
934
|
-
this.postboy.fire(query);
|
|
1059
|
+
this.postboy.fireCallback(new GetLayerQuery(MapConstants.DrawingLayerId), (l) => action(l));
|
|
935
1060
|
}
|
|
936
1061
|
observeCancelation(ev, layer) {
|
|
937
1062
|
return this.postboy
|
|
938
|
-
.
|
|
1063
|
+
.sub(CancelDrawingCommand)
|
|
939
1064
|
.pipe(first())
|
|
940
1065
|
.subscribe(() => {
|
|
941
1066
|
ev.finish(null);
|
|
@@ -966,7 +1091,7 @@ class FeatureModificationService {
|
|
|
966
1091
|
this.observeMapRender();
|
|
967
1092
|
}
|
|
968
1093
|
observeModification() {
|
|
969
|
-
this.postboy.
|
|
1094
|
+
this.postboy.sub(ModifyFeatureCommand).subscribe((ev) => {
|
|
970
1095
|
this.defineLayer((l) => {
|
|
971
1096
|
if (!l || !this.map) {
|
|
972
1097
|
this.clearInteraction(l);
|
|
@@ -1016,18 +1141,16 @@ class FeatureModificationService {
|
|
|
1016
1141
|
: new WKT().writeFeature(command.model.feature));
|
|
1017
1142
|
}
|
|
1018
1143
|
observeMapRender() {
|
|
1019
|
-
this.postboy.
|
|
1144
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
1020
1145
|
this.map = m.map;
|
|
1021
1146
|
});
|
|
1022
1147
|
}
|
|
1023
1148
|
defineLayer(action) {
|
|
1024
|
-
|
|
1025
|
-
query.result.subscribe((l) => action(l));
|
|
1026
|
-
this.postboy.fire(query);
|
|
1149
|
+
this.postboy.fireCallback(new GetLayerQuery(MapConstants.DrawingLayerId), (l) => action(l));
|
|
1027
1150
|
}
|
|
1028
1151
|
observeCancelation(ev, layer) {
|
|
1029
1152
|
return this.postboy
|
|
1030
|
-
.
|
|
1153
|
+
.sub(CancelFeatureModificationCommand)
|
|
1031
1154
|
.pipe(first())
|
|
1032
1155
|
.subscribe(() => {
|
|
1033
1156
|
ev.finish(null);
|
|
@@ -1057,7 +1180,7 @@ class ControlsService {
|
|
|
1057
1180
|
}
|
|
1058
1181
|
observeMapRender() {
|
|
1059
1182
|
this.postboy
|
|
1060
|
-
.
|
|
1183
|
+
.sub(MapRenderedEvent)
|
|
1061
1184
|
.pipe(first())
|
|
1062
1185
|
.subscribe((m) => {
|
|
1063
1186
|
this.map = m.map;
|
|
@@ -1066,12 +1189,10 @@ class ControlsService {
|
|
|
1066
1189
|
});
|
|
1067
1190
|
}
|
|
1068
1191
|
observeAdding() {
|
|
1069
|
-
this.postboy.
|
|
1192
|
+
this.postboy.sub(AddControlCommand).subscribe((c) => { var _a; return (_a = this.map) === null || _a === void 0 ? void 0 : _a.addControl(c.item); });
|
|
1070
1193
|
}
|
|
1071
1194
|
observeRemoving() {
|
|
1072
|
-
this.postboy
|
|
1073
|
-
.subscribe(RemoveControlCommand.ID)
|
|
1074
|
-
.subscribe((c) => { var _a; return (_a = this.map) === null || _a === void 0 ? void 0 : _a.removeControl(c.item); });
|
|
1195
|
+
this.postboy.sub(RemoveControlCommand).subscribe((c) => { var _a; return (_a = this.map) === null || _a === void 0 ? void 0 : _a.removeControl(c.item); });
|
|
1075
1196
|
}
|
|
1076
1197
|
}
|
|
1077
1198
|
ControlsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ControlsService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -1087,38 +1208,38 @@ class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
|
1087
1208
|
this.registerServices([management, state, interaction, mapFeature, drawing, featureModification, controls]);
|
|
1088
1209
|
}
|
|
1089
1210
|
_up() {
|
|
1090
|
-
this.
|
|
1091
|
-
this.
|
|
1092
|
-
this.
|
|
1093
|
-
this.
|
|
1094
|
-
this.
|
|
1095
|
-
this.
|
|
1096
|
-
this.
|
|
1097
|
-
this.
|
|
1098
|
-
this.
|
|
1099
|
-
this.
|
|
1100
|
-
this.
|
|
1101
|
-
this.
|
|
1102
|
-
this.
|
|
1103
|
-
this.
|
|
1104
|
-
this.
|
|
1105
|
-
this.
|
|
1106
|
-
this.
|
|
1107
|
-
this.
|
|
1108
|
-
this.
|
|
1109
|
-
this.
|
|
1110
|
-
this.
|
|
1111
|
-
this.
|
|
1112
|
-
this.
|
|
1211
|
+
this.recordReplay(MapRenderedEvent);
|
|
1212
|
+
this.recordReplay(PlaceLayerFeaturesCommand);
|
|
1213
|
+
this.recordReplay(RemoveControlCommand);
|
|
1214
|
+
this.recordReplay(AddControlCommand);
|
|
1215
|
+
this.recordReplay(SetMapCenterCommand);
|
|
1216
|
+
this.recordSubject(AddLayerCommand);
|
|
1217
|
+
this.recordSubject(RemoveLayerCommand);
|
|
1218
|
+
this.recordSubject(AddTileCommand);
|
|
1219
|
+
this.recordSubject(RemoveTileCommand);
|
|
1220
|
+
this.recordSubject(MapClickEvent);
|
|
1221
|
+
this.recordSubject(CloseTooltipCommand);
|
|
1222
|
+
this.recordSubject(FitToFeaturesCommand);
|
|
1223
|
+
this.recordSubject(FitToPolygonsCommand);
|
|
1224
|
+
this.recordSubject(MapMoveEndEvent);
|
|
1225
|
+
this.recordSubject(CancelDrawingCommand);
|
|
1226
|
+
this.recordSubject(StartDrawingCommand);
|
|
1227
|
+
this.recordSubject(GetLayerQuery);
|
|
1228
|
+
this.recordSubject(DrawingFinishedEvent);
|
|
1229
|
+
this.recordSubject(GetFeaturesInAreaQuery);
|
|
1230
|
+
this.recordSubject(DrawSelectionAreaCommand);
|
|
1231
|
+
this.recordSubject(CancelFeatureModificationCommand);
|
|
1232
|
+
this.recordSubject(ModifyFeatureCommand);
|
|
1233
|
+
this.recordSubject(GetFeaturesInPointQuery);
|
|
1113
1234
|
this.setExecutors();
|
|
1114
1235
|
}
|
|
1115
1236
|
setExecutors() {
|
|
1116
|
-
this.
|
|
1117
|
-
this.
|
|
1118
|
-
this.
|
|
1119
|
-
this.
|
|
1120
|
-
this.
|
|
1121
|
-
this.
|
|
1237
|
+
this.recordExecutor(FilterFeaturesInAreaExecutor, (e) => FeatureService.filterFeaturesInArea(e));
|
|
1238
|
+
this.recordExecutor(FilterFeaturesInPointExecutor, (e) => FeatureService.filterFeaturesInPoint(e));
|
|
1239
|
+
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()); });
|
|
1240
|
+
this.recordExecutor(GenerateDrawExecutor, (e) => DrawingGenerationService.getDraw(e));
|
|
1241
|
+
this.recordExecutor(GenerateZoomControlExecutor, (e) => ZoomControlFactory.build(e.settings));
|
|
1242
|
+
this.recordExecutor(GetMapPositionExecutor, () => this.state.getMapPosition());
|
|
1122
1243
|
}
|
|
1123
1244
|
}
|
|
1124
1245
|
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 });
|
|
@@ -1347,7 +1468,7 @@ class TileLayerComponent extends DestructibleComponent {
|
|
|
1347
1468
|
}
|
|
1348
1469
|
ngOnInit() {
|
|
1349
1470
|
this.postboy
|
|
1350
|
-
.
|
|
1471
|
+
.sub(MapRenderedEvent)
|
|
1351
1472
|
.pipe(filter((m) => !!m), first())
|
|
1352
1473
|
.subscribe((m) => this.initLayer());
|
|
1353
1474
|
}
|
|
@@ -1571,7 +1692,7 @@ class FeatureLayerComponent extends DestructibleComponent {
|
|
|
1571
1692
|
}
|
|
1572
1693
|
ngOnInit() {
|
|
1573
1694
|
this.postboy
|
|
1574
|
-
.
|
|
1695
|
+
.sub(MapRenderedEvent)
|
|
1575
1696
|
.pipe(filter((m) => !!m), first())
|
|
1576
1697
|
.subscribe((m) => this.initLayer());
|
|
1577
1698
|
}
|
|
@@ -1749,14 +1870,14 @@ class ClusterLayerManager {
|
|
|
1749
1870
|
}
|
|
1750
1871
|
observeMapMovement() {
|
|
1751
1872
|
combineLatest([
|
|
1752
|
-
this.postboy.
|
|
1753
|
-
this.postboy.
|
|
1873
|
+
this.postboy.sub(MapMoveEndEvent).pipe(auditTime(250)),
|
|
1874
|
+
this.postboy.sub(MapRenderedEvent),
|
|
1754
1875
|
]).subscribe(([movement, renderEvent]) => {
|
|
1755
1876
|
this.checkClusterNecessity(renderEvent.map);
|
|
1756
1877
|
});
|
|
1757
1878
|
}
|
|
1758
1879
|
observeClick() {
|
|
1759
|
-
this.postboy.
|
|
1880
|
+
this.postboy.sub(MapClickEvent).subscribe((m) => {
|
|
1760
1881
|
var _a, _b;
|
|
1761
1882
|
if (((_b = (_a = m.features[this.settings.name]) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 1) {
|
|
1762
1883
|
this.postboy.fire(new FitToFeaturesCommand(m.features[this.settings.name], -1));
|
|
@@ -1847,7 +1968,7 @@ class ClusterLayerComponent extends DestructibleComponent {
|
|
|
1847
1968
|
}
|
|
1848
1969
|
ngOnInit() {
|
|
1849
1970
|
this.postboy
|
|
1850
|
-
.
|
|
1971
|
+
.sub(MapRenderedEvent)
|
|
1851
1972
|
.pipe(filter((m) => !!m), first())
|
|
1852
1973
|
.subscribe((m) => this.initLayer());
|
|
1853
1974
|
}
|
|
@@ -1989,7 +2110,7 @@ class MarkersComponent extends DestructibleComponent {
|
|
|
1989
2110
|
}
|
|
1990
2111
|
ngOnInit() {
|
|
1991
2112
|
this.postboy
|
|
1992
|
-
.
|
|
2113
|
+
.sub(MapRenderedEvent)
|
|
1993
2114
|
.pipe(filter((m) => !!m), first())
|
|
1994
2115
|
.subscribe(() => this.putMarkers());
|
|
1995
2116
|
}
|
|
@@ -2081,18 +2202,18 @@ class TooltipComponent extends DestructibleComponent {
|
|
|
2081
2202
|
this.detector.detectChanges();
|
|
2082
2203
|
}
|
|
2083
2204
|
observeMapClick() {
|
|
2084
|
-
return this.postboy.
|
|
2205
|
+
return this.postboy.sub(MapClickEvent).subscribe((ev) => {
|
|
2085
2206
|
this._settings.show(ev) ? this.addOverlay(ev.coordinates) : this.removeOverlay();
|
|
2086
2207
|
});
|
|
2087
2208
|
}
|
|
2088
2209
|
observeClose() {
|
|
2089
2210
|
return this.postboy
|
|
2090
|
-
.
|
|
2211
|
+
.sub(CloseTooltipCommand)
|
|
2091
2212
|
.pipe(filter((ev) => ev.tooltipId === this._settings.id))
|
|
2092
2213
|
.subscribe(() => this.removeOverlay());
|
|
2093
2214
|
}
|
|
2094
2215
|
observeMapRender() {
|
|
2095
|
-
return this.postboy.
|
|
2216
|
+
return this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
2096
2217
|
this.map = m.map;
|
|
2097
2218
|
});
|
|
2098
2219
|
}
|
|
@@ -2132,7 +2253,7 @@ class PolygonsComponent extends DestructibleComponent {
|
|
|
2132
2253
|
}
|
|
2133
2254
|
ngOnInit() {
|
|
2134
2255
|
this.postboy
|
|
2135
|
-
.
|
|
2256
|
+
.sub(MapRenderedEvent)
|
|
2136
2257
|
.pipe(filter((m) => !!m), first())
|
|
2137
2258
|
.subscribe(() => this.putPolygons());
|
|
2138
2259
|
}
|
|
@@ -2306,7 +2427,7 @@ class MapControlZoomComponent extends DestructibleComponent {
|
|
|
2306
2427
|
}
|
|
2307
2428
|
ngOnInit() {
|
|
2308
2429
|
this.postboy
|
|
2309
|
-
.
|
|
2430
|
+
.sub(MapRenderedEvent)
|
|
2310
2431
|
.pipe(filter((m) => !!m), first())
|
|
2311
2432
|
.subscribe((m) => {
|
|
2312
2433
|
this.map = m.map;
|
|
@@ -2316,7 +2437,7 @@ class MapControlZoomComponent extends DestructibleComponent {
|
|
|
2316
2437
|
setControl() {
|
|
2317
2438
|
if (!this.map)
|
|
2318
2439
|
return;
|
|
2319
|
-
this.control = this.postboy.
|
|
2440
|
+
this.control = this.postboy.exec(new GenerateZoomControlExecutor(this._settings));
|
|
2320
2441
|
this.map.addControl(this.control);
|
|
2321
2442
|
}
|
|
2322
2443
|
}
|