@artstesh/maps 1.0.11 → 1.1.1
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 +168 -23
- package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
- package/dist/bundles/maps-components.umd.js +168 -23
- package/dist/bundles/maps-components.umd.js.map +1 -1
- package/dist/esm2015/map/map-plate/controls/index.js +3 -0
- package/dist/esm2015/map/map-plate/controls/map-control-zoom/map-control-zoom.component.js +54 -0
- package/dist/esm2015/map/map-plate/controls/map-control-zoom/zoom-control.factory.js +13 -0
- package/dist/esm2015/map/map-plate/controls/map-control-zoom/zoom-control.settings.js +47 -0
- package/dist/esm2015/map/map-plate/features/markers/markers.component.js +3 -3
- package/dist/esm2015/map/map-plate/features/polygons/polygons.component.js +3 -3
- package/dist/esm2015/map/map-plate/layers/cluster-layer/cluster-layer.component.js +3 -3
- package/dist/esm2015/map/map-plate/layers/feature-layer/feature-layer.component.js +3 -3
- package/dist/esm2015/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.js +3 -3
- package/dist/esm2015/map/map-plate/layers/tile-layer/tile-layer.component.js +3 -3
- package/dist/esm2015/map/map-plate/map-plate.component.js +4 -4
- package/dist/esm2015/map/map-plate/tooltips/tooltip/tooltip.component.js +3 -3
- package/dist/esm2015/map/map.module.js +8 -3
- package/dist/esm2015/map/messages/executors/generate-zoom-control.executor.js +12 -0
- package/dist/esm2015/map/messages/queries/get-features-in-area.query.js +1 -1
- package/dist/esm2015/map/models/drawing-type.enum.js +2 -1
- package/dist/esm2015/map/public-api.js +2 -1
- package/dist/esm2015/map/services/drawing/drawing-generation.service.js +4 -2
- package/dist/esm2015/map/services/feature.service.js +1 -1
- package/dist/esm2015/map/services/message-registrator.service.js +4 -1
- package/dist/esm2015/src/map/map-plate/controls/index.js +3 -0
- package/dist/esm2015/src/map/map-plate/controls/map-control-zoom/map-control-zoom.component.js +54 -0
- package/dist/esm2015/src/map/map-plate/controls/map-control-zoom/zoom-control.factory.js +13 -0
- package/dist/esm2015/src/map/map-plate/controls/map-control-zoom/zoom-control.settings.js +47 -0
- package/dist/esm2015/src/map/map-plate/features/markers/markers.component.js +3 -3
- package/dist/esm2015/src/map/map-plate/features/polygons/polygons.component.js +3 -3
- package/dist/esm2015/src/map/map-plate/layers/cluster-layer/cluster-layer.component.js +3 -3
- package/dist/esm2015/src/map/map-plate/layers/feature-layer/feature-layer.component.js +3 -3
- package/dist/esm2015/src/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.js +3 -3
- package/dist/esm2015/src/map/map-plate/layers/tile-layer/tile-layer.component.js +3 -3
- package/dist/esm2015/src/map/map-plate/map-plate.component.js +4 -4
- package/dist/esm2015/src/map/map-plate/tooltips/tooltip/tooltip.component.js +3 -3
- package/dist/esm2015/src/map/map.module.js +8 -3
- package/dist/esm2015/src/map/messages/executors/generate-zoom-control.executor.js +12 -0
- package/dist/esm2015/src/map/messages/queries/get-features-in-area.query.js +1 -1
- package/dist/esm2015/src/map/models/drawing-type.enum.js +2 -1
- package/dist/esm2015/src/map/public-api.js +2 -1
- package/dist/esm2015/src/map/services/drawing/drawing-generation.service.js +4 -2
- package/dist/esm2015/src/map/services/feature.service.js +1 -1
- package/dist/esm2015/src/map/services/message-registrator.service.js +4 -1
- package/dist/fesm2015/maps-components-src-map.js +146 -21
- package/dist/fesm2015/maps-components-src-map.js.map +1 -1
- package/dist/fesm2015/maps-components.js +146 -21
- package/dist/fesm2015/maps-components.js.map +1 -1
- package/dist/map/map-plate/controls/index.d.ts +2 -0
- package/dist/map/map-plate/controls/map-control-zoom/map-control-zoom.component.d.ts +19 -0
- package/dist/map/map-plate/controls/map-control-zoom/zoom-control.factory.d.ts +5 -0
- package/dist/map/map-plate/controls/map-control-zoom/zoom-control.settings.d.ts +14 -0
- package/dist/map/map-plate/features/markers/markers.component.d.ts +1 -1
- package/dist/map/map-plate/features/polygons/polygons.component.d.ts +1 -1
- package/dist/map/map-plate/layers/cluster-layer/cluster-layer.component.d.ts +1 -1
- package/dist/map/map-plate/layers/feature-layer/feature-layer.component.d.ts +1 -1
- package/dist/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.d.ts +1 -1
- package/dist/map/map-plate/layers/tile-layer/tile-layer.component.d.ts +1 -1
- package/dist/map/map-plate/map-plate.component.d.ts +1 -1
- package/dist/map/map-plate/tooltips/tooltip/tooltip.component.d.ts +1 -1
- package/dist/map/map.module.d.ts +3 -2
- package/dist/map/messages/executors/generate-zoom-control.executor.d.ts +9 -0
- package/dist/map/models/drawing-type.enum.d.ts +2 -1
- package/dist/map/public-api.d.ts +1 -0
- package/dist/src/map/map-plate/controls/index.d.ts +2 -0
- package/dist/src/map/map-plate/controls/map-control-zoom/map-control-zoom.component.d.ts +19 -0
- package/dist/src/map/map-plate/controls/map-control-zoom/zoom-control.factory.d.ts +5 -0
- package/dist/src/map/map-plate/controls/map-control-zoom/zoom-control.settings.d.ts +14 -0
- package/dist/src/map/map-plate/features/markers/markers.component.d.ts +1 -1
- package/dist/src/map/map-plate/features/polygons/polygons.component.d.ts +1 -1
- package/dist/src/map/map-plate/layers/cluster-layer/cluster-layer.component.d.ts +1 -1
- package/dist/src/map/map-plate/layers/feature-layer/feature-layer.component.d.ts +1 -1
- package/dist/src/map/map-plate/layers/osm-tile-layer/osm-tile-layer.component.d.ts +1 -1
- package/dist/src/map/map-plate/layers/tile-layer/tile-layer.component.d.ts +1 -1
- package/dist/src/map/map-plate/map-plate.component.d.ts +1 -1
- package/dist/src/map/map-plate/tooltips/tooltip/tooltip.component.d.ts +1 -1
- package/dist/src/map/map.module.d.ts +3 -2
- package/dist/src/map/messages/executors/generate-zoom-control.executor.d.ts +9 -0
- package/dist/src/map/models/drawing-type.enum.d.ts +2 -1
- package/dist/src/map/public-api.d.ts +1 -0
- package/package.json +1 -1
|
@@ -9,7 +9,8 @@ import { getCenter, createEmpty, extend } from 'ol/extent';
|
|
|
9
9
|
import { get, useGeographic, transform } from 'ol/proj';
|
|
10
10
|
import { PostboyGenericMessage, PostboyCallbackMessage, PostboyExecutor, PostboyService, PostboyAbstractRegistrator } from '@artstesh/postboy';
|
|
11
11
|
import { Draw, Modify, Translate } from 'ol/interaction';
|
|
12
|
-
import { createRegularPolygon } from 'ol/interaction/Draw';
|
|
12
|
+
import { createRegularPolygon, createBox } from 'ol/interaction/Draw';
|
|
13
|
+
import { Zoom } from 'ol/control';
|
|
13
14
|
import { first, filter, auditTime } from 'rxjs/operators';
|
|
14
15
|
import { Vector, XYZ } from 'ol/source';
|
|
15
16
|
import TileLayer from 'ol/layer/Tile';
|
|
@@ -181,6 +182,7 @@ var DrawingType;
|
|
|
181
182
|
DrawingType[DrawingType["Polygon"] = 1] = "Polygon";
|
|
182
183
|
DrawingType[DrawingType["Circle"] = 2] = "Circle";
|
|
183
184
|
DrawingType[DrawingType["Square"] = 3] = "Square";
|
|
185
|
+
DrawingType[DrawingType["Box"] = 4] = "Box";
|
|
184
186
|
})(DrawingType || (DrawingType = {}));
|
|
185
187
|
|
|
186
188
|
var FeatureOutputFormat;
|
|
@@ -447,6 +449,8 @@ class DrawingGenerationService {
|
|
|
447
449
|
switch (type) {
|
|
448
450
|
case DrawingType.Circle:
|
|
449
451
|
return createRegularPolygon(32);
|
|
452
|
+
case DrawingType.Box:
|
|
453
|
+
return createBox();
|
|
450
454
|
case DrawingType.Square:
|
|
451
455
|
return createRegularPolygon(4);
|
|
452
456
|
}
|
|
@@ -507,6 +511,29 @@ class GenerateDrawExecutor extends PostboyExecutor {
|
|
|
507
511
|
}
|
|
508
512
|
GenerateDrawExecutor.ID = 'f01c99ba-0953-4ab5-82f9-04e6fbb678c1';
|
|
509
513
|
|
|
514
|
+
class GenerateZoomControlExecutor extends PostboyExecutor {
|
|
515
|
+
constructor(settings) {
|
|
516
|
+
super();
|
|
517
|
+
this.settings = settings;
|
|
518
|
+
}
|
|
519
|
+
get id() {
|
|
520
|
+
return GenerateZoomControlExecutor.ID;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
GenerateZoomControlExecutor.ID = 'ff16a833-c68e-4b1a-bc23-c0d16b002810';
|
|
524
|
+
|
|
525
|
+
class ZoomControlFactory {
|
|
526
|
+
static build(settings) {
|
|
527
|
+
return new Zoom({
|
|
528
|
+
zoomInTipLabel: settings.zoomInLabel,
|
|
529
|
+
zoomOutTipLabel: settings.zoomOutLabel,
|
|
530
|
+
zoomInClassName: settings.zoomInClass,
|
|
531
|
+
zoomOutClassName: settings.zoomOutClass,
|
|
532
|
+
className: settings.controlClass,
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
510
537
|
class MapPostboyService extends PostboyService {
|
|
511
538
|
constructor() {
|
|
512
539
|
super();
|
|
@@ -916,6 +943,7 @@ class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
|
916
943
|
setExecutors() {
|
|
917
944
|
this.registerExecutor(FilterFeaturesInAreaExecutor.ID, (e) => FeatureService.filterFeaturesInArea(e));
|
|
918
945
|
this.registerExecutor(GenerateDrawExecutor.ID, (e) => DrawingGenerationService.getDraw(e));
|
|
946
|
+
this.registerExecutor(GenerateZoomControlExecutor.ID, (e) => ZoomControlFactory.build(e.settings));
|
|
919
947
|
}
|
|
920
948
|
}
|
|
921
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 });
|
|
@@ -1047,11 +1075,11 @@ class TileLayerComponent extends DestructibleComponent {
|
|
|
1047
1075
|
}
|
|
1048
1076
|
}
|
|
1049
1077
|
TileLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TileLayerComponent, deps: [{ token: MapPostboyService }, { token: TileLayerFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
1050
|
-
TileLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TileLayerComponent, selector: "
|
|
1078
|
+
TileLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TileLayerComponent, selector: "art-tile-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1051
1079
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TileLayerComponent, decorators: [{
|
|
1052
1080
|
type: Component,
|
|
1053
1081
|
args: [{
|
|
1054
|
-
selector: '
|
|
1082
|
+
selector: 'art-tile-layer',
|
|
1055
1083
|
template: '',
|
|
1056
1084
|
styleUrls: [],
|
|
1057
1085
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1101,11 +1129,11 @@ class OsmTileLayerComponent extends DestructibleComponent {
|
|
|
1101
1129
|
}
|
|
1102
1130
|
}
|
|
1103
1131
|
OsmTileLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: OsmTileLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1104
|
-
OsmTileLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: OsmTileLayerComponent, selector: "
|
|
1132
|
+
OsmTileLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: OsmTileLayerComponent, selector: "art-osm-tile-layer", inputs: { url: "url", map: "map" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1105
1133
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: OsmTileLayerComponent, decorators: [{
|
|
1106
1134
|
type: Component,
|
|
1107
1135
|
args: [{
|
|
1108
|
-
selector: '
|
|
1136
|
+
selector: 'art-osm-tile-layer',
|
|
1109
1137
|
template: '',
|
|
1110
1138
|
styleUrls: [],
|
|
1111
1139
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1218,11 +1246,11 @@ class FeatureLayerComponent extends DestructibleComponent {
|
|
|
1218
1246
|
}
|
|
1219
1247
|
}
|
|
1220
1248
|
FeatureLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: FeatureLayerComponent, deps: [{ token: MapPostboyService }, { token: FeatureLayerFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
1221
|
-
FeatureLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: FeatureLayerComponent, selector: "
|
|
1249
|
+
FeatureLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: FeatureLayerComponent, selector: "art-feature-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1222
1250
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: FeatureLayerComponent, decorators: [{
|
|
1223
1251
|
type: Component,
|
|
1224
1252
|
args: [{
|
|
1225
|
-
selector: '
|
|
1253
|
+
selector: 'art-feature-layer',
|
|
1226
1254
|
template: '',
|
|
1227
1255
|
styleUrls: [],
|
|
1228
1256
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1414,11 +1442,11 @@ class ClusterLayerComponent extends DestructibleComponent {
|
|
|
1414
1442
|
}
|
|
1415
1443
|
}
|
|
1416
1444
|
ClusterLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ClusterLayerComponent, deps: [{ token: MapPostboyService }, { token: ClusterLayerFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
1417
|
-
ClusterLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ClusterLayerComponent, selector: "
|
|
1445
|
+
ClusterLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ClusterLayerComponent, selector: "art-cluster-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1418
1446
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ClusterLayerComponent, decorators: [{
|
|
1419
1447
|
type: Component,
|
|
1420
1448
|
args: [{
|
|
1421
|
-
selector: '
|
|
1449
|
+
selector: 'art-cluster-layer',
|
|
1422
1450
|
template: '',
|
|
1423
1451
|
styleUrls: [],
|
|
1424
1452
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1492,7 +1520,7 @@ class MapPlateComponent extends DestructibleComponent {
|
|
|
1492
1520
|
}
|
|
1493
1521
|
}
|
|
1494
1522
|
MapPlateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapPlateComponent, deps: [{ token: i0.ElementRef }, { token: MapPostboyService }, { token: MapPlateFactory }, { token: MessageRegistratorService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1495
|
-
MapPlateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MapPlateComponent, selector: "
|
|
1523
|
+
MapPlateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MapPlateComponent, selector: "art-map-plate", inputs: { settings: "settings" }, providers: [
|
|
1496
1524
|
MessageRegistratorService,
|
|
1497
1525
|
MapStateService,
|
|
1498
1526
|
MapManagementService,
|
|
@@ -1502,11 +1530,11 @@ MapPlateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
1502
1530
|
DrawingGenerationService,
|
|
1503
1531
|
FeatureService,
|
|
1504
1532
|
FeatureModificationService,
|
|
1505
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\r\n<
|
|
1533
|
+
], 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 });
|
|
1506
1534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapPlateComponent, decorators: [{
|
|
1507
1535
|
type: Component,
|
|
1508
1536
|
args: [{
|
|
1509
|
-
selector: '
|
|
1537
|
+
selector: 'art-map-plate',
|
|
1510
1538
|
templateUrl: './map-plate.component.html',
|
|
1511
1539
|
styleUrls: ['./map-plate.component.scss'],
|
|
1512
1540
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1551,11 +1579,11 @@ class MarkersComponent extends DestructibleComponent {
|
|
|
1551
1579
|
}
|
|
1552
1580
|
}
|
|
1553
1581
|
MarkersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MarkersComponent, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1554
|
-
MarkersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MarkersComponent, selector: "
|
|
1582
|
+
MarkersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MarkersComponent, selector: "art-markers", inputs: { layerName: "layerName", markers: "markers" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1555
1583
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MarkersComponent, decorators: [{
|
|
1556
1584
|
type: Component,
|
|
1557
1585
|
args: [{
|
|
1558
|
-
selector: '
|
|
1586
|
+
selector: 'art-markers',
|
|
1559
1587
|
template: '',
|
|
1560
1588
|
styleUrls: [],
|
|
1561
1589
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1654,11 +1682,11 @@ class TooltipComponent extends DestructibleComponent {
|
|
|
1654
1682
|
}
|
|
1655
1683
|
}
|
|
1656
1684
|
TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TooltipComponent, deps: [{ token: MapPostboyService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1657
|
-
TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TooltipComponent, selector: "
|
|
1685
|
+
TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TooltipComponent, selector: "art-tooltip", inputs: { settings: "settings" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["tip"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div #tip [class]=\"['tooltip-wrapper', _settings.containerClass]\" [hidden]=\"!show\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".tooltip-wrapper{position:absolute}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1658
1686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
1659
1687
|
type: Component,
|
|
1660
1688
|
args: [{
|
|
1661
|
-
selector: '
|
|
1689
|
+
selector: 'art-tooltip',
|
|
1662
1690
|
templateUrl: './tooltip.component.html',
|
|
1663
1691
|
styleUrls: ['./tooltip.component.scss'],
|
|
1664
1692
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1694,11 +1722,11 @@ class PolygonsComponent extends DestructibleComponent {
|
|
|
1694
1722
|
}
|
|
1695
1723
|
}
|
|
1696
1724
|
PolygonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PolygonsComponent, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1697
|
-
PolygonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PolygonsComponent, selector: "
|
|
1725
|
+
PolygonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PolygonsComponent, selector: "art-polygons", inputs: { layerName: "layerName", polygons: "polygons" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1698
1726
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PolygonsComponent, decorators: [{
|
|
1699
1727
|
type: Component,
|
|
1700
1728
|
args: [{
|
|
1701
|
-
selector: '
|
|
1729
|
+
selector: 'art-polygons',
|
|
1702
1730
|
template: '',
|
|
1703
1731
|
styleUrls: [],
|
|
1704
1732
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1709,6 +1737,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1709
1737
|
type: Input
|
|
1710
1738
|
}] } });
|
|
1711
1739
|
|
|
1740
|
+
class ZoomControlSettings {
|
|
1741
|
+
constructor() {
|
|
1742
|
+
this.controlClass = 'ol-zoom';
|
|
1743
|
+
this.zoomInClass = 'ol-zoom-in';
|
|
1744
|
+
this.zoomOutClass = 'ol-zoom-out';
|
|
1745
|
+
this.zoomInLabel = 'Zoom In';
|
|
1746
|
+
this.zoomOutLabel = 'Zoom Out';
|
|
1747
|
+
}
|
|
1748
|
+
static copy(model) {
|
|
1749
|
+
const result = new ZoomControlSettings();
|
|
1750
|
+
result.controlClass = model.controlClass;
|
|
1751
|
+
result.zoomInClass = model.zoomInClass;
|
|
1752
|
+
result.zoomOutClass = model.zoomOutClass;
|
|
1753
|
+
result.zoomInLabel = model.zoomInLabel;
|
|
1754
|
+
result.zoomOutLabel = model.zoomOutLabel;
|
|
1755
|
+
return result;
|
|
1756
|
+
}
|
|
1757
|
+
isSame(model) {
|
|
1758
|
+
if (this.zoomInClass !== model.zoomInClass)
|
|
1759
|
+
return false;
|
|
1760
|
+
if (this.zoomOutClass !== model.zoomOutClass)
|
|
1761
|
+
return false;
|
|
1762
|
+
if (this.zoomInLabel !== model.zoomInLabel)
|
|
1763
|
+
return false;
|
|
1764
|
+
if (this.controlClass !== model.controlClass)
|
|
1765
|
+
return false;
|
|
1766
|
+
if (this.zoomOutLabel !== model.zoomOutLabel)
|
|
1767
|
+
return false;
|
|
1768
|
+
return true;
|
|
1769
|
+
}
|
|
1770
|
+
setZoomInLabel(zoomInLabel) {
|
|
1771
|
+
return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomInLabel }));
|
|
1772
|
+
}
|
|
1773
|
+
setZoomOutClass(zoomOutClass) {
|
|
1774
|
+
return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomOutClass }));
|
|
1775
|
+
}
|
|
1776
|
+
setZoomInClass(zoomInClass) {
|
|
1777
|
+
return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomInClass }));
|
|
1778
|
+
}
|
|
1779
|
+
setZoomOutLabel(zoomOutLabel) {
|
|
1780
|
+
return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomOutLabel }));
|
|
1781
|
+
}
|
|
1782
|
+
setControlClass(controlClass) {
|
|
1783
|
+
return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { controlClass }));
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
class MapControlZoomComponent extends DestructibleComponent {
|
|
1788
|
+
constructor(postboy) {
|
|
1789
|
+
super();
|
|
1790
|
+
this.postboy = postboy;
|
|
1791
|
+
this._settings = new ZoomControlSettings();
|
|
1792
|
+
this.onDestroy = () => {
|
|
1793
|
+
this.eliminate();
|
|
1794
|
+
};
|
|
1795
|
+
this.eliminate = () => !!this.map && !!this.control && this.map.removeControl(this.control);
|
|
1796
|
+
}
|
|
1797
|
+
set settings(value) {
|
|
1798
|
+
if (!value || this._settings.isSame(value))
|
|
1799
|
+
return;
|
|
1800
|
+
this._settings = value;
|
|
1801
|
+
this.setControl();
|
|
1802
|
+
}
|
|
1803
|
+
ngOnInit() {
|
|
1804
|
+
this.postboy
|
|
1805
|
+
.subscribe(MapRenderedEvent.ID)
|
|
1806
|
+
.pipe(filter((m) => !!m), first())
|
|
1807
|
+
.subscribe((m) => {
|
|
1808
|
+
this.map = m.map;
|
|
1809
|
+
this.setControl();
|
|
1810
|
+
});
|
|
1811
|
+
}
|
|
1812
|
+
setControl() {
|
|
1813
|
+
if (!this.map)
|
|
1814
|
+
return;
|
|
1815
|
+
this.control = this.postboy.execute(new GenerateZoomControlExecutor(this._settings));
|
|
1816
|
+
this.map.addControl(this.control);
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
MapControlZoomComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapControlZoomComponent, deps: [{ token: MapPostboyService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1820
|
+
MapControlZoomComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MapControlZoomComponent, selector: "art-map-control-zoom", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapControlZoomComponent, decorators: [{
|
|
1822
|
+
type: Component,
|
|
1823
|
+
args: [{
|
|
1824
|
+
selector: 'art-map-control-zoom',
|
|
1825
|
+
template: '',
|
|
1826
|
+
styleUrls: [],
|
|
1827
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1828
|
+
}]
|
|
1829
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }]; }, propDecorators: { settings: [{
|
|
1830
|
+
type: Input
|
|
1831
|
+
}] } });
|
|
1832
|
+
|
|
1712
1833
|
class MapModule {
|
|
1713
1834
|
}
|
|
1714
1835
|
MapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1720,13 +1841,15 @@ MapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.
|
|
|
1720
1841
|
MarkersComponent,
|
|
1721
1842
|
TooltipComponent,
|
|
1722
1843
|
PolygonsComponent,
|
|
1723
|
-
ClusterLayerComponent
|
|
1844
|
+
ClusterLayerComponent,
|
|
1845
|
+
MapControlZoomComponent], imports: [CommonModule], exports: [MapPlateComponent,
|
|
1724
1846
|
FeatureLayerComponent,
|
|
1725
1847
|
MarkersComponent,
|
|
1726
1848
|
TileLayerComponent,
|
|
1727
1849
|
TooltipComponent,
|
|
1728
1850
|
PolygonsComponent,
|
|
1729
|
-
ClusterLayerComponent
|
|
1851
|
+
ClusterLayerComponent,
|
|
1852
|
+
MapControlZoomComponent] });
|
|
1730
1853
|
MapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapModule, imports: [[CommonModule]] });
|
|
1731
1854
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MapModule, decorators: [{
|
|
1732
1855
|
type: NgModule,
|
|
@@ -1742,6 +1865,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1742
1865
|
TooltipComponent,
|
|
1743
1866
|
PolygonsComponent,
|
|
1744
1867
|
ClusterLayerComponent,
|
|
1868
|
+
MapControlZoomComponent,
|
|
1745
1869
|
],
|
|
1746
1870
|
exports: [
|
|
1747
1871
|
MapPlateComponent,
|
|
@@ -1751,6 +1875,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1751
1875
|
TooltipComponent,
|
|
1752
1876
|
PolygonsComponent,
|
|
1753
1877
|
ClusterLayerComponent,
|
|
1878
|
+
MapControlZoomComponent,
|
|
1754
1879
|
],
|
|
1755
1880
|
}]
|
|
1756
1881
|
}] });
|
|
@@ -1885,5 +2010,5 @@ class StringifyFeatureHelper {
|
|
|
1885
2010
|
* Generated bundle index. Do not edit.
|
|
1886
2011
|
*/
|
|
1887
2012
|
|
|
1888
|
-
export { CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, Dictionary, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, MapClickEvent, MapLyrs, MapLyrsLabel, MapModule, MapMoveEndEvent, MapPlateComponent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonStyleHelper, PolygonsComponent, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings };
|
|
2013
|
+
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 };
|
|
1889
2014
|
//# sourceMappingURL=maps-components-src-map.js.map
|