@artstesh/maps 1.0.11 → 1.1.0
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 +148 -6
- package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
- package/dist/bundles/maps-components.umd.js +148 -6
- 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.module.js +8 -3
- package/dist/esm2015/map/messages/executors/generate-zoom-control.executor.js +12 -0
- package/dist/esm2015/map/public-api.js +2 -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.module.js +8 -3
- package/dist/esm2015/src/map/messages/executors/generate-zoom-control.executor.js +12 -0
- package/dist/esm2015/src/map/public-api.js +2 -1
- package/dist/esm2015/src/map/services/message-registrator.service.js +4 -1
- package/dist/fesm2015/maps-components-src-map.js +125 -3
- package/dist/fesm2015/maps-components-src-map.js.map +1 -1
- package/dist/fesm2015/maps-components.js +125 -3
- 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.module.d.ts +3 -2
- package/dist/map/messages/executors/generate-zoom-control.executor.d.ts +9 -0
- 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.module.d.ts +3 -2
- package/dist/src/map/messages/executors/generate-zoom-control.executor.d.ts +9 -0
- package/dist/src/map/public-api.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('ol'), require('ol/geom'), require('ol/format'), require('ol/extent'), require('ol/proj'), require('@artstesh/postboy'), require('ol/interaction'), require('ol/interaction/Draw'), require('rxjs/operators'), require('ol/source'), require('ol/layer/Tile'), require('ol/source/OSM'), require('ol/layer'), require('ol/loadingstrategy'), require('ol/geom/Polygon'), require('ol/source/Cluster'), require('rxjs'), require('ol/Map'), require('ol/View'), require('ol/Overlay'), require('ol/style/Style'), require('ol/style'), require('ol/proj/epsg4326')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('maps-components/src/map', ['exports', '@angular/core', '@angular/common', 'ol', 'ol/geom', 'ol/format', 'ol/extent', 'ol/proj', '@artstesh/postboy', 'ol/interaction', 'ol/interaction/Draw', 'rxjs/operators', 'ol/source', 'ol/layer/Tile', 'ol/source/OSM', 'ol/layer', 'ol/loadingstrategy', 'ol/geom/Polygon', 'ol/source/Cluster', 'rxjs', 'ol/Map', 'ol/View', 'ol/Overlay', 'ol/style/Style', 'ol/style', 'ol/proj/epsg4326'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["maps-components"] = global["maps-components"] || {}, global["maps-components"].src = global["maps-components"].src || {}, global["maps-components"].src.map = {}), global.ng.core, global.ng.common, global.ol, global.geom, global.format, global.extent, global.proj, global.postboy, global.interaction, global.Draw, global.rxjs.operators, global.source, global.TileLayer, global.OSM, global.layer, global.loadingstrategy, global.Polygon, global.Cluster, global.rxjs, global.Map, global.View, global.Overlay, global.Style, global.style, global.epsg4326));
|
|
5
|
-
})(this, (function (exports, i0, i6, ol, geom, format, extent, proj, postboy, interaction, Draw, operators, source, TileLayer, OSM, layer, loadingstrategy, Polygon, Cluster, rxjs, Map, View, Overlay, Style, style, epsg4326) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('ol'), require('ol/geom'), require('ol/format'), require('ol/extent'), require('ol/proj'), require('@artstesh/postboy'), require('ol/interaction'), require('ol/interaction/Draw'), require('ol/control'), require('rxjs/operators'), require('ol/source'), require('ol/layer/Tile'), require('ol/source/OSM'), require('ol/layer'), require('ol/loadingstrategy'), require('ol/geom/Polygon'), require('ol/source/Cluster'), require('rxjs'), require('ol/Map'), require('ol/View'), require('ol/Overlay'), require('ol/style/Style'), require('ol/style'), require('ol/proj/epsg4326')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('maps-components/src/map', ['exports', '@angular/core', '@angular/common', 'ol', 'ol/geom', 'ol/format', 'ol/extent', 'ol/proj', '@artstesh/postboy', 'ol/interaction', 'ol/interaction/Draw', 'ol/control', 'rxjs/operators', 'ol/source', 'ol/layer/Tile', 'ol/source/OSM', 'ol/layer', 'ol/loadingstrategy', 'ol/geom/Polygon', 'ol/source/Cluster', 'rxjs', 'ol/Map', 'ol/View', 'ol/Overlay', 'ol/style/Style', 'ol/style', 'ol/proj/epsg4326'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["maps-components"] = global["maps-components"] || {}, global["maps-components"].src = global["maps-components"].src || {}, global["maps-components"].src.map = {}), global.ng.core, global.ng.common, global.ol, global.geom, global.format, global.extent, global.proj, global.postboy, global.interaction, global.Draw, global.control, global.rxjs.operators, global.source, global.TileLayer, global.OSM, global.layer, global.loadingstrategy, global.Polygon, global.Cluster, global.rxjs, global.Map, global.View, global.Overlay, global.Style, global.style, global.epsg4326));
|
|
5
|
+
})(this, (function (exports, i0, i6, ol, geom, format, extent, proj, postboy, interaction, Draw, control, operators, source, TileLayer, OSM, layer, loadingstrategy, Polygon, Cluster, rxjs, Map, View, Overlay, Style, style, epsg4326) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -1166,6 +1166,39 @@
|
|
|
1166
1166
|
}(postboy.PostboyExecutor));
|
|
1167
1167
|
GenerateDrawExecutor.ID = 'f01c99ba-0953-4ab5-82f9-04e6fbb678c1';
|
|
1168
1168
|
|
|
1169
|
+
var GenerateZoomControlExecutor = /** @class */ (function (_super) {
|
|
1170
|
+
__extends(GenerateZoomControlExecutor, _super);
|
|
1171
|
+
function GenerateZoomControlExecutor(settings) {
|
|
1172
|
+
var _this = _super.call(this) || this;
|
|
1173
|
+
_this.settings = settings;
|
|
1174
|
+
return _this;
|
|
1175
|
+
}
|
|
1176
|
+
Object.defineProperty(GenerateZoomControlExecutor.prototype, "id", {
|
|
1177
|
+
get: function () {
|
|
1178
|
+
return GenerateZoomControlExecutor.ID;
|
|
1179
|
+
},
|
|
1180
|
+
enumerable: false,
|
|
1181
|
+
configurable: true
|
|
1182
|
+
});
|
|
1183
|
+
return GenerateZoomControlExecutor;
|
|
1184
|
+
}(postboy.PostboyExecutor));
|
|
1185
|
+
GenerateZoomControlExecutor.ID = 'ff16a833-c68e-4b1a-bc23-c0d16b002810';
|
|
1186
|
+
|
|
1187
|
+
var ZoomControlFactory = /** @class */ (function () {
|
|
1188
|
+
function ZoomControlFactory() {
|
|
1189
|
+
}
|
|
1190
|
+
ZoomControlFactory.build = function (settings) {
|
|
1191
|
+
return new control.Zoom({
|
|
1192
|
+
zoomInTipLabel: settings.zoomInLabel,
|
|
1193
|
+
zoomOutTipLabel: settings.zoomOutLabel,
|
|
1194
|
+
zoomInClassName: settings.zoomInClass,
|
|
1195
|
+
zoomOutClassName: settings.zoomOutClass,
|
|
1196
|
+
className: settings.controlClass,
|
|
1197
|
+
});
|
|
1198
|
+
};
|
|
1199
|
+
return ZoomControlFactory;
|
|
1200
|
+
}());
|
|
1201
|
+
|
|
1169
1202
|
var MapPostboyService = /** @class */ (function (_super) {
|
|
1170
1203
|
__extends(MapPostboyService, _super);
|
|
1171
1204
|
function MapPostboyService() {
|
|
@@ -1609,6 +1642,7 @@
|
|
|
1609
1642
|
MessageRegistratorService.prototype.setExecutors = function () {
|
|
1610
1643
|
this.registerExecutor(FilterFeaturesInAreaExecutor.ID, function (e) { return FeatureService.filterFeaturesInArea(e); });
|
|
1611
1644
|
this.registerExecutor(GenerateDrawExecutor.ID, function (e) { return DrawingGenerationService.getDraw(e); });
|
|
1645
|
+
this.registerExecutor(GenerateZoomControlExecutor.ID, function (e) { return ZoomControlFactory.build(e.settings); });
|
|
1612
1646
|
};
|
|
1613
1647
|
return MessageRegistratorService;
|
|
1614
1648
|
}(postboy.PostboyAbstractRegistrator));
|
|
@@ -2493,6 +2527,108 @@
|
|
|
2493
2527
|
type: i0.Input
|
|
2494
2528
|
}] } });
|
|
2495
2529
|
|
|
2530
|
+
var ZoomControlSettings = /** @class */ (function () {
|
|
2531
|
+
function ZoomControlSettings() {
|
|
2532
|
+
this.controlClass = 'ol-zoom';
|
|
2533
|
+
this.zoomInClass = 'ol-zoom-in';
|
|
2534
|
+
this.zoomOutClass = 'ol-zoom-out';
|
|
2535
|
+
this.zoomInLabel = 'Zoom In';
|
|
2536
|
+
this.zoomOutLabel = 'Zoom Out';
|
|
2537
|
+
}
|
|
2538
|
+
ZoomControlSettings.copy = function (model) {
|
|
2539
|
+
var result = new ZoomControlSettings();
|
|
2540
|
+
result.controlClass = model.controlClass;
|
|
2541
|
+
result.zoomInClass = model.zoomInClass;
|
|
2542
|
+
result.zoomOutClass = model.zoomOutClass;
|
|
2543
|
+
result.zoomInLabel = model.zoomInLabel;
|
|
2544
|
+
result.zoomOutLabel = model.zoomOutLabel;
|
|
2545
|
+
return result;
|
|
2546
|
+
};
|
|
2547
|
+
ZoomControlSettings.prototype.isSame = function (model) {
|
|
2548
|
+
if (this.zoomInClass !== model.zoomInClass)
|
|
2549
|
+
return false;
|
|
2550
|
+
if (this.zoomOutClass !== model.zoomOutClass)
|
|
2551
|
+
return false;
|
|
2552
|
+
if (this.zoomInLabel !== model.zoomInLabel)
|
|
2553
|
+
return false;
|
|
2554
|
+
if (this.controlClass !== model.controlClass)
|
|
2555
|
+
return false;
|
|
2556
|
+
if (this.zoomOutLabel !== model.zoomOutLabel)
|
|
2557
|
+
return false;
|
|
2558
|
+
return true;
|
|
2559
|
+
};
|
|
2560
|
+
ZoomControlSettings.prototype.setZoomInLabel = function (zoomInLabel) {
|
|
2561
|
+
return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomInLabel: zoomInLabel }));
|
|
2562
|
+
};
|
|
2563
|
+
ZoomControlSettings.prototype.setZoomOutClass = function (zoomOutClass) {
|
|
2564
|
+
return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomOutClass: zoomOutClass }));
|
|
2565
|
+
};
|
|
2566
|
+
ZoomControlSettings.prototype.setZoomInClass = function (zoomInClass) {
|
|
2567
|
+
return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomInClass: zoomInClass }));
|
|
2568
|
+
};
|
|
2569
|
+
ZoomControlSettings.prototype.setZoomOutLabel = function (zoomOutLabel) {
|
|
2570
|
+
return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { zoomOutLabel: zoomOutLabel }));
|
|
2571
|
+
};
|
|
2572
|
+
ZoomControlSettings.prototype.setControlClass = function (controlClass) {
|
|
2573
|
+
return ZoomControlSettings.copy(Object.assign(Object.assign({}, this), { controlClass: controlClass }));
|
|
2574
|
+
};
|
|
2575
|
+
return ZoomControlSettings;
|
|
2576
|
+
}());
|
|
2577
|
+
|
|
2578
|
+
var MapControlZoomComponent = /** @class */ (function (_super) {
|
|
2579
|
+
__extends(MapControlZoomComponent, _super);
|
|
2580
|
+
function MapControlZoomComponent(postboy) {
|
|
2581
|
+
var _this = _super.call(this) || this;
|
|
2582
|
+
_this.postboy = postboy;
|
|
2583
|
+
_this._settings = new ZoomControlSettings();
|
|
2584
|
+
_this.onDestroy = function () {
|
|
2585
|
+
_this.eliminate();
|
|
2586
|
+
};
|
|
2587
|
+
_this.eliminate = function () { return !!_this.map && !!_this.control && _this.map.removeControl(_this.control); };
|
|
2588
|
+
return _this;
|
|
2589
|
+
}
|
|
2590
|
+
Object.defineProperty(MapControlZoomComponent.prototype, "settings", {
|
|
2591
|
+
set: function (value) {
|
|
2592
|
+
if (!value || this._settings.isSame(value))
|
|
2593
|
+
return;
|
|
2594
|
+
this._settings = value;
|
|
2595
|
+
this.setControl();
|
|
2596
|
+
},
|
|
2597
|
+
enumerable: false,
|
|
2598
|
+
configurable: true
|
|
2599
|
+
});
|
|
2600
|
+
MapControlZoomComponent.prototype.ngOnInit = function () {
|
|
2601
|
+
var _this = this;
|
|
2602
|
+
this.postboy
|
|
2603
|
+
.subscribe(MapRenderedEvent.ID)
|
|
2604
|
+
.pipe(operators.filter(function (m) { return !!m; }), operators.first())
|
|
2605
|
+
.subscribe(function (m) {
|
|
2606
|
+
_this.map = m.map;
|
|
2607
|
+
_this.setControl();
|
|
2608
|
+
});
|
|
2609
|
+
};
|
|
2610
|
+
MapControlZoomComponent.prototype.setControl = function () {
|
|
2611
|
+
if (!this.map)
|
|
2612
|
+
return;
|
|
2613
|
+
this.control = this.postboy.execute(new GenerateZoomControlExecutor(this._settings));
|
|
2614
|
+
this.map.addControl(this.control);
|
|
2615
|
+
};
|
|
2616
|
+
return MapControlZoomComponent;
|
|
2617
|
+
}(DestructibleComponent));
|
|
2618
|
+
MapControlZoomComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapControlZoomComponent, deps: [{ token: MapPostboyService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2619
|
+
MapControlZoomComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MapControlZoomComponent, selector: "lib-map-control-zoom", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0__namespace, template: '', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2620
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapControlZoomComponent, decorators: [{
|
|
2621
|
+
type: i0.Component,
|
|
2622
|
+
args: [{
|
|
2623
|
+
selector: 'lib-map-control-zoom',
|
|
2624
|
+
template: '',
|
|
2625
|
+
styleUrls: [],
|
|
2626
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2627
|
+
}]
|
|
2628
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }]; }, propDecorators: { settings: [{
|
|
2629
|
+
type: i0.Input
|
|
2630
|
+
}] } });
|
|
2631
|
+
|
|
2496
2632
|
var MapModule = /** @class */ (function () {
|
|
2497
2633
|
function MapModule() {
|
|
2498
2634
|
}
|
|
@@ -2507,13 +2643,15 @@
|
|
|
2507
2643
|
MarkersComponent,
|
|
2508
2644
|
TooltipComponent,
|
|
2509
2645
|
PolygonsComponent,
|
|
2510
|
-
ClusterLayerComponent
|
|
2646
|
+
ClusterLayerComponent,
|
|
2647
|
+
MapControlZoomComponent], imports: [i6.CommonModule], exports: [MapPlateComponent,
|
|
2511
2648
|
FeatureLayerComponent,
|
|
2512
2649
|
MarkersComponent,
|
|
2513
2650
|
TileLayerComponent,
|
|
2514
2651
|
TooltipComponent,
|
|
2515
2652
|
PolygonsComponent,
|
|
2516
|
-
ClusterLayerComponent
|
|
2653
|
+
ClusterLayerComponent,
|
|
2654
|
+
MapControlZoomComponent] });
|
|
2517
2655
|
MapModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapModule, imports: [[i6.CommonModule]] });
|
|
2518
2656
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapModule, decorators: [{
|
|
2519
2657
|
type: i0.NgModule,
|
|
@@ -2529,6 +2667,7 @@
|
|
|
2529
2667
|
TooltipComponent,
|
|
2530
2668
|
PolygonsComponent,
|
|
2531
2669
|
ClusterLayerComponent,
|
|
2670
|
+
MapControlZoomComponent,
|
|
2532
2671
|
],
|
|
2533
2672
|
exports: [
|
|
2534
2673
|
MapPlateComponent,
|
|
@@ -2538,6 +2677,7 @@
|
|
|
2538
2677
|
TooltipComponent,
|
|
2539
2678
|
PolygonsComponent,
|
|
2540
2679
|
ClusterLayerComponent,
|
|
2680
|
+
MapControlZoomComponent,
|
|
2541
2681
|
],
|
|
2542
2682
|
}]
|
|
2543
2683
|
}] });
|
|
@@ -2699,6 +2839,7 @@
|
|
|
2699
2839
|
exports.FeatureLayerComponent = FeatureLayerComponent;
|
|
2700
2840
|
exports.FeatureLayerSettings = FeatureLayerSettings;
|
|
2701
2841
|
exports.MapClickEvent = MapClickEvent;
|
|
2842
|
+
exports.MapControlZoomComponent = MapControlZoomComponent;
|
|
2702
2843
|
exports.MapLyrsLabel = MapLyrsLabel;
|
|
2703
2844
|
exports.MapModule = MapModule;
|
|
2704
2845
|
exports.MapMoveEndEvent = MapMoveEndEvent;
|
|
@@ -2722,6 +2863,7 @@
|
|
|
2722
2863
|
exports.TileLayerSettings = TileLayerSettings;
|
|
2723
2864
|
exports.TooltipComponent = TooltipComponent;
|
|
2724
2865
|
exports.TooltipSettings = TooltipSettings;
|
|
2866
|
+
exports.ZoomControlSettings = ZoomControlSettings;
|
|
2725
2867
|
|
|
2726
2868
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2727
2869
|
|