@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({ ...this, center });
|
|
89
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Sets the maximum zoom level for the map.
|
|
102
|
+
*
|
|
103
|
+
* @param {number} maxZoom - The maximum zoom level to be set.
|
|
104
|
+
* @return {MapSettings} A new instance of MapSettings with the updated maximum zoom level.
|
|
105
|
+
*/
|
|
90
106
|
setMaxZoom(maxZoom) {
|
|
91
107
|
return MapSettings.copy({ ...this, maxZoom });
|
|
92
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Sets the minimum zoom level for the map settings.
|
|
111
|
+
*
|
|
112
|
+
* @param {number} minZoom The minimum zoom level to be set. Must be a valid numeric value.
|
|
113
|
+
* @return {MapSettings} A new MapSettings object with the updated minimum zoom level.
|
|
114
|
+
*/
|
|
93
115
|
setMinZoom(minZoom) {
|
|
94
116
|
return MapSettings.copy({ ...this, minZoom });
|
|
95
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Adjusts the zoom level of the map by setting the specified value.
|
|
120
|
+
*
|
|
121
|
+
* @param {number} zoom - The desired zoom level to be set.
|
|
122
|
+
* @return {MapSettings} A new MapSettings instance with the updated zoom level.
|
|
123
|
+
*/
|
|
96
124
|
setZoom(zoom) {
|
|
97
125
|
return MapSettings.copy({ ...this, zoom });
|
|
98
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Sets the layers in the map settings with the provided layers.
|
|
129
|
+
*
|
|
130
|
+
* @param {MapLyrs} lyrs - The layers to be set in the map settings.
|
|
131
|
+
* @return {MapSettings} A new instance of MapSettings with the updated layers.
|
|
132
|
+
*/
|
|
99
133
|
setLyrs(lyrs) {
|
|
100
134
|
return MapSettings.copy({ ...this, lyrs });
|
|
101
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Updates the language setting for the map configuration and returns a new instance with the updated language.
|
|
138
|
+
*
|
|
139
|
+
* @param {string} language - The language to be set for the map configuration.
|
|
140
|
+
* @return {MapSettings} A new instance of MapSettings with the updated language.
|
|
141
|
+
*/
|
|
102
142
|
setLanguage(language) {
|
|
103
143
|
return MapSettings.copy({ ...this, language });
|
|
104
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Compares the current MapSettings instance with another to determine if they are identical.
|
|
147
|
+
*
|
|
148
|
+
* @param {MapSettings} model - The MapSettings instance to compare with the current instance.
|
|
149
|
+
* @return {boolean} Returns true if both MapSettings instances have the same properties and values; otherwise, false.
|
|
150
|
+
*/
|
|
105
151
|
isSame(model) {
|
|
106
152
|
if (this.maxZoom !== model.maxZoom)
|
|
107
153
|
return false;
|
|
@@ -180,6 +226,19 @@ class PolygonModel {
|
|
|
180
226
|
}
|
|
181
227
|
}
|
|
182
228
|
|
|
229
|
+
/**
|
|
230
|
+
* Enum representing various drawing types.
|
|
231
|
+
*
|
|
232
|
+
* This enumeration is used to define the types of drawable shapes
|
|
233
|
+
* within a specific drawing context. Each member corresponds to
|
|
234
|
+
* a specific type of drawing.
|
|
235
|
+
*
|
|
236
|
+
* Members:
|
|
237
|
+
* - `Polygon`: Represents a polygonal shape (e.g., triangle, pentagon, etc.).
|
|
238
|
+
* - `Circle`: Represents a circular shape.
|
|
239
|
+
* - `Square`: Represents a square shape.
|
|
240
|
+
* - `Box`: Represents a rectangular box shape.
|
|
241
|
+
*/
|
|
183
242
|
var DrawingType;
|
|
184
243
|
(function (DrawingType) {
|
|
185
244
|
DrawingType[DrawingType["Polygon"] = 1] = "Polygon";
|
|
@@ -188,6 +247,14 @@ var DrawingType;
|
|
|
188
247
|
DrawingType[DrawingType["Box"] = 4] = "Box";
|
|
189
248
|
})(DrawingType || (DrawingType = {}));
|
|
190
249
|
|
|
250
|
+
/**
|
|
251
|
+
* An enumeration representing different formats for feature outputs.
|
|
252
|
+
* This can be used to specify the desired output format when dealing with geospatial data.
|
|
253
|
+
*
|
|
254
|
+
* Enumerators:
|
|
255
|
+
* - GeoJson: Represents the GeoJSON format for geospatial data.
|
|
256
|
+
* - WKT: Represents the Well-Known Text (WKT) format for geospatial data.
|
|
257
|
+
*/
|
|
191
258
|
var FeatureOutputFormat;
|
|
192
259
|
(function (FeatureOutputFormat) {
|
|
193
260
|
FeatureOutputFormat[FeatureOutputFormat["GeoJson"] = 1] = "GeoJson";
|
|
@@ -208,126 +275,137 @@ class MapControl extends Control {
|
|
|
208
275
|
}
|
|
209
276
|
}
|
|
210
277
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
class MapClickEvent extends PostboyGenericMessage {
|
|
223
|
-
constructor(coordinates, entities, features) {
|
|
224
|
-
super();
|
|
225
|
-
this.coordinates = coordinates;
|
|
226
|
-
this.entities = entities;
|
|
227
|
-
this.features = features;
|
|
228
|
-
}
|
|
229
|
-
get id() {
|
|
230
|
-
return MapClickEvent.ID;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
MapClickEvent.ID = '323df526-8d9c-49c6-83e8-6e9a1e7762f7';
|
|
234
|
-
|
|
235
|
-
class MapMoveEndEvent extends PostboyGenericMessage {
|
|
236
|
-
constructor(position) {
|
|
278
|
+
/**
|
|
279
|
+
* Represents a command to add a custom control to a map.
|
|
280
|
+
*/
|
|
281
|
+
class AddControlCommand extends PostboyGenericMessage {
|
|
282
|
+
/**
|
|
283
|
+
* Creates an instance of the class with the specified MapControl object.
|
|
284
|
+
*
|
|
285
|
+
* @param {MapControl} item - The MapControl object to be associated with the instance.
|
|
286
|
+
*/
|
|
287
|
+
constructor(item) {
|
|
237
288
|
super();
|
|
238
|
-
this.
|
|
239
|
-
}
|
|
240
|
-
get id() {
|
|
241
|
-
return MapMoveEndEvent.ID;
|
|
289
|
+
this.item = item;
|
|
242
290
|
}
|
|
243
291
|
}
|
|
244
|
-
|
|
292
|
+
AddControlCommand.ID = '2921fb19-f1c4-4bf4-97be-001f98241f3b';
|
|
245
293
|
|
|
294
|
+
/**
|
|
295
|
+
* A command class that represents the action to close a tooltip.
|
|
296
|
+
*/
|
|
246
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
|
+
*/
|
|
247
303
|
constructor(tooltipId) {
|
|
248
304
|
super();
|
|
249
305
|
this.tooltipId = tooltipId;
|
|
250
306
|
}
|
|
251
|
-
get id() {
|
|
252
|
-
return CloseTooltipCommand.ID;
|
|
253
|
-
}
|
|
254
307
|
}
|
|
255
|
-
CloseTooltipCommand.ID = '
|
|
308
|
+
CloseTooltipCommand.ID = 'df687e26-7298-46d7-8911-d014801dafac';
|
|
256
309
|
|
|
310
|
+
/**
|
|
311
|
+
* Represents a command to start a drawing operation.
|
|
312
|
+
*/
|
|
257
313
|
class StartDrawingCommand extends PostboyCallbackMessage {
|
|
314
|
+
/**
|
|
315
|
+
* Constructor for creating an instance of the class that represents a drawing feature with specific type, style, and output format.
|
|
316
|
+
*
|
|
317
|
+
* @param {DrawingType} type - The type of the drawing to be created.
|
|
318
|
+
* @param {Style} style - The style defining visual appearance of the drawing.
|
|
319
|
+
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The format of the feature output. Defaults to GeoJson.
|
|
320
|
+
*/
|
|
258
321
|
constructor(type, style, format = FeatureOutputFormat.GeoJson) {
|
|
259
322
|
super();
|
|
260
323
|
this.type = type;
|
|
261
324
|
this.style = style;
|
|
262
325
|
this.format = format;
|
|
263
326
|
}
|
|
264
|
-
get id() {
|
|
265
|
-
return StartDrawingCommand.ID;
|
|
266
|
-
}
|
|
267
327
|
}
|
|
268
|
-
StartDrawingCommand.ID = '
|
|
328
|
+
StartDrawingCommand.ID = '4407e9ee-d6c3-4e77-8000-c1aae7433fb6';
|
|
269
329
|
|
|
330
|
+
/**
|
|
331
|
+
* Represents a command to cancel a drawing action.
|
|
332
|
+
*/
|
|
270
333
|
class CancelDrawingCommand extends PostboyGenericMessage {
|
|
271
|
-
get id() {
|
|
272
|
-
return CancelDrawingCommand.ID;
|
|
273
|
-
}
|
|
274
334
|
}
|
|
275
|
-
CancelDrawingCommand.ID = '
|
|
335
|
+
CancelDrawingCommand.ID = '192d70f8-9d12-4cb3-a8ad-0fc2dc5af1de';
|
|
276
336
|
|
|
337
|
+
/**
|
|
338
|
+
* Class representing a command to draw a selection area with a specific type and style.
|
|
339
|
+
*
|
|
340
|
+
* @return {Dictionary<IIdentified[]>} - a collection of features inside the selected area, grouped by a layer's name
|
|
341
|
+
*/
|
|
277
342
|
class DrawSelectionAreaCommand extends PostboyCallbackMessage {
|
|
343
|
+
/**
|
|
344
|
+
* Constructs a new instance with the specified type, style, and optional set of ignored items.
|
|
345
|
+
*
|
|
346
|
+
* @param {DrawingType} type - The type of drawing to be created.
|
|
347
|
+
* @param {Style} style - The style information for the drawing.
|
|
348
|
+
* @param {Set<string>} [ignore=new Set<string>()] - Optional set of items to be ignored.
|
|
349
|
+
*/
|
|
278
350
|
constructor(type, style, ignore = new Set()) {
|
|
279
351
|
super();
|
|
280
352
|
this.type = type;
|
|
281
353
|
this.style = style;
|
|
282
354
|
this.ignore = ignore;
|
|
283
355
|
}
|
|
284
|
-
get id() {
|
|
285
|
-
return DrawSelectionAreaCommand.ID;
|
|
286
|
-
}
|
|
287
356
|
}
|
|
288
|
-
DrawSelectionAreaCommand.ID = '
|
|
357
|
+
DrawSelectionAreaCommand.ID = '06e43f59-c6ba-41bb-9c5b-f6534d914905';
|
|
289
358
|
|
|
359
|
+
/**
|
|
360
|
+
* Represents a command to modify a feature with a specific style and output format
|
|
361
|
+
* for a polygonal model.
|
|
362
|
+
*
|
|
363
|
+
* @return {string | null} a string representation of the modified feature in the appropriate format
|
|
364
|
+
*/
|
|
290
365
|
class ModifyFeatureCommand extends PostboyCallbackMessage {
|
|
366
|
+
/**
|
|
367
|
+
* Constructs an instance of the class.
|
|
368
|
+
*
|
|
369
|
+
* @param {PolygonModel} model - The polygon model to be used.
|
|
370
|
+
* @param {Style} style - The style configuration for the polygon.
|
|
371
|
+
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The output format of the features. Default is GeoJson.
|
|
372
|
+
*/
|
|
291
373
|
constructor(model, style, format = FeatureOutputFormat.GeoJson) {
|
|
292
374
|
super();
|
|
293
375
|
this.model = model;
|
|
294
376
|
this.style = style;
|
|
295
377
|
this.format = format;
|
|
296
378
|
}
|
|
297
|
-
get id() {
|
|
298
|
-
return ModifyFeatureCommand.ID;
|
|
299
|
-
}
|
|
300
379
|
}
|
|
301
|
-
ModifyFeatureCommand.ID = '
|
|
380
|
+
ModifyFeatureCommand.ID = '8f76507e-f18d-4232-bab7-f3d4e3d707bb';
|
|
302
381
|
|
|
382
|
+
/**
|
|
383
|
+
* Represents a command to cancel a feature modification.
|
|
384
|
+
*/
|
|
303
385
|
class CancelFeatureModificationCommand extends PostboyGenericMessage {
|
|
304
|
-
get id() {
|
|
305
|
-
return CancelFeatureModificationCommand.ID;
|
|
306
|
-
}
|
|
307
386
|
}
|
|
308
|
-
CancelFeatureModificationCommand.ID = '
|
|
309
|
-
|
|
310
|
-
class AddControlCommand extends PostboyGenericMessage {
|
|
311
|
-
constructor(item) {
|
|
312
|
-
super();
|
|
313
|
-
this.item = item;
|
|
314
|
-
}
|
|
315
|
-
get id() {
|
|
316
|
-
return AddControlCommand.ID;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
AddControlCommand.ID = '8e1c06eb-b395-4fe1-929c-ebf0805eeb49';
|
|
387
|
+
CancelFeatureModificationCommand.ID = 'e7886353-53b3-4bbe-93b5-6490e5f1305e';
|
|
320
388
|
|
|
389
|
+
/**
|
|
390
|
+
* Represents a command to remove a map control from the map.
|
|
391
|
+
*
|
|
392
|
+
* The command is identified by a unique static ID, and it requires a MapControl item
|
|
393
|
+
* to specify the control to be removed.
|
|
394
|
+
*
|
|
395
|
+
* @extends PostboyGenericMessage
|
|
396
|
+
*/
|
|
321
397
|
class RemoveControlCommand extends PostboyGenericMessage {
|
|
398
|
+
/**
|
|
399
|
+
* Constructs an instance of the class.
|
|
400
|
+
*
|
|
401
|
+
* @param {MapControl} item - The map control instance to be removed.
|
|
402
|
+
*/
|
|
322
403
|
constructor(item) {
|
|
323
404
|
super();
|
|
324
405
|
this.item = item;
|
|
325
406
|
}
|
|
326
|
-
get id() {
|
|
327
|
-
return RemoveControlCommand.ID;
|
|
328
|
-
}
|
|
329
407
|
}
|
|
330
|
-
RemoveControlCommand.ID = '
|
|
408
|
+
RemoveControlCommand.ID = '73bcb4f5-ce7d-4c71-b70d-e772100136a1';
|
|
331
409
|
|
|
332
410
|
/**
|
|
333
411
|
* Forces map to move to a specific point
|
|
@@ -345,34 +423,136 @@ class SetMapCenterCommand extends PostboyGenericMessage {
|
|
|
345
423
|
this.lng = lng;
|
|
346
424
|
this.zoom = zoom;
|
|
347
425
|
}
|
|
348
|
-
|
|
349
|
-
|
|
426
|
+
}
|
|
427
|
+
SetMapCenterCommand.ID = 'd4e3cf4f-0be7-4c1a-8355-8607d02c3dea';
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* FitToPolygonsCommand is a command used to fit a given set of polygon features
|
|
431
|
+
* to the viewable area, optionally applying a zoom transformation afterwards.
|
|
432
|
+
*/
|
|
433
|
+
class FitToPolygonsCommand extends PostboyGenericMessage {
|
|
434
|
+
/**
|
|
435
|
+
* Creates an instance of the class with specified polygon features and an optional zoom level.
|
|
436
|
+
*
|
|
437
|
+
* @param {PolygonModel[]} features - An array of polygon models to fit to.
|
|
438
|
+
* @param {number} [zoomAfter=0] - Optional zoom level change to apply after initialization. Defaults to 0.
|
|
439
|
+
*/
|
|
440
|
+
constructor(features, zoomAfter = 0) {
|
|
441
|
+
super();
|
|
442
|
+
this.features = features;
|
|
443
|
+
this.zoomAfter = zoomAfter;
|
|
350
444
|
}
|
|
351
445
|
}
|
|
352
|
-
|
|
446
|
+
FitToPolygonsCommand.ID = '308394ce-48d3-45f5-8671-52207fba4be3';
|
|
353
447
|
|
|
354
|
-
|
|
355
|
-
|
|
448
|
+
/**
|
|
449
|
+
* Represents an event triggered when a map rendering process is completed.
|
|
450
|
+
*/
|
|
451
|
+
class MapRenderedEvent extends PostboyGenericMessage {
|
|
452
|
+
/**
|
|
453
|
+
* Constructor for creating an instance of the class.
|
|
454
|
+
*
|
|
455
|
+
* @param {Map} map - The map instance to be used by the class.
|
|
456
|
+
*/
|
|
457
|
+
constructor(map) {
|
|
356
458
|
super();
|
|
357
|
-
this.
|
|
459
|
+
this.map = map;
|
|
358
460
|
}
|
|
359
|
-
|
|
360
|
-
|
|
461
|
+
}
|
|
462
|
+
MapRenderedEvent.ID = '4515dde8-1519-4e3f-a0e3-10d3c52deabe';
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Represents an event triggered by a click on a map, containing information about the
|
|
466
|
+
* click's location, relevant entities, and features present at the clicked position.
|
|
467
|
+
*
|
|
468
|
+
* @extends {PostboyGenericMessage}
|
|
469
|
+
*/
|
|
470
|
+
class MapClickEvent extends PostboyGenericMessage {
|
|
471
|
+
/**
|
|
472
|
+
* Creates an instance of this class with the provided coordinates, entities, and features.
|
|
473
|
+
*
|
|
474
|
+
* @param {number[]} coordinates - An array representing the coordinates.
|
|
475
|
+
* @param {{ [layer: string]: IIdentified[] }} entities - A mapping of layer names to arrays of IIdentified entities.
|
|
476
|
+
* @param {{ [layer: string]: Feature<Geometry>[] }} features - A mapping of layer names to arrays of features with geometry.
|
|
477
|
+
*/
|
|
478
|
+
constructor(coordinates, entities, features) {
|
|
479
|
+
super();
|
|
480
|
+
this.coordinates = coordinates;
|
|
481
|
+
this.entities = entities;
|
|
482
|
+
this.features = features;
|
|
361
483
|
}
|
|
362
484
|
}
|
|
363
|
-
|
|
485
|
+
MapClickEvent.ID = 'ee31a86c-e838-4531-8399-983753a354df';
|
|
364
486
|
|
|
365
|
-
|
|
366
|
-
|
|
487
|
+
/**
|
|
488
|
+
* Represents an event that is triggered when the movement of a map ends.
|
|
489
|
+
* This class is used to capture the final position of a map after a movement operation.
|
|
490
|
+
*
|
|
491
|
+
* @property {MapPosition | null} position - The final position of the map after movement ends. Can be null.
|
|
492
|
+
*/
|
|
493
|
+
class MapMoveEndEvent extends PostboyGenericMessage {
|
|
494
|
+
constructor(position) {
|
|
367
495
|
super();
|
|
496
|
+
this.position = position;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
MapMoveEndEvent.ID = 'd210ec7e-032f-4ce8-8a39-7b816519eaae';
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* A class responsible for executing filtering of geographical features
|
|
503
|
+
* based on a specific geographical point (latitude and longitude).
|
|
504
|
+
*
|
|
505
|
+
* @template Feature - A geographical feature that is processed by the executor.
|
|
506
|
+
* @template Geometry - The type of geometry associated with the feature.
|
|
507
|
+
*/
|
|
508
|
+
class FilterFeaturesInPointExecutor extends PostboyExecutor {
|
|
509
|
+
/**
|
|
510
|
+
* Constructs a new instance with the specified latitude, longitude, and features.
|
|
511
|
+
*
|
|
512
|
+
* @param {number} lat - The latitude coordinate.
|
|
513
|
+
* @param {number} lng - The longitude coordinate.
|
|
514
|
+
* @param {Feature<Geometry>[]} features - The array of features associated with the location.
|
|
515
|
+
*/
|
|
516
|
+
constructor(lat, lng, features) {
|
|
517
|
+
super();
|
|
518
|
+
this.lat = lat;
|
|
519
|
+
this.lng = lng;
|
|
520
|
+
this.features = features;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
FilterFeaturesInPointExecutor.ID = 'dcbb156d-def3-45b4-91af-84d1483d8941';
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* A class that extends the PostboyExecutor to filter geographical features within a specified area.
|
|
527
|
+
* This class is designed to process a list of input features and determine which of them are located inside the provided area geometry.
|
|
528
|
+
*
|
|
529
|
+
* Parameters:
|
|
530
|
+
* - `area`: A Geometry object defining the area to filter geographical features.
|
|
531
|
+
* - `features`: An array of geographical features, represented as `Feature<Geometry>` objects, to be filtered by their presence within the specified area.
|
|
532
|
+
*/
|
|
533
|
+
class FilterFeaturesInAreaExecutor extends PostboyExecutor {
|
|
534
|
+
constructor(area, features) {
|
|
535
|
+
super();
|
|
536
|
+
this.area = area;
|
|
368
537
|
this.features = features;
|
|
369
|
-
this.zoomAfter = zoomAfter;
|
|
370
538
|
}
|
|
371
|
-
|
|
372
|
-
|
|
539
|
+
}
|
|
540
|
+
FilterFeaturesInAreaExecutor.ID = '4d26e1e3-e60f-4e49-804b-5b3eadc2adce';
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* An executor responsible for calculating the area of a given polygon.
|
|
544
|
+
*
|
|
545
|
+
* Use this class to manage and execute area-calculation logic for a polygon.
|
|
546
|
+
*
|
|
547
|
+
* @return {number} - the spherical area (in square meters)
|
|
548
|
+
*/
|
|
549
|
+
class CalculateAreaExecutor extends PostboyExecutor {
|
|
550
|
+
constructor(polygon) {
|
|
551
|
+
super();
|
|
552
|
+
this.polygon = polygon;
|
|
373
553
|
}
|
|
374
554
|
}
|
|
375
|
-
|
|
555
|
+
CalculateAreaExecutor.ID = '82347b8c-7635-45ec-85ef-75aaf43bc34c';
|
|
376
556
|
|
|
377
557
|
/**
|
|
378
558
|
* A message that allows to get the current state of the map.
|
|
@@ -380,82 +560,59 @@ FitToPolygonsCommand.ID = 'a9e42b23-ffaf-4c46-8370-e0432cd14d60';
|
|
|
380
560
|
* @returns {MapPosition | null}
|
|
381
561
|
*/
|
|
382
562
|
class GetMapPositionExecutor extends PostboyExecutor {
|
|
383
|
-
get id() {
|
|
384
|
-
return GetMapPositionExecutor.ID;
|
|
385
|
-
}
|
|
386
563
|
constructor() {
|
|
387
564
|
super();
|
|
388
565
|
}
|
|
389
566
|
}
|
|
390
567
|
GetMapPositionExecutor.ID = '52c95689-d09b-4082-ba58-9183ea96a213';
|
|
391
568
|
|
|
569
|
+
/**
|
|
570
|
+
* Class representing a query to get features within a specified geographical area.
|
|
571
|
+
* The query optionally takes a set of layer names to ignore during the operation.
|
|
572
|
+
*/
|
|
392
573
|
class GetFeaturesInAreaQuery extends PostboyCallbackMessage {
|
|
574
|
+
/**
|
|
575
|
+
* Constructor to initialize the object with a Geometry instance and an optional set of strings to ignore.
|
|
576
|
+
*
|
|
577
|
+
* @param {Geometry} area - The Geometry object used to define the area.
|
|
578
|
+
* @param {Set<string>} [ignore] - An optional set of layer names that will be ignored. Defaults to an empty set.
|
|
579
|
+
*/
|
|
393
580
|
constructor(area, ignore = new Set()) {
|
|
394
581
|
super();
|
|
395
582
|
this.area = area;
|
|
396
583
|
this.ignore = ignore;
|
|
397
584
|
}
|
|
398
|
-
get id() {
|
|
399
|
-
return GetFeaturesInAreaQuery.ID;
|
|
400
|
-
}
|
|
401
585
|
}
|
|
402
|
-
GetFeaturesInAreaQuery.ID = '
|
|
403
|
-
|
|
404
|
-
class FilterFeaturesInAreaExecutor extends PostboyExecutor {
|
|
405
|
-
constructor(area, features) {
|
|
406
|
-
super();
|
|
407
|
-
this.area = area;
|
|
408
|
-
this.features = features;
|
|
409
|
-
}
|
|
410
|
-
get id() {
|
|
411
|
-
return FilterFeaturesInAreaExecutor.ID;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
FilterFeaturesInAreaExecutor.ID = '36bb2d94-8028-4512-90dd-2386af3fc67c';
|
|
586
|
+
GetFeaturesInAreaQuery.ID = '317cf427-a029-4a43-97c4-cb6b8148ff65';
|
|
415
587
|
|
|
416
588
|
/**
|
|
417
589
|
* Represents a query to retrieve features located at a specific geographical point.
|
|
418
590
|
* The query is defined by latitude, longitude, and an optional set of features to ignore.
|
|
419
591
|
*/
|
|
420
592
|
class GetFeaturesInPointQuery extends PostboyCallbackMessage {
|
|
593
|
+
/**
|
|
594
|
+
* Constructor for initializing a geographic coordinate object.
|
|
595
|
+
*
|
|
596
|
+
* @param {number} lat - The latitude of the location.
|
|
597
|
+
* @param {number} lng - The longitude of the location.
|
|
598
|
+
* @param {Set<string>} [ignore=new Set<string>()] - An optional set of strings to ignore during processing.
|
|
599
|
+
*/
|
|
421
600
|
constructor(lat, lng, ignore = new Set()) {
|
|
422
601
|
super();
|
|
423
602
|
this.lat = lat;
|
|
424
603
|
this.lng = lng;
|
|
425
604
|
this.ignore = ignore;
|
|
426
605
|
}
|
|
427
|
-
get id() {
|
|
428
|
-
return GetFeaturesInPointQuery.ID;
|
|
429
|
-
}
|
|
430
606
|
}
|
|
431
|
-
GetFeaturesInPointQuery.ID = '
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* The FilterFeaturesInPointExecutor class is responsible for filtering features within a given point.
|
|
435
|
-
*/
|
|
436
|
-
class FilterFeaturesInPointExecutor extends PostboyExecutor {
|
|
437
|
-
get id() {
|
|
438
|
-
return FilterFeaturesInPointExecutor.ID;
|
|
439
|
-
}
|
|
440
|
-
constructor(lat, lng, features) {
|
|
441
|
-
super();
|
|
442
|
-
this.lat = lat;
|
|
443
|
-
this.lng = lng;
|
|
444
|
-
this.features = features;
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
FilterFeaturesInPointExecutor.ID = '5b859282-5d5a-47ca-a6ad-863a66c8b82b';
|
|
607
|
+
GetFeaturesInPointQuery.ID = '99bbc56f-34a2-4064-8300-13bb3d0662c1';
|
|
448
608
|
|
|
449
609
|
class AddLayerCommand extends PostboyGenericMessage {
|
|
450
610
|
constructor(layer) {
|
|
451
611
|
super();
|
|
452
612
|
this.layer = layer;
|
|
453
613
|
}
|
|
454
|
-
get id() {
|
|
455
|
-
return AddLayerCommand.ID;
|
|
456
|
-
}
|
|
457
614
|
}
|
|
458
|
-
AddLayerCommand.ID = '
|
|
615
|
+
AddLayerCommand.ID = '7fe68d71-350f-47e2-b1ae-62cc333e1572';
|
|
459
616
|
|
|
460
617
|
class PlaceLayerFeaturesCommand extends PostboyGenericMessage {
|
|
461
618
|
constructor(layer, features) {
|
|
@@ -463,44 +620,32 @@ class PlaceLayerFeaturesCommand extends PostboyGenericMessage {
|
|
|
463
620
|
this.layer = layer;
|
|
464
621
|
this.features = features;
|
|
465
622
|
}
|
|
466
|
-
get id() {
|
|
467
|
-
return PlaceLayerFeaturesCommand.ID;
|
|
468
|
-
}
|
|
469
623
|
}
|
|
470
|
-
PlaceLayerFeaturesCommand.ID = '
|
|
624
|
+
PlaceLayerFeaturesCommand.ID = '5f27a2cd-8d8a-4929-b703-8aee6dcdc21c';
|
|
471
625
|
|
|
472
626
|
class RemoveLayerCommand extends PostboyGenericMessage {
|
|
473
627
|
constructor(layer) {
|
|
474
628
|
super();
|
|
475
629
|
this.layer = layer;
|
|
476
630
|
}
|
|
477
|
-
get id() {
|
|
478
|
-
return RemoveLayerCommand.ID;
|
|
479
|
-
}
|
|
480
631
|
}
|
|
481
|
-
RemoveLayerCommand.ID = '
|
|
632
|
+
RemoveLayerCommand.ID = '1b60599c-599a-4fdb-bad2-23b12e435e1a';
|
|
482
633
|
|
|
483
634
|
class AddTileCommand extends PostboyGenericMessage {
|
|
484
635
|
constructor(layer) {
|
|
485
636
|
super();
|
|
486
637
|
this.layer = layer;
|
|
487
638
|
}
|
|
488
|
-
get id() {
|
|
489
|
-
return AddTileCommand.ID;
|
|
490
|
-
}
|
|
491
639
|
}
|
|
492
|
-
AddTileCommand.ID = '
|
|
640
|
+
AddTileCommand.ID = 'ae29b7af-21aa-4b0a-8586-92c23779e6cb';
|
|
493
641
|
|
|
494
642
|
class RemoveTileCommand extends PostboyGenericMessage {
|
|
495
643
|
constructor(layer) {
|
|
496
644
|
super();
|
|
497
645
|
this.layer = layer;
|
|
498
646
|
}
|
|
499
|
-
get id() {
|
|
500
|
-
return RemoveTileCommand.ID;
|
|
501
|
-
}
|
|
502
647
|
}
|
|
503
|
-
RemoveTileCommand.ID = '
|
|
648
|
+
RemoveTileCommand.ID = 'dab0f861-bb25-46da-9388-717bfaae798f';
|
|
504
649
|
|
|
505
650
|
class FitToFeaturesCommand extends PostboyGenericMessage {
|
|
506
651
|
constructor(features, zoomAfter = 0) {
|
|
@@ -508,32 +653,20 @@ class FitToFeaturesCommand extends PostboyGenericMessage {
|
|
|
508
653
|
this.features = features;
|
|
509
654
|
this.zoomAfter = zoomAfter;
|
|
510
655
|
}
|
|
511
|
-
get id() {
|
|
512
|
-
return FitToFeaturesCommand.ID;
|
|
513
|
-
}
|
|
514
656
|
}
|
|
515
|
-
FitToFeaturesCommand.ID = '
|
|
657
|
+
FitToFeaturesCommand.ID = '04d67609-0b4c-4f52-aa53-ad0a3db967dc';
|
|
516
658
|
|
|
517
659
|
class GetLayerQuery extends PostboyCallbackMessage {
|
|
518
660
|
constructor(name) {
|
|
519
661
|
super();
|
|
520
662
|
this.name = name;
|
|
521
663
|
}
|
|
522
|
-
get id() {
|
|
523
|
-
return GetLayerQuery.ID;
|
|
524
|
-
}
|
|
525
664
|
}
|
|
526
|
-
GetLayerQuery.ID = '
|
|
665
|
+
GetLayerQuery.ID = 'd2683490-2aa2-4dee-855d-f752ce4d3be5';
|
|
527
666
|
|
|
528
667
|
class DrawingFinishedEvent extends PostboyGenericMessage {
|
|
529
|
-
constructor() {
|
|
530
|
-
super();
|
|
531
|
-
}
|
|
532
|
-
get id() {
|
|
533
|
-
return DrawingFinishedEvent.ID;
|
|
534
|
-
}
|
|
535
668
|
}
|
|
536
|
-
DrawingFinishedEvent.ID = '
|
|
669
|
+
DrawingFinishedEvent.ID = '9094e160-8df7-4868-883a-3436724106dd';
|
|
537
670
|
|
|
538
671
|
class DrawingGenerationService {
|
|
539
672
|
static getDraw(ev) {
|
|
@@ -588,22 +721,16 @@ class GenerateDrawExecutor extends PostboyExecutor {
|
|
|
588
721
|
this.style = style;
|
|
589
722
|
this.type = type;
|
|
590
723
|
}
|
|
591
|
-
get id() {
|
|
592
|
-
return GenerateDrawExecutor.ID;
|
|
593
|
-
}
|
|
594
724
|
}
|
|
595
|
-
GenerateDrawExecutor.ID = '
|
|
725
|
+
GenerateDrawExecutor.ID = '5d5f0737-ff70-461e-9a2e-bf6166c914cb';
|
|
596
726
|
|
|
597
727
|
class GenerateZoomControlExecutor extends PostboyExecutor {
|
|
598
728
|
constructor(settings) {
|
|
599
729
|
super();
|
|
600
730
|
this.settings = settings;
|
|
601
731
|
}
|
|
602
|
-
get id() {
|
|
603
|
-
return GenerateZoomControlExecutor.ID;
|
|
604
|
-
}
|
|
605
732
|
}
|
|
606
|
-
GenerateZoomControlExecutor.ID = '
|
|
733
|
+
GenerateZoomControlExecutor.ID = 'c59f4fc3-ccf6-4cb3-a38b-3a8c249114a2';
|
|
607
734
|
|
|
608
735
|
class ZoomControlFactory {
|
|
609
736
|
static build(settings) {
|
|
@@ -620,7 +747,11 @@ class ZoomControlFactory {
|
|
|
620
747
|
class MapPostboyService extends PostboyService {
|
|
621
748
|
constructor() {
|
|
622
749
|
super();
|
|
623
|
-
this.addLocker({
|
|
750
|
+
this.addLocker({
|
|
751
|
+
locker: StartDrawingCommand.name,
|
|
752
|
+
unlocker: DrawingFinishedEvent.name,
|
|
753
|
+
locking: [MapClickEvent.name],
|
|
754
|
+
});
|
|
624
755
|
}
|
|
625
756
|
}
|
|
626
757
|
MapPostboyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapPostboyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -646,29 +777,29 @@ class MapManagementService {
|
|
|
646
777
|
this.observeFeaturesInPoint();
|
|
647
778
|
}
|
|
648
779
|
observeRemoveTile() {
|
|
649
|
-
this.postboy.
|
|
780
|
+
this.postboy.sub(RemoveTileCommand).subscribe((c) => {
|
|
650
781
|
if (!this.map)
|
|
651
782
|
return;
|
|
652
783
|
this.map.removeLayer(c.layer);
|
|
653
784
|
});
|
|
654
785
|
}
|
|
655
786
|
observeLayerQuery() {
|
|
656
|
-
this.postboy.
|
|
787
|
+
this.postboy.sub(GetLayerQuery).subscribe((ev) => ev.finish(this.layers.take(ev.name)));
|
|
657
788
|
}
|
|
658
789
|
observeAddTile() {
|
|
659
|
-
this.postboy.
|
|
790
|
+
this.postboy.sub(AddTileCommand).subscribe((c) => {
|
|
660
791
|
if (!this.map)
|
|
661
792
|
return;
|
|
662
793
|
this.map.addLayer(c.layer);
|
|
663
794
|
});
|
|
664
795
|
}
|
|
665
796
|
observeMapRender() {
|
|
666
|
-
this.postboy.
|
|
797
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
667
798
|
this.map = m.map;
|
|
668
799
|
});
|
|
669
800
|
}
|
|
670
801
|
observeAddLayer() {
|
|
671
|
-
this.postboy.
|
|
802
|
+
this.postboy.sub(AddLayerCommand).subscribe((c) => {
|
|
672
803
|
if (!this.map)
|
|
673
804
|
return;
|
|
674
805
|
this.layers.put(c.layer.get('name'), c.layer);
|
|
@@ -676,7 +807,7 @@ class MapManagementService {
|
|
|
676
807
|
});
|
|
677
808
|
}
|
|
678
809
|
observePlaceFeatures() {
|
|
679
|
-
this.postboy.
|
|
810
|
+
this.postboy.sub(PlaceLayerFeaturesCommand).subscribe((c) => {
|
|
680
811
|
if (!this.layers.has(c.layer))
|
|
681
812
|
return;
|
|
682
813
|
let source = this.layers.take(c.layer).getSource();
|
|
@@ -687,7 +818,7 @@ class MapManagementService {
|
|
|
687
818
|
});
|
|
688
819
|
}
|
|
689
820
|
observeRemoveLayer() {
|
|
690
|
-
this.postboy.
|
|
821
|
+
this.postboy.sub(RemoveLayerCommand).subscribe((c) => {
|
|
691
822
|
if (!this.map)
|
|
692
823
|
return;
|
|
693
824
|
this.layers.rmv(c.layer.get('name'));
|
|
@@ -695,20 +826,20 @@ class MapManagementService {
|
|
|
695
826
|
});
|
|
696
827
|
}
|
|
697
828
|
observeFeaturesInArea() {
|
|
698
|
-
this.postboy.
|
|
829
|
+
this.postboy.sub(GetFeaturesInAreaQuery).subscribe((qr) => {
|
|
699
830
|
let result = new Dictionary();
|
|
700
831
|
this.forEachLayer((l, s) => {
|
|
701
|
-
let features = this.postboy.
|
|
832
|
+
let features = this.postboy.exec(new FilterFeaturesInAreaExecutor(qr.area, s?.getFeatures() ?? []));
|
|
702
833
|
result.put(l.get('name'), features.map((e) => ({ id: e.getId(), ...e.get(MapConstants.FeatureInfo) })));
|
|
703
834
|
}, qr.ignore);
|
|
704
835
|
qr.finish(result);
|
|
705
836
|
});
|
|
706
837
|
}
|
|
707
838
|
observeFeaturesInPoint() {
|
|
708
|
-
this.postboy.
|
|
839
|
+
this.postboy.sub(GetFeaturesInPointQuery).subscribe((qr) => {
|
|
709
840
|
let result = new Dictionary();
|
|
710
841
|
this.forEachLayer((l, s) => {
|
|
711
|
-
let features = this.postboy.
|
|
842
|
+
let features = this.postboy.exec(new FilterFeaturesInPointExecutor(qr.lat, qr.lng, s?.getFeatures() ?? []));
|
|
712
843
|
result.put(l.get('name'), features.map((e) => ({ id: e.getId(), ...e.get(MapConstants.FeatureInfo) })));
|
|
713
844
|
}, qr.ignore);
|
|
714
845
|
qr.finish(result);
|
|
@@ -750,7 +881,7 @@ class MapStateService {
|
|
|
750
881
|
}
|
|
751
882
|
observeMapRendering() {
|
|
752
883
|
this.postboy
|
|
753
|
-
.
|
|
884
|
+
.sub(MapRenderedEvent)
|
|
754
885
|
.pipe(first())
|
|
755
886
|
.subscribe((ev) => {
|
|
756
887
|
this.map = ev.map;
|
|
@@ -760,7 +891,7 @@ class MapStateService {
|
|
|
760
891
|
});
|
|
761
892
|
}
|
|
762
893
|
observeCenter() {
|
|
763
|
-
this.postboy.
|
|
894
|
+
this.postboy.sub(SetMapCenterCommand).subscribe((c) => {
|
|
764
895
|
this.map?.getView().setCenter([c.lng, c.lat]);
|
|
765
896
|
if (c.zoom)
|
|
766
897
|
this.map?.getView().setZoom(c.zoom);
|
|
@@ -783,19 +914,19 @@ class MapFeatureService {
|
|
|
783
914
|
this.observeFitToPolygons();
|
|
784
915
|
}
|
|
785
916
|
observeMapRender() {
|
|
786
|
-
this.postboy.
|
|
917
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
787
918
|
this.map = m.map;
|
|
788
919
|
if (this.fitPolygonsWaiting)
|
|
789
920
|
this.postboy.fire(this.fitPolygonsWaiting);
|
|
790
921
|
});
|
|
791
922
|
}
|
|
792
923
|
observeFitToFeatures() {
|
|
793
|
-
this.postboy.
|
|
924
|
+
this.postboy.sub(FitToFeaturesCommand).subscribe((cmd) => {
|
|
794
925
|
this.fitToGeometries(cmd.features.map((f) => f.getGeometry()), cmd.zoomAfter);
|
|
795
926
|
});
|
|
796
927
|
}
|
|
797
928
|
observeFitToPolygons() {
|
|
798
|
-
this.postboy.
|
|
929
|
+
this.postboy.sub(FitToPolygonsCommand).subscribe((cmd) => {
|
|
799
930
|
if (!this.map) {
|
|
800
931
|
this.fitPolygonsWaiting = cmd;
|
|
801
932
|
return;
|
|
@@ -844,7 +975,7 @@ class MapClickService {
|
|
|
844
975
|
return model;
|
|
845
976
|
}
|
|
846
977
|
observeMapRender() {
|
|
847
|
-
this.postboy.
|
|
978
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
848
979
|
this.map = m.map;
|
|
849
980
|
this.map?.on('singleclick', (e) => {
|
|
850
981
|
this.postboy.fire(this.onClick(e));
|
|
@@ -876,30 +1007,26 @@ class DrawingService {
|
|
|
876
1007
|
this.observeMapRender();
|
|
877
1008
|
}
|
|
878
1009
|
observeSelectArea() {
|
|
879
|
-
this.postboy.
|
|
880
|
-
|
|
881
|
-
drawingCommand.result.subscribe((r) => {
|
|
1010
|
+
this.postboy.sub(DrawSelectionAreaCommand).subscribe((ev) => {
|
|
1011
|
+
this.postboy.fireCallback(new StartDrawingCommand(ev.type, ev.style), (r) => {
|
|
882
1012
|
if (!r) {
|
|
883
1013
|
ev.finish(new Dictionary());
|
|
884
1014
|
return;
|
|
885
1015
|
}
|
|
886
1016
|
const area = PolygonModel.fromGeoJson(1, r).feature.getGeometry();
|
|
887
|
-
|
|
888
|
-
getFeaturesCommand.result.subscribe((result) => ev.finish(result));
|
|
889
|
-
this.postboy.fire(getFeaturesCommand);
|
|
1017
|
+
this.postboy.fireCallback(new GetFeaturesInAreaQuery(area, ev.ignore), (result) => ev.finish(result));
|
|
890
1018
|
});
|
|
891
|
-
this.postboy.fire(drawingCommand);
|
|
892
1019
|
});
|
|
893
1020
|
}
|
|
894
1021
|
observeDrawing() {
|
|
895
|
-
this.postboy.
|
|
1022
|
+
this.postboy.sub(StartDrawingCommand).subscribe((ev) => {
|
|
896
1023
|
this.draw((l) => {
|
|
897
1024
|
if (!l || !this.map) {
|
|
898
1025
|
this.clearInteraction(l);
|
|
899
1026
|
return;
|
|
900
1027
|
}
|
|
901
1028
|
const cancelSub = this.observeCancelation(ev, l);
|
|
902
|
-
this.drawInteraction = this.postboy.
|
|
1029
|
+
this.drawInteraction = this.postboy.exec(new GenerateDrawExecutor(l, ev.style, ev.type));
|
|
903
1030
|
this.map?.addInteraction(this.drawInteraction);
|
|
904
1031
|
this.drawInteraction.on('drawend', (evt) => {
|
|
905
1032
|
cancelSub.unsubscribe();
|
|
@@ -915,18 +1042,16 @@ class DrawingService {
|
|
|
915
1042
|
this.clearInteraction(layer);
|
|
916
1043
|
}
|
|
917
1044
|
observeMapRender() {
|
|
918
|
-
this.postboy.
|
|
1045
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
919
1046
|
this.map = m.map;
|
|
920
1047
|
});
|
|
921
1048
|
}
|
|
922
1049
|
draw(action) {
|
|
923
|
-
|
|
924
|
-
query.result.subscribe((l) => action(l));
|
|
925
|
-
this.postboy.fire(query);
|
|
1050
|
+
this.postboy.fireCallback(new GetLayerQuery(MapConstants.DrawingLayerId), (l) => action(l));
|
|
926
1051
|
}
|
|
927
1052
|
observeCancelation(ev, layer) {
|
|
928
1053
|
return this.postboy
|
|
929
|
-
.
|
|
1054
|
+
.sub(CancelDrawingCommand)
|
|
930
1055
|
.pipe(first())
|
|
931
1056
|
.subscribe(() => {
|
|
932
1057
|
ev.finish(null);
|
|
@@ -956,7 +1081,7 @@ class FeatureModificationService {
|
|
|
956
1081
|
this.observeMapRender();
|
|
957
1082
|
}
|
|
958
1083
|
observeModification() {
|
|
959
|
-
this.postboy.
|
|
1084
|
+
this.postboy.sub(ModifyFeatureCommand).subscribe((ev) => {
|
|
960
1085
|
this.defineLayer((l) => {
|
|
961
1086
|
if (!l || !this.map) {
|
|
962
1087
|
this.clearInteraction(l);
|
|
@@ -1002,18 +1127,16 @@ class FeatureModificationService {
|
|
|
1002
1127
|
: new WKT().writeFeature(command.model.feature));
|
|
1003
1128
|
}
|
|
1004
1129
|
observeMapRender() {
|
|
1005
|
-
this.postboy.
|
|
1130
|
+
this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
1006
1131
|
this.map = m.map;
|
|
1007
1132
|
});
|
|
1008
1133
|
}
|
|
1009
1134
|
defineLayer(action) {
|
|
1010
|
-
|
|
1011
|
-
query.result.subscribe((l) => action(l));
|
|
1012
|
-
this.postboy.fire(query);
|
|
1135
|
+
this.postboy.fireCallback(new GetLayerQuery(MapConstants.DrawingLayerId), (l) => action(l));
|
|
1013
1136
|
}
|
|
1014
1137
|
observeCancelation(ev, layer) {
|
|
1015
1138
|
return this.postboy
|
|
1016
|
-
.
|
|
1139
|
+
.sub(CancelFeatureModificationCommand)
|
|
1017
1140
|
.pipe(first())
|
|
1018
1141
|
.subscribe(() => {
|
|
1019
1142
|
ev.finish(null);
|
|
@@ -1042,7 +1165,7 @@ class ControlsService {
|
|
|
1042
1165
|
}
|
|
1043
1166
|
observeMapRender() {
|
|
1044
1167
|
this.postboy
|
|
1045
|
-
.
|
|
1168
|
+
.sub(MapRenderedEvent)
|
|
1046
1169
|
.pipe(first())
|
|
1047
1170
|
.subscribe((m) => {
|
|
1048
1171
|
this.map = m.map;
|
|
@@ -1051,12 +1174,10 @@ class ControlsService {
|
|
|
1051
1174
|
});
|
|
1052
1175
|
}
|
|
1053
1176
|
observeAdding() {
|
|
1054
|
-
this.postboy.
|
|
1177
|
+
this.postboy.sub(AddControlCommand).subscribe((c) => this.map?.addControl(c.item));
|
|
1055
1178
|
}
|
|
1056
1179
|
observeRemoving() {
|
|
1057
|
-
this.postboy
|
|
1058
|
-
.subscribe(RemoveControlCommand.ID)
|
|
1059
|
-
.subscribe((c) => this.map?.removeControl(c.item));
|
|
1180
|
+
this.postboy.sub(RemoveControlCommand).subscribe((c) => this.map?.removeControl(c.item));
|
|
1060
1181
|
}
|
|
1061
1182
|
}
|
|
1062
1183
|
ControlsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ControlsService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -1072,38 +1193,38 @@ class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
|
1072
1193
|
this.registerServices([management, state, interaction, mapFeature, drawing, featureModification, controls]);
|
|
1073
1194
|
}
|
|
1074
1195
|
_up() {
|
|
1075
|
-
this.
|
|
1076
|
-
this.
|
|
1077
|
-
this.
|
|
1078
|
-
this.
|
|
1079
|
-
this.
|
|
1080
|
-
this.
|
|
1081
|
-
this.
|
|
1082
|
-
this.
|
|
1083
|
-
this.
|
|
1084
|
-
this.
|
|
1085
|
-
this.
|
|
1086
|
-
this.
|
|
1087
|
-
this.
|
|
1088
|
-
this.
|
|
1089
|
-
this.
|
|
1090
|
-
this.
|
|
1091
|
-
this.
|
|
1092
|
-
this.
|
|
1093
|
-
this.
|
|
1094
|
-
this.
|
|
1095
|
-
this.
|
|
1096
|
-
this.
|
|
1097
|
-
this.
|
|
1196
|
+
this.recordReplay(MapRenderedEvent);
|
|
1197
|
+
this.recordReplay(PlaceLayerFeaturesCommand);
|
|
1198
|
+
this.recordReplay(RemoveControlCommand);
|
|
1199
|
+
this.recordReplay(AddControlCommand);
|
|
1200
|
+
this.recordReplay(SetMapCenterCommand);
|
|
1201
|
+
this.recordSubject(AddLayerCommand);
|
|
1202
|
+
this.recordSubject(RemoveLayerCommand);
|
|
1203
|
+
this.recordSubject(AddTileCommand);
|
|
1204
|
+
this.recordSubject(RemoveTileCommand);
|
|
1205
|
+
this.recordSubject(MapClickEvent);
|
|
1206
|
+
this.recordSubject(CloseTooltipCommand);
|
|
1207
|
+
this.recordSubject(FitToFeaturesCommand);
|
|
1208
|
+
this.recordSubject(FitToPolygonsCommand);
|
|
1209
|
+
this.recordSubject(MapMoveEndEvent);
|
|
1210
|
+
this.recordSubject(CancelDrawingCommand);
|
|
1211
|
+
this.recordSubject(StartDrawingCommand);
|
|
1212
|
+
this.recordSubject(GetLayerQuery);
|
|
1213
|
+
this.recordSubject(DrawingFinishedEvent);
|
|
1214
|
+
this.recordSubject(GetFeaturesInAreaQuery);
|
|
1215
|
+
this.recordSubject(DrawSelectionAreaCommand);
|
|
1216
|
+
this.recordSubject(CancelFeatureModificationCommand);
|
|
1217
|
+
this.recordSubject(ModifyFeatureCommand);
|
|
1218
|
+
this.recordSubject(GetFeaturesInPointQuery);
|
|
1098
1219
|
this.setExecutors();
|
|
1099
1220
|
}
|
|
1100
1221
|
setExecutors() {
|
|
1101
|
-
this.
|
|
1102
|
-
this.
|
|
1103
|
-
this.
|
|
1104
|
-
this.
|
|
1105
|
-
this.
|
|
1106
|
-
this.
|
|
1222
|
+
this.recordExecutor(FilterFeaturesInAreaExecutor, (e) => FeatureService.filterFeaturesInArea(e));
|
|
1223
|
+
this.recordExecutor(FilterFeaturesInPointExecutor, (e) => FeatureService.filterFeaturesInPoint(e));
|
|
1224
|
+
this.recordExecutor(CalculateAreaExecutor, (e) => FeatureService.calculateArea(e.polygon?.feature?.getGeometry()));
|
|
1225
|
+
this.recordExecutor(GenerateDrawExecutor, (e) => DrawingGenerationService.getDraw(e));
|
|
1226
|
+
this.recordExecutor(GenerateZoomControlExecutor, (e) => ZoomControlFactory.build(e.settings));
|
|
1227
|
+
this.recordExecutor(GetMapPositionExecutor, () => this.state.getMapPosition());
|
|
1107
1228
|
}
|
|
1108
1229
|
}
|
|
1109
1230
|
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 });
|
|
@@ -1332,7 +1453,7 @@ class TileLayerComponent extends DestructibleComponent {
|
|
|
1332
1453
|
}
|
|
1333
1454
|
ngOnInit() {
|
|
1334
1455
|
this.postboy
|
|
1335
|
-
.
|
|
1456
|
+
.sub(MapRenderedEvent)
|
|
1336
1457
|
.pipe(filter((m) => !!m), first())
|
|
1337
1458
|
.subscribe((m) => this.initLayer());
|
|
1338
1459
|
}
|
|
@@ -1555,7 +1676,7 @@ class FeatureLayerComponent extends DestructibleComponent {
|
|
|
1555
1676
|
}
|
|
1556
1677
|
ngOnInit() {
|
|
1557
1678
|
this.postboy
|
|
1558
|
-
.
|
|
1679
|
+
.sub(MapRenderedEvent)
|
|
1559
1680
|
.pipe(filter((m) => !!m), first())
|
|
1560
1681
|
.subscribe((m) => this.initLayer());
|
|
1561
1682
|
}
|
|
@@ -1733,14 +1854,14 @@ class ClusterLayerManager {
|
|
|
1733
1854
|
}
|
|
1734
1855
|
observeMapMovement() {
|
|
1735
1856
|
combineLatest([
|
|
1736
|
-
this.postboy.
|
|
1737
|
-
this.postboy.
|
|
1857
|
+
this.postboy.sub(MapMoveEndEvent).pipe(auditTime(250)),
|
|
1858
|
+
this.postboy.sub(MapRenderedEvent),
|
|
1738
1859
|
]).subscribe(([movement, renderEvent]) => {
|
|
1739
1860
|
this.checkClusterNecessity(renderEvent.map);
|
|
1740
1861
|
});
|
|
1741
1862
|
}
|
|
1742
1863
|
observeClick() {
|
|
1743
|
-
this.postboy.
|
|
1864
|
+
this.postboy.sub(MapClickEvent).subscribe((m) => {
|
|
1744
1865
|
if ((m.features[this.settings.name]?.length ?? 0) > 1) {
|
|
1745
1866
|
this.postboy.fire(new FitToFeaturesCommand(m.features[this.settings.name], -1));
|
|
1746
1867
|
}
|
|
@@ -1828,7 +1949,7 @@ class ClusterLayerComponent extends DestructibleComponent {
|
|
|
1828
1949
|
}
|
|
1829
1950
|
ngOnInit() {
|
|
1830
1951
|
this.postboy
|
|
1831
|
-
.
|
|
1952
|
+
.sub(MapRenderedEvent)
|
|
1832
1953
|
.pipe(filter((m) => !!m), first())
|
|
1833
1954
|
.subscribe((m) => this.initLayer());
|
|
1834
1955
|
}
|
|
@@ -1969,7 +2090,7 @@ class MarkersComponent extends DestructibleComponent {
|
|
|
1969
2090
|
}
|
|
1970
2091
|
ngOnInit() {
|
|
1971
2092
|
this.postboy
|
|
1972
|
-
.
|
|
2093
|
+
.sub(MapRenderedEvent)
|
|
1973
2094
|
.pipe(filter((m) => !!m), first())
|
|
1974
2095
|
.subscribe(() => this.putMarkers());
|
|
1975
2096
|
}
|
|
@@ -2058,18 +2179,18 @@ class TooltipComponent extends DestructibleComponent {
|
|
|
2058
2179
|
this.detector.detectChanges();
|
|
2059
2180
|
}
|
|
2060
2181
|
observeMapClick() {
|
|
2061
|
-
return this.postboy.
|
|
2182
|
+
return this.postboy.sub(MapClickEvent).subscribe((ev) => {
|
|
2062
2183
|
this._settings.show(ev) ? this.addOverlay(ev.coordinates) : this.removeOverlay();
|
|
2063
2184
|
});
|
|
2064
2185
|
}
|
|
2065
2186
|
observeClose() {
|
|
2066
2187
|
return this.postboy
|
|
2067
|
-
.
|
|
2188
|
+
.sub(CloseTooltipCommand)
|
|
2068
2189
|
.pipe(filter((ev) => ev.tooltipId === this._settings.id))
|
|
2069
2190
|
.subscribe(() => this.removeOverlay());
|
|
2070
2191
|
}
|
|
2071
2192
|
observeMapRender() {
|
|
2072
|
-
return this.postboy.
|
|
2193
|
+
return this.postboy.sub(MapRenderedEvent).subscribe((m) => {
|
|
2073
2194
|
this.map = m.map;
|
|
2074
2195
|
});
|
|
2075
2196
|
}
|
|
@@ -2109,7 +2230,7 @@ class PolygonsComponent extends DestructibleComponent {
|
|
|
2109
2230
|
}
|
|
2110
2231
|
ngOnInit() {
|
|
2111
2232
|
this.postboy
|
|
2112
|
-
.
|
|
2233
|
+
.sub(MapRenderedEvent)
|
|
2113
2234
|
.pipe(filter((m) => !!m), first())
|
|
2114
2235
|
.subscribe(() => this.putPolygons());
|
|
2115
2236
|
}
|
|
@@ -2283,7 +2404,7 @@ class MapControlZoomComponent extends DestructibleComponent {
|
|
|
2283
2404
|
}
|
|
2284
2405
|
ngOnInit() {
|
|
2285
2406
|
this.postboy
|
|
2286
|
-
.
|
|
2407
|
+
.sub(MapRenderedEvent)
|
|
2287
2408
|
.pipe(filter((m) => !!m), first())
|
|
2288
2409
|
.subscribe((m) => {
|
|
2289
2410
|
this.map = m.map;
|
|
@@ -2293,7 +2414,7 @@ class MapControlZoomComponent extends DestructibleComponent {
|
|
|
2293
2414
|
setControl() {
|
|
2294
2415
|
if (!this.map)
|
|
2295
2416
|
return;
|
|
2296
|
-
this.control = this.postboy.
|
|
2417
|
+
this.control = this.postboy.exec(new GenerateZoomControlExecutor(this._settings));
|
|
2297
2418
|
this.map.addControl(this.control);
|
|
2298
2419
|
}
|
|
2299
2420
|
}
|