@artstesh/maps 4.1.1 → 4.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/esm2020/map/map-plate/features/markers/markers.component.mjs +3 -3
- package/dist/esm2020/map/map-plate/features/polygons/polygons.component.mjs +2 -2
- package/dist/esm2020/map/map-plate/layers/feature-layer/feature-layer.settings.mjs +44 -1
- package/dist/esm2020/map/map-plate/map-plate.component.mjs +4 -1
- package/dist/esm2020/map/messages/commands/add-control.command.mjs +12 -0
- package/dist/esm2020/map/messages/commands/remove-control.command.mjs +12 -0
- package/dist/esm2020/map/messages/commands/set-map-center.command.mjs +23 -0
- package/dist/esm2020/map/messages/index.mjs +4 -1
- package/dist/esm2020/map/models/index.mjs +2 -1
- package/dist/esm2020/map/models/map-control.mjs +15 -0
- package/dist/esm2020/map/services/controls/controls.service.mjs +37 -0
- package/dist/esm2020/map/services/map-management.service.mjs +2 -2
- package/dist/esm2020/map/services/map-state.service.mjs +19 -4
- package/dist/esm2020/map/services/message-registrator.service.mjs +12 -5
- package/dist/esm2020/src/map/map-plate/features/markers/markers.component.mjs +3 -3
- package/dist/esm2020/src/map/map-plate/features/polygons/polygons.component.mjs +2 -2
- package/dist/esm2020/src/map/map-plate/layers/feature-layer/feature-layer.settings.mjs +44 -1
- package/dist/esm2020/src/map/map-plate/map-plate.component.mjs +4 -1
- package/dist/esm2020/src/map/messages/commands/add-control.command.mjs +12 -0
- package/dist/esm2020/src/map/messages/commands/remove-control.command.mjs +12 -0
- package/dist/esm2020/src/map/messages/commands/set-map-center.command.mjs +23 -0
- package/dist/esm2020/src/map/messages/index.mjs +4 -1
- package/dist/esm2020/src/map/models/index.mjs +2 -1
- package/dist/esm2020/src/map/models/map-control.mjs +15 -0
- package/dist/esm2020/src/map/services/controls/controls.service.mjs +37 -0
- package/dist/esm2020/src/map/services/map-management.service.mjs +2 -2
- package/dist/esm2020/src/map/services/map-state.service.mjs +19 -4
- package/dist/esm2020/src/map/services/message-registrator.service.mjs +12 -5
- package/dist/fesm2015/maps-components-src-map.mjs +165 -12
- package/dist/fesm2015/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2015/maps-components.mjs +165 -12
- package/dist/fesm2015/maps-components.mjs.map +1 -1
- package/dist/fesm2020/maps-components-src-map.mjs +163 -11
- package/dist/fesm2020/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2020/maps-components.mjs +163 -11
- package/dist/fesm2020/maps-components.mjs.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,13 +651,14 @@ class MapManagementService {
|
|
|
593
651
|
}
|
|
594
652
|
observePlaceFeatures() {
|
|
595
653
|
this.postboy.subscribe(PlaceLayerFeaturesCommand.ID).subscribe((c) => {
|
|
654
|
+
var _a;
|
|
596
655
|
if (!this.layers.has(c.layer))
|
|
597
656
|
return;
|
|
598
657
|
let source = this.layers.take(c.layer).getSource();
|
|
599
658
|
if (!!source['getSource'])
|
|
600
659
|
source = source === null || source === void 0 ? void 0 : source.getSource();
|
|
601
660
|
source === null || source === void 0 ? void 0 : source.clear();
|
|
602
|
-
source === null || source === void 0 ? void 0 : source.addFeatures(c.features);
|
|
661
|
+
!!((_a = c.features) === null || _a === void 0 ? void 0 : _a.length) && (source === null || source === void 0 ? void 0 : source.addFeatures(c.features));
|
|
603
662
|
});
|
|
604
663
|
}
|
|
605
664
|
observeRemoveLayer() {
|
|
@@ -639,7 +698,14 @@ class MapStateService {
|
|
|
639
698
|
this.postboy = postboy;
|
|
640
699
|
}
|
|
641
700
|
up() {
|
|
642
|
-
this.
|
|
701
|
+
this.observeMapRendering();
|
|
702
|
+
this.observeCenter();
|
|
703
|
+
}
|
|
704
|
+
observeMapRendering() {
|
|
705
|
+
this.postboy
|
|
706
|
+
.subscribe(MapRenderedEvent.ID)
|
|
707
|
+
.pipe(first())
|
|
708
|
+
.subscribe((ev) => {
|
|
643
709
|
var _a;
|
|
644
710
|
this.map = ev.map;
|
|
645
711
|
(_a = this.map) === null || _a === void 0 ? void 0 : _a.on('moveend', () => {
|
|
@@ -650,6 +716,14 @@ class MapStateService {
|
|
|
650
716
|
});
|
|
651
717
|
});
|
|
652
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
|
+
}
|
|
653
727
|
}
|
|
654
728
|
MapStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapStateService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
655
729
|
MapStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapStateService });
|
|
@@ -913,14 +987,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
913
987
|
type: Injectable
|
|
914
988
|
}], ctorParameters: function () { return [{ type: MapPostboyService }]; } });
|
|
915
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: "15.2.10", ngImport: i0, type: ControlsService, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1017
|
+
ControlsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ControlsService });
|
|
1018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ControlsService, decorators: [{
|
|
1019
|
+
type: Injectable
|
|
1020
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }]; } });
|
|
1021
|
+
|
|
916
1022
|
class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
917
|
-
constructor(service, management, state, mapFeature, interaction, drawing, featureModification) {
|
|
1023
|
+
constructor(service, management, state, mapFeature, interaction, drawing, featureModification, controls) {
|
|
918
1024
|
super(service);
|
|
919
|
-
this.registerServices([management, state, interaction, mapFeature, drawing, featureModification]);
|
|
1025
|
+
this.registerServices([management, state, interaction, mapFeature, drawing, featureModification, controls]);
|
|
920
1026
|
}
|
|
921
1027
|
_up() {
|
|
922
1028
|
this.registerReplay(MapRenderedEvent.ID);
|
|
923
1029
|
this.registerReplay(PlaceLayerFeaturesCommand.ID);
|
|
1030
|
+
this.registerReplay(RemoveControlCommand.ID);
|
|
1031
|
+
this.registerReplay(AddControlCommand.ID);
|
|
1032
|
+
this.registerReplay(SetMapCenterCommand.ID);
|
|
924
1033
|
this.registerSubject(AddLayerCommand.ID);
|
|
925
1034
|
this.registerSubject(RemoveLayerCommand.ID);
|
|
926
1035
|
this.registerSubject(AddTileCommand.ID);
|
|
@@ -945,11 +1054,11 @@ class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
|
945
1054
|
this.registerExecutor(GenerateZoomControlExecutor.ID, (e) => ZoomControlFactory.build(e.settings));
|
|
946
1055
|
}
|
|
947
1056
|
}
|
|
948
|
-
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 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1057
|
+
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 });
|
|
949
1058
|
MessageRegistratorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageRegistratorService });
|
|
950
1059
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageRegistratorService, decorators: [{
|
|
951
1060
|
type: Injectable
|
|
952
|
-
}], 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 }]; } });
|
|
953
1062
|
|
|
954
1063
|
class TileLayerSettings {
|
|
955
1064
|
constructor() {
|
|
@@ -1133,13 +1242,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1133
1242
|
type: Input
|
|
1134
1243
|
}] } });
|
|
1135
1244
|
|
|
1245
|
+
/**
|
|
1246
|
+
* A layer that is responsible for showing and styling main features on the map, such as markers and polygons
|
|
1247
|
+
*/
|
|
1136
1248
|
class FeatureLayerSettings {
|
|
1137
1249
|
constructor() {
|
|
1250
|
+
/**
|
|
1251
|
+
* The identifier of the field, it is autogenerated by default, but can be set manually
|
|
1252
|
+
*/
|
|
1138
1253
|
this.name = IdGenerator.get();
|
|
1254
|
+
/**
|
|
1255
|
+
* The priority of showing - layers with higher zIndex cover others in case of collisions
|
|
1256
|
+
*/
|
|
1139
1257
|
this.zIndex = 1;
|
|
1258
|
+
/**
|
|
1259
|
+
* The maximum zoom at which the layer is visible. 19 by default
|
|
1260
|
+
*/
|
|
1140
1261
|
this.maxZoom = 19;
|
|
1262
|
+
/**
|
|
1263
|
+
* The minimum zoom at which the layer is visible. 0 by default
|
|
1264
|
+
*/
|
|
1141
1265
|
this.minZoom = 0;
|
|
1142
1266
|
}
|
|
1267
|
+
/**
|
|
1268
|
+
* Creates a clone of the existing settings
|
|
1269
|
+
* @param model
|
|
1270
|
+
*/
|
|
1143
1271
|
static copy(model) {
|
|
1144
1272
|
const result = new FeatureLayerSettings();
|
|
1145
1273
|
result.name = model.name;
|
|
@@ -1149,21 +1277,45 @@ class FeatureLayerSettings {
|
|
|
1149
1277
|
result.style = model.style;
|
|
1150
1278
|
return result;
|
|
1151
1279
|
}
|
|
1280
|
+
/**
|
|
1281
|
+
Setter for {@link FeatureLayerSettings.zIndex}
|
|
1282
|
+
* @param zIndex
|
|
1283
|
+
*/
|
|
1152
1284
|
setZIndex(zIndex) {
|
|
1153
1285
|
return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { zIndex }));
|
|
1154
1286
|
}
|
|
1287
|
+
/**
|
|
1288
|
+
* Setter for {@link FeatureLayerSettings.name}
|
|
1289
|
+
* @param name
|
|
1290
|
+
*/
|
|
1155
1291
|
setName(name) {
|
|
1156
1292
|
return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { name }));
|
|
1157
1293
|
}
|
|
1294
|
+
/**
|
|
1295
|
+
* Setter for {@link FeatureLayerSettings.maxZoom}
|
|
1296
|
+
* @param maxZoom
|
|
1297
|
+
*/
|
|
1158
1298
|
setMaxZoom(maxZoom) {
|
|
1159
1299
|
return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom }));
|
|
1160
1300
|
}
|
|
1301
|
+
/**
|
|
1302
|
+
* Setter for {@link FeatureLayerSettings.minZoom}
|
|
1303
|
+
* @param minZoom
|
|
1304
|
+
*/
|
|
1161
1305
|
setMinZoom(minZoom) {
|
|
1162
1306
|
return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom }));
|
|
1163
1307
|
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Setter for {@link FeatureLayerSettings.style}
|
|
1310
|
+
* @param style
|
|
1311
|
+
*/
|
|
1164
1312
|
setStyle(style) {
|
|
1165
1313
|
return FeatureLayerSettings.copy(Object.assign(Object.assign({}, this), { style }));
|
|
1166
1314
|
}
|
|
1315
|
+
/**
|
|
1316
|
+
* Checks if the model has the same content
|
|
1317
|
+
* @param model - the object to compare
|
|
1318
|
+
*/
|
|
1167
1319
|
isSame(model) {
|
|
1168
1320
|
if (this.maxZoom !== model.maxZoom)
|
|
1169
1321
|
return false;
|
|
@@ -1509,6 +1661,7 @@ MapPlateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
1509
1661
|
DrawingGenerationService,
|
|
1510
1662
|
FeatureService,
|
|
1511
1663
|
FeatureModificationService,
|
|
1664
|
+
ControlsService,
|
|
1512
1665
|
], 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"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: OsmTileLayerComponent, selector: "art-osm-tile-layer", inputs: ["url", "map"] }, { kind: "component", type: FeatureLayerComponent, selector: "art-feature-layer", inputs: ["settings"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1513
1666
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapPlateComponent, decorators: [{
|
|
1514
1667
|
type: Component,
|
|
@@ -1522,6 +1675,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1522
1675
|
DrawingGenerationService,
|
|
1523
1676
|
FeatureService,
|
|
1524
1677
|
FeatureModificationService,
|
|
1678
|
+
ControlsService,
|
|
1525
1679
|
], 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"] }]
|
|
1526
1680
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: MapPostboyService }, { type: MapPlateFactory }, { type: MessageRegistratorService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { settings: [{
|
|
1527
1681
|
type: Input
|
|
@@ -1535,7 +1689,7 @@ class MarkersComponent extends DestructibleComponent {
|
|
|
1535
1689
|
this._markers = [];
|
|
1536
1690
|
}
|
|
1537
1691
|
set markers(value) {
|
|
1538
|
-
this._markers = value;
|
|
1692
|
+
this._markers = value !== null && value !== void 0 ? value : [];
|
|
1539
1693
|
this.putMarkers();
|
|
1540
1694
|
}
|
|
1541
1695
|
ngOnInit() {
|
|
@@ -1545,8 +1699,7 @@ class MarkersComponent extends DestructibleComponent {
|
|
|
1545
1699
|
.subscribe(() => this.putMarkers());
|
|
1546
1700
|
}
|
|
1547
1701
|
putMarkers() {
|
|
1548
|
-
|
|
1549
|
-
if (!((_a = this._markers) === null || _a === void 0 ? void 0 : _a.length))
|
|
1702
|
+
if (!this._markers)
|
|
1550
1703
|
return;
|
|
1551
1704
|
this.postboy.fire(new PlaceLayerFeaturesCommand(this.layerName, this._markers.map((m) => m.feature)));
|
|
1552
1705
|
}
|
|
@@ -1669,7 +1822,7 @@ class PolygonsComponent extends DestructibleComponent {
|
|
|
1669
1822
|
this._polygons = [];
|
|
1670
1823
|
}
|
|
1671
1824
|
set polygons(value) {
|
|
1672
|
-
this._polygons = value;
|
|
1825
|
+
this._polygons = value !== null && value !== void 0 ? value : [];
|
|
1673
1826
|
this.putPolygons();
|
|
1674
1827
|
}
|
|
1675
1828
|
ngOnInit() {
|
|
@@ -1967,5 +2120,5 @@ class StringifyFeatureHelper {
|
|
|
1967
2120
|
* Generated bundle index. Do not edit.
|
|
1968
2121
|
*/
|
|
1969
2122
|
|
|
1970
|
-
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 };
|
|
2123
|
+
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 };
|
|
1971
2124
|
//# sourceMappingURL=maps-components.mjs.map
|