@artstesh/maps 1.0.5 → 1.0.7
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 +418 -19
- package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
- package/dist/bundles/maps-components.umd.js +418 -19
- package/dist/bundles/maps-components.umd.js.map +1 -1
- package/dist/esm2015/map/helpers/index.js +3 -1
- package/dist/esm2015/map/helpers/marker-style.helper.js +5 -1
- package/dist/esm2015/map/helpers/polygon-style.helper.js +16 -0
- package/dist/esm2015/map/helpers/text-style.helper.js +14 -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/cluster-layer/cluster-layer-factory.service.js +60 -0
- package/dist/esm2015/map/map-plate/layers/cluster-layer/cluster-layer.component.js +56 -0
- package/dist/esm2015/map/map-plate/layers/cluster-layer/cluster-layer.manager.js +19 -0
- package/dist/esm2015/map/map-plate/layers/cluster-layer/cluster-layer.settings.js +61 -0
- package/dist/esm2015/map/map-plate/layers/index.js +3 -1
- package/dist/esm2015/map/map-plate/map-plate.component.js +4 -3
- package/dist/esm2015/map/map.module.js +23 -3
- package/dist/esm2015/map/messages/commands/add-layer.command.js +1 -1
- package/dist/esm2015/map/messages/commands/fit-to-features.command.js +13 -0
- package/dist/esm2015/map/messages/events/map-click.event.js +3 -2
- package/dist/esm2015/map/models/i-identified.js +2 -0
- package/dist/esm2015/map/models/index.js +2 -1
- package/dist/esm2015/map/models/map.constants.js +4 -0
- package/dist/esm2015/map/models/marker-model.js +3 -2
- package/dist/esm2015/map/models/polygon.model.js +26 -0
- package/dist/esm2015/map/services/map-click.service.js +7 -3
- package/dist/esm2015/map/services/map-feature.service.js +39 -0
- package/dist/esm2015/map/services/map-management.service.js +7 -4
- package/dist/esm2015/map/services/message-registrator.service.js +9 -6
- package/dist/esm2015/src/map/helpers/index.js +3 -1
- package/dist/esm2015/src/map/helpers/marker-style.helper.js +5 -1
- package/dist/esm2015/src/map/helpers/polygon-style.helper.js +16 -0
- package/dist/esm2015/src/map/helpers/text-style.helper.js +14 -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/cluster-layer/cluster-layer-factory.service.js +60 -0
- package/dist/esm2015/src/map/map-plate/layers/cluster-layer/cluster-layer.component.js +56 -0
- package/dist/esm2015/src/map/map-plate/layers/cluster-layer/cluster-layer.manager.js +19 -0
- package/dist/esm2015/src/map/map-plate/layers/cluster-layer/cluster-layer.settings.js +61 -0
- package/dist/esm2015/src/map/map-plate/layers/index.js +3 -1
- package/dist/esm2015/src/map/map-plate/map-plate.component.js +4 -3
- package/dist/esm2015/src/map/map.module.js +23 -3
- package/dist/esm2015/src/map/messages/commands/add-layer.command.js +1 -1
- package/dist/esm2015/src/map/messages/commands/fit-to-features.command.js +13 -0
- package/dist/esm2015/src/map/messages/events/map-click.event.js +3 -2
- package/dist/esm2015/src/map/models/i-identified.js +2 -0
- package/dist/esm2015/src/map/models/index.js +2 -1
- package/dist/esm2015/src/map/models/map.constants.js +4 -0
- package/dist/esm2015/src/map/models/marker-model.js +3 -2
- package/dist/esm2015/src/map/models/polygon.model.js +26 -0
- package/dist/esm2015/src/map/services/map-click.service.js +7 -3
- package/dist/esm2015/src/map/services/map-feature.service.js +39 -0
- package/dist/esm2015/src/map/services/map-management.service.js +7 -4
- package/dist/esm2015/src/map/services/message-registrator.service.js +9 -6
- package/dist/fesm2015/maps-components-src-map.js +365 -17
- package/dist/fesm2015/maps-components-src-map.js.map +1 -1
- package/dist/fesm2015/maps-components.js +365 -17
- package/dist/fesm2015/maps-components.js.map +1 -1
- package/dist/map/helpers/index.d.ts +2 -0
- package/dist/map/helpers/marker-style.helper.d.ts +2 -0
- package/dist/map/helpers/polygon-style.helper.d.ts +4 -0
- package/dist/map/helpers/text-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/cluster-layer/cluster-layer-factory.service.d.ts +11 -0
- package/dist/map/map-plate/layers/cluster-layer/cluster-layer.component.d.ts +21 -0
- package/dist/map/map-plate/layers/cluster-layer/cluster-layer.manager.d.ts +11 -0
- package/dist/map/map-plate/layers/cluster-layer/cluster-layer.settings.d.ts +20 -0
- package/dist/map/map-plate/layers/index.d.ts +2 -0
- package/dist/map/map.module.d.ts +4 -2
- package/dist/map/messages/commands/add-layer.command.d.ts +3 -2
- package/dist/map/messages/commands/fit-to-features.command.d.ts +10 -0
- package/dist/map/messages/events/map-click.event.d.ts +10 -2
- package/dist/map/models/i-identified.d.ts +3 -0
- package/dist/map/models/index.d.ts +1 -0
- package/dist/map/models/map.constants.d.ts +3 -0
- package/dist/map/models/polygon.model.d.ts +19 -0
- package/dist/map/services/map-feature.service.d.ts +14 -0
- package/dist/map/services/message-registrator.service.d.ts +2 -1
- package/dist/src/map/helpers/index.d.ts +2 -0
- package/dist/src/map/helpers/marker-style.helper.d.ts +2 -0
- package/dist/src/map/helpers/polygon-style.helper.d.ts +4 -0
- package/dist/src/map/helpers/text-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/cluster-layer/cluster-layer-factory.service.d.ts +11 -0
- package/dist/src/map/map-plate/layers/cluster-layer/cluster-layer.component.d.ts +21 -0
- package/dist/src/map/map-plate/layers/cluster-layer/cluster-layer.manager.d.ts +11 -0
- package/dist/src/map/map-plate/layers/cluster-layer/cluster-layer.settings.d.ts +20 -0
- package/dist/src/map/map-plate/layers/index.d.ts +2 -0
- package/dist/src/map/map.module.d.ts +4 -2
- package/dist/src/map/messages/commands/add-layer.command.d.ts +3 -2
- package/dist/src/map/messages/commands/fit-to-features.command.d.ts +10 -0
- package/dist/src/map/messages/events/map-click.event.d.ts +10 -2
- package/dist/src/map/models/i-identified.d.ts +3 -0
- package/dist/src/map/models/index.d.ts +1 -0
- package/dist/src/map/models/map.constants.d.ts +3 -0
- package/dist/src/map/models/polygon.model.d.ts +19 -0
- package/dist/src/map/services/map-feature.service.d.ts +14 -0
- package/dist/src/map/services/message-registrator.service.d.ts +2 -1
- 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/Overlay'), require('ol/style/Style'), require('ol/style')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('maps-components/src/map', ['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/Overlay', 'ol/style/Style', 'ol/style'], 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.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, proj, rxjs, postboy, Map, View, TileLayer, OSM, operators, source, layer, Overlay, 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/loadingstrategy'), require('ol/geom/Polygon'), require('ol/source/Cluster'), require('ol/style/Style'), require('ol/style')) :
|
|
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', 'rxjs', '@artstesh/postboy', 'ol/Map', 'ol/View', 'ol/layer/Tile', 'ol/source/OSM', 'rxjs/operators', 'ol/source', 'ol/layer', 'ol/Overlay', 'ol/loadingstrategy', 'ol/geom/Polygon', 'ol/source/Cluster', 'ol/style/Style', 'ol/style'], 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.rxjs, global.postboy, global.Map, global.View, global.TileLayer, global.OSM, global.rxjs.operators, global.source, global.layer, global.Overlay, global.loadingstrategy, global.Polygon, global.Cluster, 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, loadingstrategy, Polygon, Cluster, Style, style) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
var TileLayer__default = /*#__PURE__*/_interopDefaultLegacy(TileLayer);
|
|
32
32
|
var OSM__default = /*#__PURE__*/_interopDefaultLegacy(OSM);
|
|
33
33
|
var Overlay__default = /*#__PURE__*/_interopDefaultLegacy(Overlay);
|
|
34
|
+
var Cluster__default = /*#__PURE__*/_interopDefaultLegacy(Cluster);
|
|
34
35
|
var Style__default = /*#__PURE__*/_interopDefaultLegacy(Style);
|
|
35
36
|
|
|
36
37
|
var DestructibleComponent = /** @class */ (function () {
|
|
@@ -608,6 +609,13 @@
|
|
|
608
609
|
}());
|
|
609
610
|
IdGenerator.collection = 'ABCDEFGHIJKLMNOPQRSTUVWXTZ0123456789'.split('');
|
|
610
611
|
|
|
612
|
+
var MapConstants = /** @class */ (function () {
|
|
613
|
+
function MapConstants() {
|
|
614
|
+
}
|
|
615
|
+
return MapConstants;
|
|
616
|
+
}());
|
|
617
|
+
MapConstants.FeatureInfo = 'f-info';
|
|
618
|
+
|
|
611
619
|
var MarkerModel = /** @class */ (function () {
|
|
612
620
|
function MarkerModel(lat, lng, id, info) {
|
|
613
621
|
this.lat = lat;
|
|
@@ -627,12 +635,41 @@
|
|
|
627
635
|
var feature = new ol.Feature(new geom.Point([this.lng, this.lat]));
|
|
628
636
|
feature.setId(this.id);
|
|
629
637
|
if (this.info)
|
|
630
|
-
feature.set(
|
|
638
|
+
feature.set(MapConstants.FeatureInfo, this.info);
|
|
631
639
|
return feature;
|
|
632
640
|
};
|
|
633
641
|
return MarkerModel;
|
|
634
642
|
}());
|
|
635
643
|
|
|
644
|
+
var PolygonModel = /** @class */ (function () {
|
|
645
|
+
function PolygonModel(feature, id, info) {
|
|
646
|
+
var _b;
|
|
647
|
+
var _a;
|
|
648
|
+
this.info = info;
|
|
649
|
+
this.id = id == null ? IdGenerator.get() : id;
|
|
650
|
+
this._feature = feature;
|
|
651
|
+
_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];
|
|
652
|
+
}
|
|
653
|
+
PolygonModel.fromGeoJson = function (id, json, info) {
|
|
654
|
+
var feature = new format.GeoJSON().readFeature(json);
|
|
655
|
+
feature.setId(id);
|
|
656
|
+
return new PolygonModel(feature, id, info);
|
|
657
|
+
};
|
|
658
|
+
PolygonModel.fromWKT = function (id, wkt, info) {
|
|
659
|
+
var feature = new format.WKT().readFeature(wkt);
|
|
660
|
+
feature.setId(id);
|
|
661
|
+
return new PolygonModel(feature, id, info);
|
|
662
|
+
};
|
|
663
|
+
Object.defineProperty(PolygonModel.prototype, "feature", {
|
|
664
|
+
get: function () {
|
|
665
|
+
return this._feature;
|
|
666
|
+
},
|
|
667
|
+
enumerable: false,
|
|
668
|
+
configurable: true
|
|
669
|
+
});
|
|
670
|
+
return PolygonModel;
|
|
671
|
+
}());
|
|
672
|
+
|
|
636
673
|
var GenericMessage = /** @class */ (function () {
|
|
637
674
|
function GenericMessage() {
|
|
638
675
|
}
|
|
@@ -673,10 +710,11 @@
|
|
|
673
710
|
|
|
674
711
|
var MapClickEvent = /** @class */ (function (_super) {
|
|
675
712
|
__extends(MapClickEvent, _super);
|
|
676
|
-
function MapClickEvent(coordinates, entities) {
|
|
713
|
+
function MapClickEvent(coordinates, entities, features) {
|
|
677
714
|
var _this = _super.call(this) || this;
|
|
678
715
|
_this.coordinates = coordinates;
|
|
679
716
|
_this.entities = entities;
|
|
717
|
+
_this.features = features;
|
|
680
718
|
return _this;
|
|
681
719
|
}
|
|
682
720
|
Object.defineProperty(MapClickEvent.prototype, "id", {
|
|
@@ -799,6 +837,26 @@
|
|
|
799
837
|
}(GenericMessage));
|
|
800
838
|
RemoveTileCommand.ID = 'c36ccc0b-5638-4819-b148-2de57a59a5b7';
|
|
801
839
|
|
|
840
|
+
var FitToFeaturesCommand = /** @class */ (function (_super) {
|
|
841
|
+
__extends(FitToFeaturesCommand, _super);
|
|
842
|
+
function FitToFeaturesCommand(features, zoomAfter) {
|
|
843
|
+
if (zoomAfter === void 0) { zoomAfter = 0; }
|
|
844
|
+
var _this = _super.call(this) || this;
|
|
845
|
+
_this.features = features;
|
|
846
|
+
_this.zoomAfter = zoomAfter;
|
|
847
|
+
return _this;
|
|
848
|
+
}
|
|
849
|
+
Object.defineProperty(FitToFeaturesCommand.prototype, "id", {
|
|
850
|
+
get: function () {
|
|
851
|
+
return FitToFeaturesCommand.ID;
|
|
852
|
+
},
|
|
853
|
+
enumerable: false,
|
|
854
|
+
configurable: true
|
|
855
|
+
});
|
|
856
|
+
return FitToFeaturesCommand;
|
|
857
|
+
}(GenericMessage));
|
|
858
|
+
FitToFeaturesCommand.ID = '76cdc091-3793-4b6c-82f7-1e0334cf08a8';
|
|
859
|
+
|
|
802
860
|
var MapPostboyService = /** @class */ (function (_super) {
|
|
803
861
|
__extends(MapPostboyService, _super);
|
|
804
862
|
function MapPostboyService() {
|
|
@@ -861,11 +919,14 @@
|
|
|
861
919
|
MapManagementService.prototype.observePlaceFeatures = function () {
|
|
862
920
|
var _this = this;
|
|
863
921
|
this.postboy.subscribe(PlaceLayerFeaturesCommand.ID).subscribe(function (c) {
|
|
864
|
-
var _a, _b
|
|
922
|
+
var _a, _b;
|
|
865
923
|
if (!_this.layers[c.layer])
|
|
866
924
|
return;
|
|
867
|
-
|
|
868
|
-
(
|
|
925
|
+
var source = (_a = _this.layers[c.layer]) === null || _a === void 0 ? void 0 : _a.getSource();
|
|
926
|
+
if (!!source['getSource'])
|
|
927
|
+
source = (_b = source) === null || _b === void 0 ? void 0 : _b.getSource();
|
|
928
|
+
source === null || source === void 0 ? void 0 : source.clear();
|
|
929
|
+
source === null || source === void 0 ? void 0 : source.addFeatures(c.features);
|
|
869
930
|
});
|
|
870
931
|
};
|
|
871
932
|
MapManagementService.prototype.observeRemoveLayer = function () {
|
|
@@ -901,6 +962,42 @@
|
|
|
901
962
|
type: i0.Injectable
|
|
902
963
|
}], ctorParameters: function () { return [{ type: MapPostboyService }]; } });
|
|
903
964
|
|
|
965
|
+
var MapFeatureService = /** @class */ (function () {
|
|
966
|
+
function MapFeatureService(postboy) {
|
|
967
|
+
this.postboy = postboy;
|
|
968
|
+
}
|
|
969
|
+
MapFeatureService.prototype.up = function () {
|
|
970
|
+
this.observeMapRender();
|
|
971
|
+
this.observeFitToFeatures();
|
|
972
|
+
};
|
|
973
|
+
MapFeatureService.prototype.observeMapRender = function () {
|
|
974
|
+
var _this = this;
|
|
975
|
+
this.postboy.subscribe(MapRenderedEvent.ID).subscribe(function (m) {
|
|
976
|
+
_this.map = m.map;
|
|
977
|
+
});
|
|
978
|
+
};
|
|
979
|
+
MapFeatureService.prototype.observeFitToFeatures = function () {
|
|
980
|
+
var _this = this;
|
|
981
|
+
this.postboy.subscribe(FitToFeaturesCommand.ID).subscribe(function (m) {
|
|
982
|
+
_this.fitToGeometries(m.features.map(function (f) { return f.getGeometry(); }), m.zoomAfter);
|
|
983
|
+
});
|
|
984
|
+
};
|
|
985
|
+
MapFeatureService.prototype.fitToGeometries = function (geometries, zoomAfter) {
|
|
986
|
+
if (!(geometries === null || geometries === void 0 ? void 0 : geometries.length) || !this.map)
|
|
987
|
+
return;
|
|
988
|
+
var extent$1 = extent.createEmpty();
|
|
989
|
+
geometries.forEach(function (g) { return extent.extend(extent$1, g.getExtent()); });
|
|
990
|
+
this.map.getView().fit(extent$1);
|
|
991
|
+
this.map.getView().setZoom(this.map.getView().getZoom() + zoomAfter);
|
|
992
|
+
};
|
|
993
|
+
return MapFeatureService;
|
|
994
|
+
}());
|
|
995
|
+
MapFeatureService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapFeatureService, deps: [{ token: MapPostboyService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
996
|
+
MapFeatureService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapFeatureService });
|
|
997
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapFeatureService, decorators: [{
|
|
998
|
+
type: i0.Injectable
|
|
999
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }]; } });
|
|
1000
|
+
|
|
904
1001
|
var MapClickService = /** @class */ (function () {
|
|
905
1002
|
function MapClickService(postboy) {
|
|
906
1003
|
this.postboy = postboy;
|
|
@@ -921,7 +1018,7 @@
|
|
|
921
1018
|
MapClickService.prototype.onClick = function (ev) {
|
|
922
1019
|
var _this = this;
|
|
923
1020
|
var _a;
|
|
924
|
-
var model = new MapClickEvent(ev.coordinate, {});
|
|
1021
|
+
var model = new MapClickEvent(ev.coordinate, {}, {});
|
|
925
1022
|
(_a = this.map) === null || _a === void 0 ? void 0 : _a.forEachFeatureAtPixel(ev.pixel, function (f, l) {
|
|
926
1023
|
_this.getFeatureCollectionWithInner([f])
|
|
927
1024
|
.filter(function (f) { return f.getId() != null; })
|
|
@@ -929,7 +1026,10 @@
|
|
|
929
1026
|
var layerName = l.get('name');
|
|
930
1027
|
if (!model.entities[layerName])
|
|
931
1028
|
model.entities[layerName] = [];
|
|
932
|
-
model.
|
|
1029
|
+
if (!model.features[layerName])
|
|
1030
|
+
model.features[layerName] = [];
|
|
1031
|
+
model.entities[layerName].push(Object.assign({ id: fs.getId() }, fs.get(MapConstants.FeatureInfo)));
|
|
1032
|
+
model.features[layerName].push(fs);
|
|
933
1033
|
});
|
|
934
1034
|
});
|
|
935
1035
|
return model;
|
|
@@ -952,9 +1052,9 @@
|
|
|
952
1052
|
|
|
953
1053
|
var MessageRegistratorService = /** @class */ (function (_super) {
|
|
954
1054
|
__extends(MessageRegistratorService, _super);
|
|
955
|
-
function MessageRegistratorService(service, management, state, interaction) {
|
|
1055
|
+
function MessageRegistratorService(service, management, state, feature, interaction) {
|
|
956
1056
|
var _this = _super.call(this, service) || this;
|
|
957
|
-
_this.registerServices([management, state, interaction]);
|
|
1057
|
+
_this.registerServices([management, state, interaction, feature]);
|
|
958
1058
|
return _this;
|
|
959
1059
|
}
|
|
960
1060
|
MessageRegistratorService.prototype._up = function () {
|
|
@@ -966,14 +1066,15 @@
|
|
|
966
1066
|
this.registerSubject(RemoveTileCommand.ID);
|
|
967
1067
|
this.registerSubject(MapClickEvent.ID);
|
|
968
1068
|
this.registerSubject(CloseTooltipCommand.ID);
|
|
1069
|
+
this.registerSubject(FitToFeaturesCommand.ID);
|
|
969
1070
|
};
|
|
970
1071
|
return MessageRegistratorService;
|
|
971
1072
|
}(postboy.PostboyAbstractRegistrator));
|
|
972
|
-
MessageRegistratorService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MessageRegistratorService, deps: [{ token: MapPostboyService }, { token: MapManagementService }, { token: MapStateService }, { token: MapClickService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1073
|
+
MessageRegistratorService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MessageRegistratorService, deps: [{ token: MapPostboyService }, { token: MapManagementService }, { token: MapStateService }, { token: MapFeatureService }, { token: MapClickService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
973
1074
|
MessageRegistratorService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MessageRegistratorService });
|
|
974
1075
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MessageRegistratorService, decorators: [{
|
|
975
1076
|
type: i0.Injectable
|
|
976
|
-
}], ctorParameters: function () { return [{ type: MapPostboyService }, { type: MapManagementService }, { type: MapStateService }, { type: MapClickService }]; } });
|
|
1077
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }, { type: MapManagementService }, { type: MapStateService }, { type: MapFeatureService }, { type: MapClickService }]; } });
|
|
977
1078
|
|
|
978
1079
|
var MapPlateFactory = /** @class */ (function () {
|
|
979
1080
|
function MapPlateFactory() {
|
|
@@ -1117,7 +1218,7 @@
|
|
|
1117
1218
|
return MapPlateComponent;
|
|
1118
1219
|
}(DestructibleComponent));
|
|
1119
1220
|
MapPlateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapPlateComponent, deps: [{ token: i0__namespace.ElementRef }, { token: MapPostboyService }, { token: MapPlateFactory }, { token: MessageRegistratorService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1120
|
-
MapPlateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MapPlateComponent, selector: "lib-map-plate", inputs: { settings: "settings" }, providers: [MessageRegistratorService, MapStateService, MapManagementService, MapClickService], usesInheritance: true, ngImport: i0__namespace, template: "<ng-content></ng-content>\n<lib-osm-tile-layer *ngIf=\"osmUrl && map\" [map]=\"map\" [url]=\"osmUrl\"></lib-osm-tile-layer>\n", styles: ["lib-map-plate{position:relative;display:flex;flex-direction:column;height:100%}\n"], components: [{ type: OsmTileLayerComponent, selector: "lib-osm-tile-layer", inputs: ["url", "map"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1221
|
+
MapPlateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MapPlateComponent, selector: "lib-map-plate", inputs: { settings: "settings" }, providers: [MessageRegistratorService, MapStateService, MapManagementService, MapClickService, MapFeatureService], usesInheritance: true, ngImport: i0__namespace, template: "<ng-content></ng-content>\n<lib-osm-tile-layer *ngIf=\"osmUrl && map\" [map]=\"map\" [url]=\"osmUrl\"></lib-osm-tile-layer>\n", styles: ["lib-map-plate{position:relative;display:flex;flex-direction:column;height:100%}\n"], components: [{ type: OsmTileLayerComponent, selector: "lib-osm-tile-layer", inputs: ["url", "map"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1121
1222
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapPlateComponent, decorators: [{
|
|
1122
1223
|
type: i0.Component,
|
|
1123
1224
|
args: [{
|
|
@@ -1125,7 +1226,7 @@
|
|
|
1125
1226
|
templateUrl: './map-plate.component.html',
|
|
1126
1227
|
styleUrls: ['./map-plate.component.scss'],
|
|
1127
1228
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1128
|
-
providers: [MessageRegistratorService, MapStateService, MapManagementService, MapClickService],
|
|
1229
|
+
providers: [MessageRegistratorService, MapStateService, MapManagementService, MapClickService, MapFeatureService],
|
|
1129
1230
|
}]
|
|
1130
1231
|
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: MapPostboyService }, { type: MapPlateFactory }, { type: MessageRegistratorService }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { settings: [{
|
|
1131
1232
|
type: i0.Input
|
|
@@ -1570,6 +1671,242 @@
|
|
|
1570
1671
|
type: i0.Input
|
|
1571
1672
|
}] } });
|
|
1572
1673
|
|
|
1674
|
+
var PolygonsComponent = /** @class */ (function (_super) {
|
|
1675
|
+
__extends(PolygonsComponent, _super);
|
|
1676
|
+
function PolygonsComponent(postboy) {
|
|
1677
|
+
var _this = _super.call(this) || this;
|
|
1678
|
+
_this.postboy = postboy;
|
|
1679
|
+
_this.layerName = '';
|
|
1680
|
+
_this._polygons = [];
|
|
1681
|
+
return _this;
|
|
1682
|
+
}
|
|
1683
|
+
Object.defineProperty(PolygonsComponent.prototype, "polygons", {
|
|
1684
|
+
set: function (value) {
|
|
1685
|
+
this._polygons = value;
|
|
1686
|
+
this.putPolygons();
|
|
1687
|
+
},
|
|
1688
|
+
enumerable: false,
|
|
1689
|
+
configurable: true
|
|
1690
|
+
});
|
|
1691
|
+
PolygonsComponent.prototype.ngOnInit = function () {
|
|
1692
|
+
var _this = this;
|
|
1693
|
+
this.postboy
|
|
1694
|
+
.subscribe(MapRenderedEvent.ID)
|
|
1695
|
+
.pipe(operators.filter(function (m) { return !!m; }), operators.first())
|
|
1696
|
+
.subscribe(function () { return _this.putPolygons(); });
|
|
1697
|
+
};
|
|
1698
|
+
PolygonsComponent.prototype.putPolygons = function () {
|
|
1699
|
+
var _a;
|
|
1700
|
+
if (!((_a = this._polygons) === null || _a === void 0 ? void 0 : _a.length))
|
|
1701
|
+
return;
|
|
1702
|
+
this.postboy.fire(new PlaceLayerFeaturesCommand(this.layerName, this._polygons.map(function (m) { return m.feature; })));
|
|
1703
|
+
};
|
|
1704
|
+
return PolygonsComponent;
|
|
1705
|
+
}(DestructibleComponent));
|
|
1706
|
+
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 });
|
|
1707
|
+
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 });
|
|
1708
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PolygonsComponent, decorators: [{
|
|
1709
|
+
type: i0.Component,
|
|
1710
|
+
args: [{
|
|
1711
|
+
selector: 'lib-polygons',
|
|
1712
|
+
template: '',
|
|
1713
|
+
styleUrls: [],
|
|
1714
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1715
|
+
}]
|
|
1716
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }]; }, propDecorators: { layerName: [{
|
|
1717
|
+
type: i0.Input
|
|
1718
|
+
}], polygons: [{
|
|
1719
|
+
type: i0.Input
|
|
1720
|
+
}] } });
|
|
1721
|
+
|
|
1722
|
+
var ClusterLayerSettings = /** @class */ (function () {
|
|
1723
|
+
function ClusterLayerSettings() {
|
|
1724
|
+
this.name = IdGenerator.get();
|
|
1725
|
+
this.zIndex = 1;
|
|
1726
|
+
this.maxZoom = 19;
|
|
1727
|
+
this.minZoom = 0;
|
|
1728
|
+
this.distance = 20;
|
|
1729
|
+
this.bbox = false;
|
|
1730
|
+
}
|
|
1731
|
+
ClusterLayerSettings.copy = function (model) {
|
|
1732
|
+
var result = new ClusterLayerSettings();
|
|
1733
|
+
result.name = model.name;
|
|
1734
|
+
result.maxZoom = model.maxZoom;
|
|
1735
|
+
result.minZoom = model.minZoom;
|
|
1736
|
+
result.zIndex = model.zIndex;
|
|
1737
|
+
result.bbox = model.bbox;
|
|
1738
|
+
result.distance = model.distance;
|
|
1739
|
+
result.style = model.style;
|
|
1740
|
+
return result;
|
|
1741
|
+
};
|
|
1742
|
+
ClusterLayerSettings.prototype.setZIndex = function (zIndex) {
|
|
1743
|
+
return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { zIndex: zIndex }));
|
|
1744
|
+
};
|
|
1745
|
+
ClusterLayerSettings.prototype.setDistance = function (distance) {
|
|
1746
|
+
return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { distance: distance }));
|
|
1747
|
+
};
|
|
1748
|
+
ClusterLayerSettings.prototype.setName = function (name) {
|
|
1749
|
+
return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { name: name }));
|
|
1750
|
+
};
|
|
1751
|
+
ClusterLayerSettings.prototype.setMaxZoom = function (maxZoom) {
|
|
1752
|
+
return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom: maxZoom }));
|
|
1753
|
+
};
|
|
1754
|
+
ClusterLayerSettings.prototype.setMinZoom = function (minZoom) {
|
|
1755
|
+
return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom: minZoom }));
|
|
1756
|
+
};
|
|
1757
|
+
ClusterLayerSettings.prototype.setBbox = function (bbox) {
|
|
1758
|
+
return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { bbox: bbox }));
|
|
1759
|
+
};
|
|
1760
|
+
ClusterLayerSettings.prototype.setStyle = function (style) {
|
|
1761
|
+
return ClusterLayerSettings.copy(Object.assign(Object.assign({}, this), { style: style }));
|
|
1762
|
+
};
|
|
1763
|
+
ClusterLayerSettings.prototype.isSame = function (model) {
|
|
1764
|
+
if (this.maxZoom !== model.maxZoom)
|
|
1765
|
+
return false;
|
|
1766
|
+
if (this.minZoom !== model.minZoom)
|
|
1767
|
+
return false;
|
|
1768
|
+
if (this.zIndex !== model.zIndex)
|
|
1769
|
+
return false;
|
|
1770
|
+
if (this.name !== model.name)
|
|
1771
|
+
return false;
|
|
1772
|
+
if (this.distance !== model.distance)
|
|
1773
|
+
return false;
|
|
1774
|
+
if (this.bbox !== model.bbox)
|
|
1775
|
+
return false;
|
|
1776
|
+
if (this.style !== model.style)
|
|
1777
|
+
return false;
|
|
1778
|
+
return true;
|
|
1779
|
+
};
|
|
1780
|
+
return ClusterLayerSettings;
|
|
1781
|
+
}());
|
|
1782
|
+
|
|
1783
|
+
var ClusterLayerManager = /** @class */ (function () {
|
|
1784
|
+
function ClusterLayerManager(settings, layer, postboy) {
|
|
1785
|
+
this.settings = settings;
|
|
1786
|
+
this.layer = layer;
|
|
1787
|
+
this.postboy = postboy;
|
|
1788
|
+
this.observeClick();
|
|
1789
|
+
}
|
|
1790
|
+
ClusterLayerManager.prototype.observeClick = function () {
|
|
1791
|
+
var _this = this;
|
|
1792
|
+
this.postboy.subscribe(MapClickEvent.ID).subscribe(function (m) {
|
|
1793
|
+
var _a, _b;
|
|
1794
|
+
if (((_b = (_a = m.features[_this.settings.name]) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 1) {
|
|
1795
|
+
_this.postboy.fire(new FitToFeaturesCommand(m.features[_this.settings.name], -1));
|
|
1796
|
+
}
|
|
1797
|
+
});
|
|
1798
|
+
};
|
|
1799
|
+
return ClusterLayerManager;
|
|
1800
|
+
}());
|
|
1801
|
+
|
|
1802
|
+
var ClusterLayerFactory = /** @class */ (function () {
|
|
1803
|
+
function ClusterLayerFactory() {
|
|
1804
|
+
}
|
|
1805
|
+
ClusterLayerFactory.prototype.build = function (settings, postboy) {
|
|
1806
|
+
var source$1 = new source.Vector({
|
|
1807
|
+
strategy: settings.bbox ? loadingstrategy.bbox : undefined,
|
|
1808
|
+
});
|
|
1809
|
+
var cluster = new Cluster__default["default"]({
|
|
1810
|
+
distance: settings.distance,
|
|
1811
|
+
source: source$1,
|
|
1812
|
+
geometryFunction: function (feature) {
|
|
1813
|
+
var _a, _b;
|
|
1814
|
+
var geom = feature.getGeometry();
|
|
1815
|
+
if ((geom === null || geom === void 0 ? void 0 : geom.getType()) == 'Point') {
|
|
1816
|
+
return geom;
|
|
1817
|
+
}
|
|
1818
|
+
else if ((geom === null || geom === void 0 ? void 0 : geom.getType()) == 'Polygon') {
|
|
1819
|
+
return (_a = geom) === null || _a === void 0 ? void 0 : _a.getInteriorPoint();
|
|
1820
|
+
}
|
|
1821
|
+
else if ((geom === null || geom === void 0 ? void 0 : geom.getType()) == 'MultiPolygon') {
|
|
1822
|
+
return (_b = Polygon.fromExtent(geom.getExtent())) === null || _b === void 0 ? void 0 : _b.getInteriorPoint();
|
|
1823
|
+
}
|
|
1824
|
+
return undefined;
|
|
1825
|
+
},
|
|
1826
|
+
});
|
|
1827
|
+
var layer$1 = new layer.Vector({
|
|
1828
|
+
source: cluster,
|
|
1829
|
+
maxZoom: settings.maxZoom || undefined,
|
|
1830
|
+
minZoom: settings.minZoom || undefined,
|
|
1831
|
+
zIndex: settings.zIndex || 0,
|
|
1832
|
+
});
|
|
1833
|
+
layer$1.setStyle(this.styleFunc(settings));
|
|
1834
|
+
layer$1.set('name', settings.name);
|
|
1835
|
+
return new ClusterLayerManager(settings, layer$1, postboy);
|
|
1836
|
+
};
|
|
1837
|
+
ClusterLayerFactory.prototype.styleFunc = function (settings) {
|
|
1838
|
+
return function (feature) {
|
|
1839
|
+
var features = feature.get('features');
|
|
1840
|
+
if (!settings.style)
|
|
1841
|
+
return undefined;
|
|
1842
|
+
return settings.style(features.map(function (f) { return (Object.assign({ id: f.getId() }, f.get(MapConstants.FeatureInfo))); }));
|
|
1843
|
+
};
|
|
1844
|
+
};
|
|
1845
|
+
return ClusterLayerFactory;
|
|
1846
|
+
}());
|
|
1847
|
+
ClusterLayerFactory.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ClusterLayerFactory, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1848
|
+
ClusterLayerFactory.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ClusterLayerFactory, providedIn: 'root' });
|
|
1849
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ClusterLayerFactory, decorators: [{
|
|
1850
|
+
type: i0.Injectable,
|
|
1851
|
+
args: [{
|
|
1852
|
+
providedIn: 'root',
|
|
1853
|
+
}]
|
|
1854
|
+
}] });
|
|
1855
|
+
|
|
1856
|
+
var ClusterLayerComponent = /** @class */ (function (_super) {
|
|
1857
|
+
__extends(ClusterLayerComponent, _super);
|
|
1858
|
+
function ClusterLayerComponent(postboy, factory) {
|
|
1859
|
+
var _this = _super.call(this) || this;
|
|
1860
|
+
_this.postboy = postboy;
|
|
1861
|
+
_this.factory = factory;
|
|
1862
|
+
_this.manager = null;
|
|
1863
|
+
_this._settings = new ClusterLayerSettings();
|
|
1864
|
+
_this.onDestroy = function () { return _this.removeLayer(); };
|
|
1865
|
+
return _this;
|
|
1866
|
+
}
|
|
1867
|
+
ClusterLayerComponent.prototype.ngOnInit = function () {
|
|
1868
|
+
var _this = this;
|
|
1869
|
+
this.postboy
|
|
1870
|
+
.subscribe(MapRenderedEvent.ID)
|
|
1871
|
+
.pipe(operators.filter(function (m) { return !!m; }), operators.first())
|
|
1872
|
+
.subscribe(function (m) { return _this.initLayer(); });
|
|
1873
|
+
};
|
|
1874
|
+
Object.defineProperty(ClusterLayerComponent.prototype, "settings", {
|
|
1875
|
+
set: function (value) {
|
|
1876
|
+
if (!value || this._settings.isSame(value))
|
|
1877
|
+
return;
|
|
1878
|
+
this._settings = value;
|
|
1879
|
+
this.initLayer();
|
|
1880
|
+
},
|
|
1881
|
+
enumerable: false,
|
|
1882
|
+
configurable: true
|
|
1883
|
+
});
|
|
1884
|
+
ClusterLayerComponent.prototype.initLayer = function () {
|
|
1885
|
+
this.removeLayer();
|
|
1886
|
+
this.manager = this.factory.build(this._settings, this.postboy);
|
|
1887
|
+
this.postboy.fire(new AddLayerCommand(this.manager.layer));
|
|
1888
|
+
};
|
|
1889
|
+
ClusterLayerComponent.prototype.removeLayer = function () {
|
|
1890
|
+
var _a;
|
|
1891
|
+
if ((_a = this.manager) === null || _a === void 0 ? void 0 : _a.layer)
|
|
1892
|
+
this.postboy.fire(new RemoveLayerCommand(this.manager.layer));
|
|
1893
|
+
};
|
|
1894
|
+
return ClusterLayerComponent;
|
|
1895
|
+
}(DestructibleComponent));
|
|
1896
|
+
ClusterLayerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ClusterLayerComponent, deps: [{ token: MapPostboyService }, { token: ClusterLayerFactory }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1897
|
+
ClusterLayerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ClusterLayerComponent, selector: "lib-cluster-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0__namespace, template: '', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1898
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ClusterLayerComponent, decorators: [{
|
|
1899
|
+
type: i0.Component,
|
|
1900
|
+
args: [{
|
|
1901
|
+
selector: 'lib-cluster-layer',
|
|
1902
|
+
template: '',
|
|
1903
|
+
styleUrls: [],
|
|
1904
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1905
|
+
}]
|
|
1906
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }, { type: ClusterLayerFactory }]; }, propDecorators: { settings: [{
|
|
1907
|
+
type: i0.Input
|
|
1908
|
+
}] } });
|
|
1909
|
+
|
|
1573
1910
|
var MapModule = /** @class */ (function () {
|
|
1574
1911
|
function MapModule() {
|
|
1575
1912
|
}
|
|
@@ -1582,7 +1919,15 @@
|
|
|
1582
1919
|
OsmTileLayerComponent,
|
|
1583
1920
|
FeatureLayerComponent,
|
|
1584
1921
|
MarkersComponent,
|
|
1585
|
-
TooltipComponent
|
|
1922
|
+
TooltipComponent,
|
|
1923
|
+
PolygonsComponent,
|
|
1924
|
+
ClusterLayerComponent], imports: [i5.CommonModule], exports: [MapPlateComponent,
|
|
1925
|
+
FeatureLayerComponent,
|
|
1926
|
+
MarkersComponent,
|
|
1927
|
+
TileLayerComponent,
|
|
1928
|
+
TooltipComponent,
|
|
1929
|
+
PolygonsComponent,
|
|
1930
|
+
ClusterLayerComponent] });
|
|
1586
1931
|
MapModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapModule, imports: [[i5.CommonModule]] });
|
|
1587
1932
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapModule, decorators: [{
|
|
1588
1933
|
type: i0.NgModule,
|
|
@@ -1596,8 +1941,18 @@
|
|
|
1596
1941
|
FeatureLayerComponent,
|
|
1597
1942
|
MarkersComponent,
|
|
1598
1943
|
TooltipComponent,
|
|
1944
|
+
PolygonsComponent,
|
|
1945
|
+
ClusterLayerComponent,
|
|
1946
|
+
],
|
|
1947
|
+
exports: [
|
|
1948
|
+
MapPlateComponent,
|
|
1949
|
+
FeatureLayerComponent,
|
|
1950
|
+
MarkersComponent,
|
|
1951
|
+
TileLayerComponent,
|
|
1952
|
+
TooltipComponent,
|
|
1953
|
+
PolygonsComponent,
|
|
1954
|
+
ClusterLayerComponent,
|
|
1599
1955
|
],
|
|
1600
|
-
exports: [MapPlateComponent, FeatureLayerComponent, MarkersComponent, TileLayerComponent, TooltipComponent],
|
|
1601
1956
|
}]
|
|
1602
1957
|
}] });
|
|
1603
1958
|
|
|
@@ -1627,9 +1982,47 @@
|
|
|
1627
1982
|
}),
|
|
1628
1983
|
});
|
|
1629
1984
|
};
|
|
1985
|
+
MarkerStyleHelper.withText = function (style, text) {
|
|
1986
|
+
style.setText(text);
|
|
1987
|
+
return style;
|
|
1988
|
+
};
|
|
1630
1989
|
return MarkerStyleHelper;
|
|
1631
1990
|
}());
|
|
1632
1991
|
|
|
1992
|
+
var PolygonStyleHelper = /** @class */ (function () {
|
|
1993
|
+
function PolygonStyleHelper() {
|
|
1994
|
+
}
|
|
1995
|
+
PolygonStyleHelper.simple = function (fill, stroke, strokeWidth) {
|
|
1996
|
+
if (strokeWidth === void 0) { strokeWidth = 1; }
|
|
1997
|
+
return new Style__default["default"]({
|
|
1998
|
+
fill: new style.Fill({
|
|
1999
|
+
color: fill,
|
|
2000
|
+
}),
|
|
2001
|
+
stroke: new style.Stroke({
|
|
2002
|
+
color: stroke,
|
|
2003
|
+
width: strokeWidth,
|
|
2004
|
+
}),
|
|
2005
|
+
});
|
|
2006
|
+
};
|
|
2007
|
+
return PolygonStyleHelper;
|
|
2008
|
+
}());
|
|
2009
|
+
|
|
2010
|
+
var TextStyleHelper = /** @class */ (function () {
|
|
2011
|
+
function TextStyleHelper() {
|
|
2012
|
+
}
|
|
2013
|
+
TextStyleHelper.get = function (text, font, color) {
|
|
2014
|
+
return new style.Text({
|
|
2015
|
+
text: text,
|
|
2016
|
+
font: font,
|
|
2017
|
+
textAlign: 'center',
|
|
2018
|
+
fill: new style.Fill({
|
|
2019
|
+
color: color,
|
|
2020
|
+
}),
|
|
2021
|
+
});
|
|
2022
|
+
};
|
|
2023
|
+
return TextStyleHelper;
|
|
2024
|
+
}());
|
|
2025
|
+
|
|
1633
2026
|
/*
|
|
1634
2027
|
* Public API Surface of maps
|
|
1635
2028
|
*/
|
|
@@ -1640,6 +2033,8 @@
|
|
|
1640
2033
|
|
|
1641
2034
|
exports.CallbackMessage = CallbackMessage;
|
|
1642
2035
|
exports.CloseTooltipCommand = CloseTooltipCommand;
|
|
2036
|
+
exports.ClusterLayerComponent = ClusterLayerComponent;
|
|
2037
|
+
exports.ClusterLayerSettings = ClusterLayerSettings;
|
|
1643
2038
|
exports.FeatureLayerComponent = FeatureLayerComponent;
|
|
1644
2039
|
exports.FeatureLayerSettings = FeatureLayerSettings;
|
|
1645
2040
|
exports.GenericMessage = GenericMessage;
|
|
@@ -1655,6 +2050,10 @@
|
|
|
1655
2050
|
exports.MarkersComponent = MarkersComponent;
|
|
1656
2051
|
exports.MessageRegistratorService = MessageRegistratorService;
|
|
1657
2052
|
exports.OsmTileLayerComponent = OsmTileLayerComponent;
|
|
2053
|
+
exports.PolygonModel = PolygonModel;
|
|
2054
|
+
exports.PolygonStyleHelper = PolygonStyleHelper;
|
|
2055
|
+
exports.PolygonsComponent = PolygonsComponent;
|
|
2056
|
+
exports.TextStyleHelper = TextStyleHelper;
|
|
1658
2057
|
exports.TileLayerComponent = TileLayerComponent;
|
|
1659
2058
|
exports.TileLayerSettings = TileLayerSettings;
|
|
1660
2059
|
exports.TooltipComponent = TooltipComponent;
|