@artstesh/maps 1.1.1 → 1.1.3
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/bundles/maps-components-src-map.umd.js +199 -15
- package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
- package/dist/bundles/maps-components.umd.js +199 -15
- package/dist/bundles/maps-components.umd.js.map +1 -1
- package/dist/esm2015/map/map-plate/features/markers/markers.component.js +3 -4
- package/dist/esm2015/map/map-plate/features/polygons/polygons.component.js +2 -2
- package/dist/esm2015/map/map-plate/layers/feature-layer/feature-layer.settings.js +44 -1
- package/dist/esm2015/map/map-plate/map-plate.component.js +4 -1
- package/dist/esm2015/map/messages/commands/add-control.command.js +12 -0
- package/dist/esm2015/map/messages/commands/remove-control.command.js +12 -0
- package/dist/esm2015/map/messages/commands/set-map-center.command.js +23 -0
- package/dist/esm2015/map/messages/index.js +4 -1
- package/dist/esm2015/map/models/index.js +2 -1
- package/dist/esm2015/map/models/map-control.js +15 -0
- package/dist/esm2015/map/services/controls/controls.service.js +37 -0
- package/dist/esm2015/map/services/map-management.service.js +3 -3
- package/dist/esm2015/map/services/map-state.service.js +20 -4
- package/dist/esm2015/map/services/message-registrator.service.js +12 -5
- package/dist/esm2015/src/map/map-plate/features/markers/markers.component.js +3 -4
- package/dist/esm2015/src/map/map-plate/features/polygons/polygons.component.js +2 -2
- package/dist/esm2015/src/map/map-plate/layers/feature-layer/feature-layer.settings.js +44 -1
- package/dist/esm2015/src/map/map-plate/map-plate.component.js +4 -1
- package/dist/esm2015/src/map/messages/commands/add-control.command.js +12 -0
- package/dist/esm2015/src/map/messages/commands/remove-control.command.js +12 -0
- package/dist/esm2015/src/map/messages/commands/set-map-center.command.js +23 -0
- package/dist/esm2015/src/map/messages/index.js +4 -1
- package/dist/esm2015/src/map/models/index.js +2 -1
- package/dist/esm2015/src/map/models/map-control.js +15 -0
- package/dist/esm2015/src/map/services/controls/controls.service.js +37 -0
- package/dist/esm2015/src/map/services/map-management.service.js +3 -3
- package/dist/esm2015/src/map/services/map-state.service.js +20 -4
- package/dist/esm2015/src/map/services/message-registrator.service.js +12 -5
- package/dist/fesm2015/maps-components-src-map.js +165 -13
- package/dist/fesm2015/maps-components-src-map.js.map +1 -1
- package/dist/fesm2015/maps-components.js +165 -13
- package/dist/fesm2015/maps-components.js.map +1 -1
- package/dist/map/map-plate/layers/feature-layer/feature-layer.settings.d.ts +46 -0
- package/dist/map/messages/commands/add-control.command.d.ts +8 -0
- package/dist/map/messages/commands/remove-control.command.d.ts +8 -0
- package/dist/map/messages/commands/set-map-center.command.d.ts +18 -0
- package/dist/map/messages/index.d.ts +3 -0
- package/dist/map/models/index.d.ts +1 -0
- package/dist/map/models/map-control.d.ts +13 -0
- package/dist/map/services/controls/controls.service.d.ts +14 -0
- package/dist/map/services/map-state.service.d.ts +2 -0
- package/dist/map/services/message-registrator.service.d.ts +2 -1
- package/dist/src/map/map-plate/layers/feature-layer/feature-layer.settings.d.ts +46 -0
- package/dist/src/map/messages/commands/add-control.command.d.ts +8 -0
- package/dist/src/map/messages/commands/remove-control.command.d.ts +8 -0
- package/dist/src/map/messages/commands/set-map-center.command.d.ts +18 -0
- package/dist/src/map/messages/index.d.ts +3 -0
- package/dist/src/map/models/index.d.ts +1 -0
- package/dist/src/map/models/map-control.d.ts +13 -0
- package/dist/src/map/services/controls/controls.service.d.ts +14 -0
- package/dist/src/map/services/map-state.service.d.ts +2 -0
- package/dist/src/map/services/message-registrator.service.d.ts +2 -1
- package/package.json +1 -1
|
@@ -6,11 +6,11 @@ import { Feature, Collection } from 'ol';
|
|
|
6
6
|
import { Point, LineString } from 'ol/geom';
|
|
7
7
|
import { GeoJSON, WKT } from 'ol/format';
|
|
8
8
|
import { getCenter, createEmpty, extend } from 'ol/extent';
|
|
9
|
+
import { Control, Zoom } from 'ol/control';
|
|
9
10
|
import { get, useGeographic, transform } from 'ol/proj';
|
|
10
11
|
import { PostboyGenericMessage, PostboyCallbackMessage, PostboyExecutor, PostboyService, PostboyAbstractRegistrator } from '@artstesh/postboy';
|
|
11
12
|
import { Draw, Modify, Translate } from 'ol/interaction';
|
|
12
13
|
import { createRegularPolygon, createBox } from 'ol/interaction/Draw';
|
|
13
|
-
import { Zoom } from 'ol/control';
|
|
14
14
|
import { first, filter, auditTime } from 'rxjs/operators';
|
|
15
15
|
import { Vector, XYZ } from 'ol/source';
|
|
16
16
|
import TileLayer from 'ol/layer/Tile';
|
|
@@ -247,6 +247,20 @@ class Dictionary {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
* A control is a visible widget with a DOM element in a fixed position on the screen. They can involve user input (buttons), or be informational only; the position is determined using CSS. By default these are placed in the container with CSS class name ol-overlaycontainer-stopevent, but can use any outside DOM element.
|
|
253
|
+
* This is the base class for controls. You can use it for simple custom controls by creating the element with listeners, creating an instance:
|
|
254
|
+
* var myControl = new Control({element: myElement}); and then adding this to the map.
|
|
255
|
+
* The main advantage of having this as a control rather than a simple separate DOM element is that preventing propagation is handled for you. Controls will also be objects in a module:ol/Collection~Collection, so you can use their methods.
|
|
256
|
+
* You can also extend this base for your own control class. See examples/custom-controls for an example of how to do this.
|
|
257
|
+
*/
|
|
258
|
+
class MapControl extends Control {
|
|
259
|
+
constructor(options) {
|
|
260
|
+
super(options);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
250
264
|
class MapRenderedEvent extends PostboyGenericMessage {
|
|
251
265
|
constructor(map) {
|
|
252
266
|
super();
|
|
@@ -347,6 +361,50 @@ class CancelFeatureModificationCommand extends PostboyGenericMessage {
|
|
|
347
361
|
}
|
|
348
362
|
CancelFeatureModificationCommand.ID = '9c9fb40f-ea95-4704-8177-0e9ecabf36fa';
|
|
349
363
|
|
|
364
|
+
class AddControlCommand extends PostboyGenericMessage {
|
|
365
|
+
constructor(item) {
|
|
366
|
+
super();
|
|
367
|
+
this.item = item;
|
|
368
|
+
}
|
|
369
|
+
get id() {
|
|
370
|
+
return AddControlCommand.ID;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
AddControlCommand.ID = '8e1c06eb-b395-4fe1-929c-ebf0805eeb49';
|
|
374
|
+
|
|
375
|
+
class RemoveControlCommand extends PostboyGenericMessage {
|
|
376
|
+
constructor(item) {
|
|
377
|
+
super();
|
|
378
|
+
this.item = item;
|
|
379
|
+
}
|
|
380
|
+
get id() {
|
|
381
|
+
return RemoveControlCommand.ID;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
RemoveControlCommand.ID = '361641e0-804a-4930-8c27-0cea6330dbfc';
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Forces map to move to a specific point
|
|
388
|
+
*/
|
|
389
|
+
class SetMapCenterCommand extends PostboyGenericMessage {
|
|
390
|
+
/**
|
|
391
|
+
*
|
|
392
|
+
* @param lat - the desired latitude
|
|
393
|
+
* @param lng - the desired longitude
|
|
394
|
+
* @param zoom - the desired zoom; doesn't change zoom if undefined
|
|
395
|
+
*/
|
|
396
|
+
constructor(lat, lng, zoom) {
|
|
397
|
+
super();
|
|
398
|
+
this.lat = lat;
|
|
399
|
+
this.lng = lng;
|
|
400
|
+
this.zoom = zoom;
|
|
401
|
+
}
|
|
402
|
+
get id() {
|
|
403
|
+
return SetMapCenterCommand.ID;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
SetMapCenterCommand.ID = 'd50e89c9-6707-4f8c-ab57-65fcef232182';
|
|
407
|
+
|
|
350
408
|
class AddLayerCommand extends PostboyGenericMessage {
|
|
351
409
|
constructor(layer) {
|
|
352
410
|
super();
|
|
@@ -593,14 +651,14 @@ class MapManagementService {
|
|
|
593
651
|
}
|
|
594
652
|
observePlaceFeatures() {
|
|
595
653
|
this.postboy.subscribe(PlaceLayerFeaturesCommand.ID).subscribe((c) => {
|
|
596
|
-
var _a;
|
|
654
|
+
var _a, _b;
|
|
597
655
|
if (!this.layers.has(c.layer))
|
|
598
656
|
return;
|
|
599
657
|
let source = this.layers.take(c.layer).getSource();
|
|
600
658
|
if (!!source['getSource'])
|
|
601
659
|
source = (_a = source) === null || _a === void 0 ? void 0 : _a.getSource();
|
|
602
660
|
source === null || source === void 0 ? void 0 : source.clear();
|
|
603
|
-
source === null || source === void 0 ? void 0 : source.addFeatures(c.features);
|
|
661
|
+
!!((_b = c.features) === null || _b === void 0 ? void 0 : _b.length) && (source === null || source === void 0 ? void 0 : source.addFeatures(c.features));
|
|
604
662
|
});
|
|
605
663
|
}
|
|
606
664
|
observeRemoveLayer() {
|
|
@@ -640,7 +698,14 @@ class MapStateService {
|
|
|
640
698
|
this.postboy = postboy;
|
|
641
699
|
}
|
|
642
700
|
up() {
|
|
643
|
-
this.
|
|
701
|
+
this.observeMapRendering();
|
|
702
|
+
this.observeCenter();
|
|
703
|
+
}
|
|
704
|
+
observeMapRendering() {
|
|
705
|
+
this.postboy
|
|
706
|
+
.subscribe(MapRenderedEvent.ID)
|
|
707
|
+
.pipe(first())
|
|
708
|
+
.subscribe((ev) => {
|
|
644
709
|
var _a;
|
|
645
710
|
this.map = ev.map;
|
|
646
711
|
(_a = this.map) === null || _a === void 0 ? void 0 : _a.on('moveend', () => {
|
|
@@ -651,6 +716,14 @@ class MapStateService {
|
|
|
651
716
|
});
|
|
652
717
|
});
|
|
653
718
|
}
|
|
719
|
+
observeCenter() {
|
|
720
|
+
this.postboy.subscribe(SetMapCenterCommand.ID).subscribe((c) => {
|
|
721
|
+
var _a, _b;
|
|
722
|
+
(_a = this.map) === null || _a === void 0 ? void 0 : _a.getView().setCenter([c.lng, c.lat]);
|
|
723
|
+
if (c.zoom)
|
|
724
|
+
(_b = this.map) === null || _b === void 0 ? void 0 : _b.getView().setZoom(c.zoom);
|
|
725
|
+
});
|
|
726
|
+
}
|
|
654
727
|
}
|
|
655
728
|
MapStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapStateService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
656
729
|
MapStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapStateService });
|
|
@@ -914,14 +987,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
914
987
|
type: Injectable
|
|
915
988
|
}], ctorParameters: function () { return [{ type: MapPostboyService }]; } });
|
|
916
989
|
|
|
990
|
+
class ControlsService {
|
|
991
|
+
constructor(postboy) {
|
|
992
|
+
this.postboy = postboy;
|
|
993
|
+
}
|
|
994
|
+
up() {
|
|
995
|
+
this.observeMapRender();
|
|
996
|
+
}
|
|
997
|
+
observeMapRender() {
|
|
998
|
+
this.postboy
|
|
999
|
+
.subscribe(MapRenderedEvent.ID)
|
|
1000
|
+
.pipe(first())
|
|
1001
|
+
.subscribe((m) => {
|
|
1002
|
+
this.map = m.map;
|
|
1003
|
+
this.observeAdding();
|
|
1004
|
+
this.observeRemoving();
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
observeAdding() {
|
|
1008
|
+
this.postboy.subscribe(AddControlCommand.ID).subscribe((c) => { var _a; return (_a = this.map) === null || _a === void 0 ? void 0 : _a.addControl(c.item); });
|
|
1009
|
+
}
|
|
1010
|
+
observeRemoving() {
|
|
1011
|
+
this.postboy
|
|
1012
|
+
.subscribe(RemoveControlCommand.ID)
|
|
1013
|
+
.subscribe((c) => { var _a; return (_a = this.map) === null || _a === void 0 ? void 0 : _a.removeControl(c.item); });
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
ControlsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ControlsService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1017
|
+
ControlsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ControlsService });
|
|
1018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ControlsService, decorators: [{
|
|
1019
|
+
type: Injectable
|
|
1020
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }]; } });
|
|
1021
|
+
|
|
917
1022
|
class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
918
|
-
constructor(service, management, state, mapFeature, interaction, drawing, featureModification) {
|
|
1023
|
+
constructor(service, management, state, mapFeature, interaction, drawing, featureModification, controls) {
|
|
919
1024
|
super(service);
|
|
920
|
-
this.registerServices([management, state, interaction, mapFeature, drawing, featureModification]);
|
|
1025
|
+
this.registerServices([management, state, interaction, mapFeature, drawing, featureModification, controls]);
|
|
921
1026
|
}
|
|
922
1027
|
_up() {
|
|
923
1028
|
this.registerReplay(MapRenderedEvent.ID);
|
|
924
1029
|
this.registerReplay(PlaceLayerFeaturesCommand.ID);
|
|
1030
|
+
this.registerReplay(RemoveControlCommand.ID);
|
|
1031
|
+
this.registerReplay(AddControlCommand.ID);
|
|
1032
|
+
this.registerReplay(SetMapCenterCommand.ID);
|
|
925
1033
|
this.registerSubject(AddLayerCommand.ID);
|
|
926
1034
|
this.registerSubject(RemoveLayerCommand.ID);
|
|
927
1035
|
this.registerSubject(AddTileCommand.ID);
|
|
@@ -946,11 +1054,11 @@ class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
|
946
1054
|
this.registerExecutor(GenerateZoomControlExecutor.ID, (e) => ZoomControlFactory.build(e.settings));
|
|
947
1055
|
}
|
|
948
1056
|
}
|
|
949
|
-
MessageRegistratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MessageRegistratorService, deps: [{ token: MapPostboyService }, { token: MapManagementService }, { token: MapStateService }, { token: MapFeatureService }, { token: MapClickService }, { token: DrawingService }, { token: FeatureModificationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1057
|
+
MessageRegistratorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", 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 });
|
|
950
1058
|
MessageRegistratorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MessageRegistratorService });
|
|
951
1059
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MessageRegistratorService, decorators: [{
|
|
952
1060
|
type: Injectable
|
|
953
|
-
}], ctorParameters: function () { return [{ type: MapPostboyService }, { type: MapManagementService }, { type: MapStateService }, { type: MapFeatureService }, { type: MapClickService }, { type: DrawingService }, { type: FeatureModificationService }]; } });
|
|
1061
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }, { type: MapManagementService }, { type: MapStateService }, { type: MapFeatureService }, { type: MapClickService }, { type: DrawingService }, { type: FeatureModificationService }, { type: ControlsService }]; } });
|
|
954
1062
|
|
|
955
1063
|
class TileLayerSettings {
|
|
956
1064
|
constructor() {
|
|
@@ -1144,13 +1252,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1144
1252
|
type: Input
|
|
1145
1253
|
}] } });
|
|
1146
1254
|
|
|
1255
|
+
/**
|
|
1256
|
+
* A layer that is responsible for showing and styling main features on the map, such as markers and polygons
|
|
1257
|
+
*/
|
|
1147
1258
|
class FeatureLayerSettings {
|
|
1148
1259
|
constructor() {
|
|
1260
|
+
/**
|
|
1261
|
+
* The identifier of the field, it is autogenerated by default, but can be set manually
|
|
1262
|
+
*/
|
|
1149
1263
|
this.name = IdGenerator.get();
|
|
1264
|
+
/**
|
|
1265
|
+
* The priority of showing - layers with higher zIndex cover others in case of collisions
|
|
1266
|
+
*/
|
|
1150
1267
|
this.zIndex = 1;
|
|
1268
|
+
/**
|
|
1269
|
+
* The maximum zoom at which the layer is visible. 19 by default
|
|
1270
|
+
*/
|
|
1151
1271
|
this.maxZoom = 19;
|
|
1272
|
+
/**
|
|
1273
|
+
* The minimum zoom at which the layer is visible. 0 by default
|
|
1274
|
+
*/
|
|
1152
1275
|
this.minZoom = 0;
|
|
1153
1276
|
}
|
|
1277
|
+
/**
|
|
1278
|
+
* Creates a clone of the existing settings
|
|
1279
|
+
* @param model
|
|
1280
|
+
*/
|
|
1154
1281
|
static copy(model) {
|
|
1155
1282
|
const result = new FeatureLayerSettings();
|
|
1156
1283
|
result.name = model.name;
|
|
@@ -1160,21 +1287,45 @@ class FeatureLayerSettings {
|
|
|
1160
1287
|
result.style = model.style;
|
|
1161
1288
|
return result;
|
|
1162
1289
|
}
|
|
1290
|
+
/**
|
|
1291
|
+
Setter for {@link FeatureLayerSettings.zIndex}
|
|
1292
|
+
* @param zIndex
|
|
1293
|
+
*/
|
|
1163
1294
|
setZIndex(zIndex) {
|
|
1164
1295
|
return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { zIndex }));
|
|
1165
1296
|
}
|
|
1297
|
+
/**
|
|
1298
|
+
* Setter for {@link FeatureLayerSettings.name}
|
|
1299
|
+
* @param name
|
|
1300
|
+
*/
|
|
1166
1301
|
setName(name) {
|
|
1167
1302
|
return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { name }));
|
|
1168
1303
|
}
|
|
1304
|
+
/**
|
|
1305
|
+
* Setter for {@link FeatureLayerSettings.maxZoom}
|
|
1306
|
+
* @param maxZoom
|
|
1307
|
+
*/
|
|
1169
1308
|
setMaxZoom(maxZoom) {
|
|
1170
1309
|
return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom }));
|
|
1171
1310
|
}
|
|
1311
|
+
/**
|
|
1312
|
+
* Setter for {@link FeatureLayerSettings.minZoom}
|
|
1313
|
+
* @param minZoom
|
|
1314
|
+
*/
|
|
1172
1315
|
setMinZoom(minZoom) {
|
|
1173
1316
|
return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom }));
|
|
1174
1317
|
}
|
|
1318
|
+
/**
|
|
1319
|
+
* Setter for {@link FeatureLayerSettings.style}
|
|
1320
|
+
* @param style
|
|
1321
|
+
*/
|
|
1175
1322
|
setStyle(style) {
|
|
1176
1323
|
return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { style }));
|
|
1177
1324
|
}
|
|
1325
|
+
/**
|
|
1326
|
+
* Checks if the model has the same content
|
|
1327
|
+
* @param model - the object to compare
|
|
1328
|
+
*/
|
|
1178
1329
|
isSame(model) {
|
|
1179
1330
|
if (this.maxZoom !== model.maxZoom)
|
|
1180
1331
|
return false;
|
|
@@ -1530,6 +1681,7 @@ MapPlateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
1530
1681
|
DrawingGenerationService,
|
|
1531
1682
|
FeatureService,
|
|
1532
1683
|
FeatureModificationService,
|
|
1684
|
+
ControlsService,
|
|
1533
1685
|
], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\r\n<art-osm-tile-layer *ngIf=\"osmUrl && map\" [map]=\"map\" [url]=\"osmUrl\"></art-osm-tile-layer>\r\n<art-feature-layer *ngIf=\"map\" [settings]=\"drawingLayerSettings\"></art-feature-layer>\r\n", styles: ["art-map-plate{position:relative;display:flex;flex-direction:column;height:100%}\n"], components: [{ type: OsmTileLayerComponent, selector: "art-osm-tile-layer", inputs: ["url", "map"] }, { type: FeatureLayerComponent, selector: "art-feature-layer", inputs: ["settings"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1534
1686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapPlateComponent, decorators: [{
|
|
1535
1687
|
type: Component,
|
|
@@ -1548,6 +1700,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1548
1700
|
DrawingGenerationService,
|
|
1549
1701
|
FeatureService,
|
|
1550
1702
|
FeatureModificationService,
|
|
1703
|
+
ControlsService,
|
|
1551
1704
|
],
|
|
1552
1705
|
}]
|
|
1553
1706
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: MapPostboyService }, { type: MapPlateFactory }, { type: MessageRegistratorService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { settings: [{
|
|
@@ -1562,7 +1715,7 @@ class MarkersComponent extends DestructibleComponent {
|
|
|
1562
1715
|
this._markers = [];
|
|
1563
1716
|
}
|
|
1564
1717
|
set markers(value) {
|
|
1565
|
-
this._markers = value;
|
|
1718
|
+
this._markers = value !== null && value !== void 0 ? value : [];
|
|
1566
1719
|
this.putMarkers();
|
|
1567
1720
|
}
|
|
1568
1721
|
ngOnInit() {
|
|
@@ -1572,8 +1725,7 @@ class MarkersComponent extends DestructibleComponent {
|
|
|
1572
1725
|
.subscribe(() => this.putMarkers());
|
|
1573
1726
|
}
|
|
1574
1727
|
putMarkers() {
|
|
1575
|
-
|
|
1576
|
-
if (!((_a = this._markers) === null || _a === void 0 ? void 0 : _a.length))
|
|
1728
|
+
if (!this._markers)
|
|
1577
1729
|
return;
|
|
1578
1730
|
this.postboy.fire(new PlaceLayerFeaturesCommand(this.layerName, this._markers.map((m) => m.feature)));
|
|
1579
1731
|
}
|
|
@@ -1706,7 +1858,7 @@ class PolygonsComponent extends DestructibleComponent {
|
|
|
1706
1858
|
this._polygons = [];
|
|
1707
1859
|
}
|
|
1708
1860
|
set polygons(value) {
|
|
1709
|
-
this._polygons = value;
|
|
1861
|
+
this._polygons = value !== null && value !== void 0 ? value : [];
|
|
1710
1862
|
this.putPolygons();
|
|
1711
1863
|
}
|
|
1712
1864
|
ngOnInit() {
|
|
@@ -2014,5 +2166,5 @@ class StringifyFeatureHelper {
|
|
|
2014
2166
|
* Generated bundle index. Do not edit.
|
|
2015
2167
|
*/
|
|
2016
2168
|
|
|
2017
|
-
export { CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, Dictionary, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, MapClickEvent, MapControlZoomComponent, MapLyrs, MapLyrsLabel, MapModule, MapMoveEndEvent, MapPlateComponent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonStyleHelper, PolygonsComponent, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings, ZoomControlSettings };
|
|
2169
|
+
export { AddControlCommand, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, Dictionary, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, MapClickEvent, MapControl, MapControlZoomComponent, MapLyrs, MapLyrsLabel, MapModule, MapMoveEndEvent, MapPlateComponent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonStyleHelper, PolygonsComponent, RemoveControlCommand, SetMapCenterCommand, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings, ZoomControlSettings };
|
|
2018
2170
|
//# sourceMappingURL=maps-components.js.map
|