@artstesh/maps 1.0.4 → 1.0.6
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 +259 -7
- package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
- package/dist/bundles/maps-components.umd.js +259 -7
- package/dist/bundles/maps-components.umd.js.map +1 -1
- package/dist/esm2015/map/helpers/index.js +2 -1
- package/dist/esm2015/map/helpers/polygon-style.helper.js +16 -0
- package/dist/esm2015/map/map-plate/features/index.js +2 -1
- package/dist/esm2015/map/map-plate/features/polygons/polygons.component.js +47 -0
- package/dist/esm2015/map/map-plate/layers/feature-layer/feature-layer.component.js +1 -1
- package/dist/esm2015/map/map-plate/tooltips/index.js +3 -0
- package/dist/esm2015/map/map-plate/tooltips/tooltip/tooltip.component.js +84 -0
- package/dist/esm2015/map/map-plate/tooltips/tooltip/tooltip.settings.js +30 -0
- package/dist/esm2015/map/map.module.js +21 -3
- package/dist/esm2015/map/messages/commands/close-tooltip.command.js +12 -0
- package/dist/esm2015/map/messages/index.js +2 -1
- package/dist/esm2015/map/models/index.js +2 -1
- package/dist/esm2015/map/models/polygon.model.js +26 -0
- package/dist/esm2015/map/public-api.js +2 -1
- package/dist/esm2015/map/services/map-click.service.js +2 -2
- package/dist/esm2015/map/services/message-registrator.service.js +3 -1
- package/dist/esm2015/src/map/helpers/index.js +2 -1
- package/dist/esm2015/src/map/helpers/polygon-style.helper.js +16 -0
- package/dist/esm2015/src/map/map-plate/features/index.js +2 -1
- package/dist/esm2015/src/map/map-plate/features/polygons/polygons.component.js +47 -0
- package/dist/esm2015/src/map/map-plate/layers/feature-layer/feature-layer.component.js +1 -1
- package/dist/esm2015/src/map/map-plate/tooltips/index.js +3 -0
- package/dist/esm2015/src/map/map-plate/tooltips/tooltip/tooltip.component.js +84 -0
- package/dist/esm2015/src/map/map-plate/tooltips/tooltip/tooltip.settings.js +30 -0
- package/dist/esm2015/src/map/map.module.js +21 -3
- package/dist/esm2015/src/map/messages/commands/close-tooltip.command.js +12 -0
- package/dist/esm2015/src/map/messages/index.js +2 -1
- package/dist/esm2015/src/map/models/index.js +2 -1
- package/dist/esm2015/src/map/models/polygon.model.js +26 -0
- package/dist/esm2015/src/map/public-api.js +2 -1
- package/dist/esm2015/src/map/services/map-click.service.js +2 -2
- package/dist/esm2015/src/map/services/message-registrator.service.js +3 -1
- package/dist/fesm2015/maps-components-src-map.js +217 -5
- package/dist/fesm2015/maps-components-src-map.js.map +1 -1
- package/dist/fesm2015/maps-components.js +217 -5
- package/dist/fesm2015/maps-components.js.map +1 -1
- package/dist/map/helpers/index.d.ts +1 -0
- package/dist/map/helpers/polygon-style.helper.d.ts +4 -0
- package/dist/map/map-plate/features/index.d.ts +1 -0
- package/dist/map/map-plate/features/polygons/polygons.component.d.ts +16 -0
- package/dist/map/map-plate/layers/feature-layer/feature-layer.component.d.ts +1 -1
- package/dist/map/map-plate/tooltips/index.d.ts +2 -0
- package/dist/map/map-plate/tooltips/tooltip/tooltip.component.d.ts +26 -0
- package/dist/map/map-plate/tooltips/tooltip/tooltip.settings.d.ts +11 -0
- package/dist/map/map.module.d.ts +4 -2
- package/dist/map/messages/commands/close-tooltip.command.d.ts +7 -0
- package/dist/map/messages/index.d.ts +1 -0
- package/dist/map/models/index.d.ts +1 -0
- package/dist/map/models/polygon.model.d.ts +19 -0
- package/dist/map/public-api.d.ts +1 -0
- package/dist/src/map/helpers/index.d.ts +1 -0
- package/dist/src/map/helpers/polygon-style.helper.d.ts +4 -0
- package/dist/src/map/map-plate/features/index.d.ts +1 -0
- package/dist/src/map/map-plate/features/polygons/polygons.component.d.ts +16 -0
- package/dist/src/map/map-plate/layers/feature-layer/feature-layer.component.d.ts +1 -1
- package/dist/src/map/map-plate/tooltips/index.d.ts +2 -0
- package/dist/src/map/map-plate/tooltips/tooltip/tooltip.component.d.ts +26 -0
- package/dist/src/map/map-plate/tooltips/tooltip/tooltip.settings.d.ts +11 -0
- package/dist/src/map/map.module.d.ts +4 -2
- package/dist/src/map/messages/commands/close-tooltip.command.d.ts +7 -0
- package/dist/src/map/messages/index.d.ts +1 -0
- package/dist/src/map/models/index.d.ts +1 -0
- package/dist/src/map/models/polygon.model.d.ts +19 -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/proj'), require('rxjs'), require('@artstesh/postboy'), require('ol/Map'), require('ol/View'), require('ol/layer/Tile'), require('ol/source/OSM'), require('rxjs/operators'), require('ol/source'), require('ol/layer'), require('ol/style/Style'), require('ol/style')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('maps-components', ['exports', '@angular/core', '@angular/common', 'ol', 'ol/geom', 'ol/proj', 'rxjs', '@artstesh/postboy', 'ol/Map', 'ol/View', 'ol/layer/Tile', 'ol/source/OSM', 'rxjs/operators', 'ol/source', 'ol/layer', 'ol/style/Style', 'ol/style'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["maps-components"] = {}, global.ng.core, global.ng.common, global.ol, global.geom, global.proj, global.rxjs, global.postboy, global.Map, global.View, global.TileLayer, global.OSM, global.rxjs.operators, global.source, global.layer, global.Style, global.style));
|
|
5
|
-
})(this, (function (exports, i0, i5, ol, geom, proj, rxjs, postboy, Map, View, TileLayer, OSM, operators, source, layer, Style, style) { '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('rxjs'), require('@artstesh/postboy'), require('ol/Map'), require('ol/View'), require('ol/layer/Tile'), require('ol/source/OSM'), require('rxjs/operators'), require('ol/source'), require('ol/layer'), require('ol/Overlay'), require('ol/style/Style'), require('ol/style')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('maps-components', ['exports', '@angular/core', '@angular/common', 'ol', 'ol/geom', 'ol/format', 'ol/extent', 'ol/proj', 'rxjs', '@artstesh/postboy', 'ol/Map', 'ol/View', 'ol/layer/Tile', 'ol/source/OSM', 'rxjs/operators', 'ol/source', 'ol/layer', 'ol/Overlay', 'ol/style/Style', 'ol/style'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["maps-components"] = {}, global.ng.core, global.ng.common, global.ol, global.geom, global.format, global.extent, global.proj, global.rxjs, global.postboy, global.Map, global.View, global.TileLayer, global.OSM, global.rxjs.operators, global.source, global.layer, global.Overlay, global.Style, global.style));
|
|
5
|
+
})(this, (function (exports, i0, i5, ol, geom, format, extent, proj, rxjs, postboy, Map, View, TileLayer, OSM, operators, source, layer, Overlay, Style, style) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
var View__default = /*#__PURE__*/_interopDefaultLegacy(View);
|
|
31
31
|
var TileLayer__default = /*#__PURE__*/_interopDefaultLegacy(TileLayer);
|
|
32
32
|
var OSM__default = /*#__PURE__*/_interopDefaultLegacy(OSM);
|
|
33
|
+
var Overlay__default = /*#__PURE__*/_interopDefaultLegacy(Overlay);
|
|
33
34
|
var Style__default = /*#__PURE__*/_interopDefaultLegacy(Style);
|
|
34
35
|
|
|
35
36
|
var DestructibleComponent = /** @class */ (function () {
|
|
@@ -632,6 +633,35 @@
|
|
|
632
633
|
return MarkerModel;
|
|
633
634
|
}());
|
|
634
635
|
|
|
636
|
+
var PolygonModel = /** @class */ (function () {
|
|
637
|
+
function PolygonModel(feature, id, info) {
|
|
638
|
+
var _b;
|
|
639
|
+
var _a;
|
|
640
|
+
this.info = info;
|
|
641
|
+
this.id = id == null ? IdGenerator.get() : id;
|
|
642
|
+
this._feature = feature;
|
|
643
|
+
_b = __read(extent.getCenter((_a = this._feature.getGeometry()) === null || _a === void 0 ? void 0 : _a.getExtent()), 2), this.lng = _b[0], this.lat = _b[1];
|
|
644
|
+
}
|
|
645
|
+
PolygonModel.fromGeoJson = function (id, json, info) {
|
|
646
|
+
var feature = new format.GeoJSON().readFeature(json);
|
|
647
|
+
feature.setId(id);
|
|
648
|
+
return new PolygonModel(feature, id, info);
|
|
649
|
+
};
|
|
650
|
+
PolygonModel.fromWKT = function (id, wkt, info) {
|
|
651
|
+
var feature = new format.WKT().readFeature(wkt);
|
|
652
|
+
feature.setId(id);
|
|
653
|
+
return new PolygonModel(feature, id, info);
|
|
654
|
+
};
|
|
655
|
+
Object.defineProperty(PolygonModel.prototype, "feature", {
|
|
656
|
+
get: function () {
|
|
657
|
+
return this._feature;
|
|
658
|
+
},
|
|
659
|
+
enumerable: false,
|
|
660
|
+
configurable: true
|
|
661
|
+
});
|
|
662
|
+
return PolygonModel;
|
|
663
|
+
}());
|
|
664
|
+
|
|
635
665
|
var GenericMessage = /** @class */ (function () {
|
|
636
666
|
function GenericMessage() {
|
|
637
667
|
}
|
|
@@ -689,6 +719,24 @@
|
|
|
689
719
|
}(GenericMessage));
|
|
690
720
|
MapClickEvent.ID = '323df526-8d9c-49c6-83e8-6e9a1e7762f7';
|
|
691
721
|
|
|
722
|
+
var CloseTooltipCommand = /** @class */ (function (_super) {
|
|
723
|
+
__extends(CloseTooltipCommand, _super);
|
|
724
|
+
function CloseTooltipCommand(tooltipId) {
|
|
725
|
+
var _this = _super.call(this) || this;
|
|
726
|
+
_this.tooltipId = tooltipId;
|
|
727
|
+
return _this;
|
|
728
|
+
}
|
|
729
|
+
Object.defineProperty(CloseTooltipCommand.prototype, "id", {
|
|
730
|
+
get: function () {
|
|
731
|
+
return CloseTooltipCommand.ID;
|
|
732
|
+
},
|
|
733
|
+
enumerable: false,
|
|
734
|
+
configurable: true
|
|
735
|
+
});
|
|
736
|
+
return CloseTooltipCommand;
|
|
737
|
+
}(GenericMessage));
|
|
738
|
+
CloseTooltipCommand.ID = '4896d52c-e34f-4994-bcfd-32832d12dbe4';
|
|
739
|
+
|
|
692
740
|
var AddLayerCommand = /** @class */ (function (_super) {
|
|
693
741
|
__extends(AddLayerCommand, _super);
|
|
694
742
|
function AddLayerCommand(layer) {
|
|
@@ -905,7 +953,7 @@
|
|
|
905
953
|
var model = new MapClickEvent(ev.coordinate, {});
|
|
906
954
|
(_a = this.map) === null || _a === void 0 ? void 0 : _a.forEachFeatureAtPixel(ev.pixel, function (f, l) {
|
|
907
955
|
_this.getFeatureCollectionWithInner([f])
|
|
908
|
-
.filter(function (f) { return
|
|
956
|
+
.filter(function (f) { return f.getId() != null; })
|
|
909
957
|
.forEach(function (fs) {
|
|
910
958
|
var layerName = l.get('name');
|
|
911
959
|
if (!model.entities[layerName])
|
|
@@ -946,6 +994,7 @@
|
|
|
946
994
|
this.registerSubject(AddTileCommand.ID);
|
|
947
995
|
this.registerSubject(RemoveTileCommand.ID);
|
|
948
996
|
this.registerSubject(MapClickEvent.ID);
|
|
997
|
+
this.registerSubject(CloseTooltipCommand.ID);
|
|
949
998
|
};
|
|
950
999
|
return MessageRegistratorService;
|
|
951
1000
|
}(postboy.PostboyAbstractRegistrator));
|
|
@@ -1435,6 +1484,169 @@
|
|
|
1435
1484
|
type: i0.Input
|
|
1436
1485
|
}] } });
|
|
1437
1486
|
|
|
1487
|
+
var TooltipSettings = /** @class */ (function () {
|
|
1488
|
+
function TooltipSettings(id) {
|
|
1489
|
+
this.containerClass = 'custom-tooltip-class';
|
|
1490
|
+
this.show = function (e) { return true; };
|
|
1491
|
+
this.id = id !== null && id !== void 0 ? id : IdGenerator.get();
|
|
1492
|
+
}
|
|
1493
|
+
TooltipSettings.copy = function (model) {
|
|
1494
|
+
var result = new TooltipSettings(model.id);
|
|
1495
|
+
result.show = model.show;
|
|
1496
|
+
result.containerClass = model.containerClass;
|
|
1497
|
+
return result;
|
|
1498
|
+
};
|
|
1499
|
+
TooltipSettings.prototype.setShow = function (show) {
|
|
1500
|
+
return TooltipSettings.copy(Object.assign(Object.assign({}, this), { show: show }));
|
|
1501
|
+
};
|
|
1502
|
+
TooltipSettings.prototype.setClass = function (containerClass) {
|
|
1503
|
+
return TooltipSettings.copy(Object.assign(Object.assign({}, this), { containerClass: containerClass }));
|
|
1504
|
+
};
|
|
1505
|
+
TooltipSettings.prototype.isSame = function (model) {
|
|
1506
|
+
if (this.show !== model.show)
|
|
1507
|
+
return false;
|
|
1508
|
+
if (this.containerClass !== model.containerClass)
|
|
1509
|
+
return false;
|
|
1510
|
+
if (this.id !== model.id)
|
|
1511
|
+
return false;
|
|
1512
|
+
return true;
|
|
1513
|
+
};
|
|
1514
|
+
return TooltipSettings;
|
|
1515
|
+
}());
|
|
1516
|
+
|
|
1517
|
+
var TooltipComponent = /** @class */ (function (_super) {
|
|
1518
|
+
__extends(TooltipComponent, _super);
|
|
1519
|
+
function TooltipComponent(postboy, detector) {
|
|
1520
|
+
var _this = _super.call(this) || this;
|
|
1521
|
+
_this.postboy = postboy;
|
|
1522
|
+
_this.detector = detector;
|
|
1523
|
+
_this._settings = new TooltipSettings();
|
|
1524
|
+
_this.show = false;
|
|
1525
|
+
_this.removeOverlay = function () {
|
|
1526
|
+
var _a;
|
|
1527
|
+
!!_this.overlay && ((_a = _this.map) === null || _a === void 0 ? void 0 : _a.removeOverlay(_this.overlay));
|
|
1528
|
+
_this.show = false;
|
|
1529
|
+
};
|
|
1530
|
+
_this.options = function (coordinates) {
|
|
1531
|
+
var _a;
|
|
1532
|
+
return {
|
|
1533
|
+
element: (_a = _this.container) === null || _a === void 0 ? void 0 : _a.nativeElement,
|
|
1534
|
+
autoPan: false,
|
|
1535
|
+
autoPanAnimation: { duration: 0 },
|
|
1536
|
+
position: coordinates,
|
|
1537
|
+
};
|
|
1538
|
+
};
|
|
1539
|
+
return _this;
|
|
1540
|
+
}
|
|
1541
|
+
Object.defineProperty(TooltipComponent.prototype, "settings", {
|
|
1542
|
+
set: function (value) {
|
|
1543
|
+
if (!value || this._settings.isSame(value))
|
|
1544
|
+
return;
|
|
1545
|
+
this._settings = value;
|
|
1546
|
+
this.detector.detectChanges();
|
|
1547
|
+
},
|
|
1548
|
+
enumerable: false,
|
|
1549
|
+
configurable: true
|
|
1550
|
+
});
|
|
1551
|
+
TooltipComponent.prototype.ngOnInit = function () {
|
|
1552
|
+
this.subs.push(this.observeMapRender());
|
|
1553
|
+
this.subs.push(this.observeMapClick());
|
|
1554
|
+
this.subs.push(this.observeClose());
|
|
1555
|
+
};
|
|
1556
|
+
TooltipComponent.prototype.observeMapClick = function () {
|
|
1557
|
+
var _this = this;
|
|
1558
|
+
return this.postboy.subscribe(MapClickEvent.ID).subscribe(function (ev) {
|
|
1559
|
+
_this._settings.show(ev) ? _this.addOverlay(ev.coordinates) : _this.removeOverlay();
|
|
1560
|
+
});
|
|
1561
|
+
};
|
|
1562
|
+
TooltipComponent.prototype.observeClose = function () {
|
|
1563
|
+
var _this = this;
|
|
1564
|
+
return this.postboy
|
|
1565
|
+
.subscribe(CloseTooltipCommand.ID)
|
|
1566
|
+
.pipe(operators.filter(function (ev) { return ev.tooltipId === _this._settings.id; }))
|
|
1567
|
+
.subscribe(function () { return _this.removeOverlay(); });
|
|
1568
|
+
};
|
|
1569
|
+
TooltipComponent.prototype.observeMapRender = function () {
|
|
1570
|
+
var _this = this;
|
|
1571
|
+
return this.postboy.subscribe(MapRenderedEvent.ID).subscribe(function (m) {
|
|
1572
|
+
_this.map = m.map;
|
|
1573
|
+
});
|
|
1574
|
+
};
|
|
1575
|
+
TooltipComponent.prototype.addOverlay = function (coordinates) {
|
|
1576
|
+
var _a;
|
|
1577
|
+
this.removeOverlay();
|
|
1578
|
+
this.overlay = new Overlay__default["default"](this.options(coordinates));
|
|
1579
|
+
(_a = this.map) === null || _a === void 0 ? void 0 : _a.addOverlay(this.overlay);
|
|
1580
|
+
this.show = true;
|
|
1581
|
+
this.detector.detectChanges();
|
|
1582
|
+
};
|
|
1583
|
+
return TooltipComponent;
|
|
1584
|
+
}(DestructibleComponent));
|
|
1585
|
+
TooltipComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TooltipComponent, deps: [{ token: MapPostboyService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1586
|
+
TooltipComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TooltipComponent, selector: "lib-tooltip", inputs: { settings: "settings" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["tip"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, 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__namespace.ChangeDetectionStrategy.OnPush });
|
|
1587
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TooltipComponent, decorators: [{
|
|
1588
|
+
type: i0.Component,
|
|
1589
|
+
args: [{
|
|
1590
|
+
selector: 'lib-tooltip',
|
|
1591
|
+
templateUrl: './tooltip.component.html',
|
|
1592
|
+
styleUrls: ['./tooltip.component.scss'],
|
|
1593
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1594
|
+
}]
|
|
1595
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { container: [{
|
|
1596
|
+
type: i0.ViewChild,
|
|
1597
|
+
args: ['tip']
|
|
1598
|
+
}], settings: [{
|
|
1599
|
+
type: i0.Input
|
|
1600
|
+
}] } });
|
|
1601
|
+
|
|
1602
|
+
var PolygonsComponent = /** @class */ (function (_super) {
|
|
1603
|
+
__extends(PolygonsComponent, _super);
|
|
1604
|
+
function PolygonsComponent(postboy) {
|
|
1605
|
+
var _this = _super.call(this) || this;
|
|
1606
|
+
_this.postboy = postboy;
|
|
1607
|
+
_this.layerName = '';
|
|
1608
|
+
_this._polygons = [];
|
|
1609
|
+
return _this;
|
|
1610
|
+
}
|
|
1611
|
+
Object.defineProperty(PolygonsComponent.prototype, "polygons", {
|
|
1612
|
+
set: function (value) {
|
|
1613
|
+
this._polygons = value;
|
|
1614
|
+
this.putPolygons();
|
|
1615
|
+
},
|
|
1616
|
+
enumerable: false,
|
|
1617
|
+
configurable: true
|
|
1618
|
+
});
|
|
1619
|
+
PolygonsComponent.prototype.ngOnInit = function () {
|
|
1620
|
+
var _this = this;
|
|
1621
|
+
this.postboy
|
|
1622
|
+
.subscribe(MapRenderedEvent.ID)
|
|
1623
|
+
.pipe(operators.filter(function (m) { return !!m; }), operators.first())
|
|
1624
|
+
.subscribe(function () { return _this.putPolygons(); });
|
|
1625
|
+
};
|
|
1626
|
+
PolygonsComponent.prototype.putPolygons = function () {
|
|
1627
|
+
var _a;
|
|
1628
|
+
if (!((_a = this._polygons) === null || _a === void 0 ? void 0 : _a.length))
|
|
1629
|
+
return;
|
|
1630
|
+
this.postboy.fire(new PlaceLayerFeaturesCommand(this.layerName, this._polygons.map(function (m) { return m.feature; })));
|
|
1631
|
+
};
|
|
1632
|
+
return PolygonsComponent;
|
|
1633
|
+
}(DestructibleComponent));
|
|
1634
|
+
PolygonsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PolygonsComponent, deps: [{ token: MapPostboyService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1635
|
+
PolygonsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PolygonsComponent, selector: "lib-polygons", inputs: { layerName: "layerName", polygons: "polygons" }, usesInheritance: true, ngImport: i0__namespace, template: '', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1636
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PolygonsComponent, decorators: [{
|
|
1637
|
+
type: i0.Component,
|
|
1638
|
+
args: [{
|
|
1639
|
+
selector: 'lib-polygons',
|
|
1640
|
+
template: '',
|
|
1641
|
+
styleUrls: [],
|
|
1642
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1643
|
+
}]
|
|
1644
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }]; }, propDecorators: { layerName: [{
|
|
1645
|
+
type: i0.Input
|
|
1646
|
+
}], polygons: [{
|
|
1647
|
+
type: i0.Input
|
|
1648
|
+
}] } });
|
|
1649
|
+
|
|
1438
1650
|
var MapModule = /** @class */ (function () {
|
|
1439
1651
|
function MapModule() {
|
|
1440
1652
|
}
|
|
@@ -1446,7 +1658,14 @@
|
|
|
1446
1658
|
TileLayerComponent,
|
|
1447
1659
|
OsmTileLayerComponent,
|
|
1448
1660
|
FeatureLayerComponent,
|
|
1449
|
-
MarkersComponent
|
|
1661
|
+
MarkersComponent,
|
|
1662
|
+
TooltipComponent,
|
|
1663
|
+
PolygonsComponent], imports: [i5.CommonModule], exports: [MapPlateComponent,
|
|
1664
|
+
FeatureLayerComponent,
|
|
1665
|
+
MarkersComponent,
|
|
1666
|
+
TileLayerComponent,
|
|
1667
|
+
TooltipComponent,
|
|
1668
|
+
PolygonsComponent] });
|
|
1450
1669
|
MapModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapModule, imports: [[i5.CommonModule]] });
|
|
1451
1670
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapModule, decorators: [{
|
|
1452
1671
|
type: i0.NgModule,
|
|
@@ -1459,8 +1678,17 @@
|
|
|
1459
1678
|
OsmTileLayerComponent,
|
|
1460
1679
|
FeatureLayerComponent,
|
|
1461
1680
|
MarkersComponent,
|
|
1681
|
+
TooltipComponent,
|
|
1682
|
+
PolygonsComponent,
|
|
1683
|
+
],
|
|
1684
|
+
exports: [
|
|
1685
|
+
MapPlateComponent,
|
|
1686
|
+
FeatureLayerComponent,
|
|
1687
|
+
MarkersComponent,
|
|
1688
|
+
TileLayerComponent,
|
|
1689
|
+
TooltipComponent,
|
|
1690
|
+
PolygonsComponent,
|
|
1462
1691
|
],
|
|
1463
|
-
exports: [MapPlateComponent, FeatureLayerComponent, MarkersComponent, TileLayerComponent],
|
|
1464
1692
|
}]
|
|
1465
1693
|
}] });
|
|
1466
1694
|
|
|
@@ -1493,6 +1721,24 @@
|
|
|
1493
1721
|
return MarkerStyleHelper;
|
|
1494
1722
|
}());
|
|
1495
1723
|
|
|
1724
|
+
var PolygonStyleHelper = /** @class */ (function () {
|
|
1725
|
+
function PolygonStyleHelper() {
|
|
1726
|
+
}
|
|
1727
|
+
PolygonStyleHelper.simple = function (fill, stroke, strokeWidth) {
|
|
1728
|
+
if (strokeWidth === void 0) { strokeWidth = 1; }
|
|
1729
|
+
return new Style__default["default"]({
|
|
1730
|
+
fill: new style.Fill({
|
|
1731
|
+
color: fill,
|
|
1732
|
+
}),
|
|
1733
|
+
stroke: new style.Stroke({
|
|
1734
|
+
color: stroke,
|
|
1735
|
+
width: strokeWidth,
|
|
1736
|
+
}),
|
|
1737
|
+
});
|
|
1738
|
+
};
|
|
1739
|
+
return PolygonStyleHelper;
|
|
1740
|
+
}());
|
|
1741
|
+
|
|
1496
1742
|
/*
|
|
1497
1743
|
* Public API Surface of maps
|
|
1498
1744
|
*/
|
|
@@ -1506,6 +1752,7 @@
|
|
|
1506
1752
|
*/
|
|
1507
1753
|
|
|
1508
1754
|
exports.CallbackMessage = CallbackMessage;
|
|
1755
|
+
exports.CloseTooltipCommand = CloseTooltipCommand;
|
|
1509
1756
|
exports.FeatureLayerComponent = FeatureLayerComponent;
|
|
1510
1757
|
exports.FeatureLayerSettings = FeatureLayerSettings;
|
|
1511
1758
|
exports.GenericMessage = GenericMessage;
|
|
@@ -1521,8 +1768,13 @@
|
|
|
1521
1768
|
exports.MarkersComponent = MarkersComponent;
|
|
1522
1769
|
exports.MessageRegistratorService = MessageRegistratorService;
|
|
1523
1770
|
exports.OsmTileLayerComponent = OsmTileLayerComponent;
|
|
1771
|
+
exports.PolygonModel = PolygonModel;
|
|
1772
|
+
exports.PolygonStyleHelper = PolygonStyleHelper;
|
|
1773
|
+
exports.PolygonsComponent = PolygonsComponent;
|
|
1524
1774
|
exports.TileLayerComponent = TileLayerComponent;
|
|
1525
1775
|
exports.TileLayerSettings = TileLayerSettings;
|
|
1776
|
+
exports.TooltipComponent = TooltipComponent;
|
|
1777
|
+
exports.TooltipSettings = TooltipSettings;
|
|
1526
1778
|
|
|
1527
1779
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1528
1780
|
|