@artstesh/maps 1.1.25 → 1.1.26
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 +265 -6
- package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
- package/dist/bundles/maps-components.umd.js +265 -6
- package/dist/bundles/maps-components.umd.js.map +1 -1
- package/dist/esm2015/map/map-plate/layers/image-layer/image-layer-factory.js +26 -0
- package/dist/esm2015/map/map-plate/layers/image-layer/image-layer.component.js +54 -0
- package/dist/esm2015/map/map-plate/layers/image-layer/image-layer.settings.js +136 -0
- package/dist/esm2015/map/map-plate/layers/index.js +3 -1
- package/dist/esm2015/map/map.module.js +8 -3
- package/dist/esm2015/map/messages/commands/add-image-layer.command.js +9 -0
- package/dist/esm2015/map/messages/commands/remove-image-layer.command.js +9 -0
- package/dist/esm2015/map/services/map-management.service.js +16 -1
- package/dist/esm2015/map/services/message-registrator.service.js +5 -1
- package/dist/esm2015/src/map/map-plate/layers/image-layer/image-layer-factory.js +26 -0
- package/dist/esm2015/src/map/map-plate/layers/image-layer/image-layer.component.js +54 -0
- package/dist/esm2015/src/map/map-plate/layers/image-layer/image-layer.settings.js +136 -0
- package/dist/esm2015/src/map/map-plate/layers/index.js +3 -1
- package/dist/esm2015/src/map/map.module.js +8 -3
- package/dist/esm2015/src/map/messages/commands/add-image-layer.command.js +9 -0
- package/dist/esm2015/src/map/messages/commands/remove-image-layer.command.js +9 -0
- package/dist/esm2015/src/map/services/map-management.service.js +16 -1
- package/dist/esm2015/src/map/services/message-registrator.service.js +5 -1
- package/dist/fesm2015/maps-components-src-map.js +241 -3
- package/dist/fesm2015/maps-components-src-map.js.map +1 -1
- package/dist/fesm2015/maps-components.js +241 -3
- package/dist/fesm2015/maps-components.js.map +1 -1
- package/dist/map/map-plate/layers/image-layer/image-layer-factory.d.ts +9 -0
- package/dist/map/map-plate/layers/image-layer/image-layer.component.d.ts +22 -0
- package/dist/map/map-plate/layers/image-layer/image-layer.settings.d.ts +97 -0
- package/dist/map/map-plate/layers/index.d.ts +2 -0
- package/dist/map/map.module.d.ts +3 -2
- package/dist/map/messages/commands/add-image-layer.command.d.ts +8 -0
- package/dist/map/messages/commands/remove-image-layer.command.d.ts +8 -0
- package/dist/map/services/map-management.service.d.ts +1 -0
- package/dist/src/map/map-plate/layers/image-layer/image-layer-factory.d.ts +9 -0
- package/dist/src/map/map-plate/layers/image-layer/image-layer.component.d.ts +22 -0
- package/dist/src/map/map-plate/layers/image-layer/image-layer.settings.d.ts +97 -0
- package/dist/src/map/map-plate/layers/index.d.ts +2 -0
- package/dist/src/map/map.module.d.ts +3 -2
- package/dist/src/map/messages/commands/add-image-layer.command.d.ts +8 -0
- package/dist/src/map/messages/commands/remove-image-layer.command.d.ts +8 -0
- package/dist/src/map/services/map-management.service.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/geom/Polygon'), require('ol/control'), require('ol/proj'), require('@artstesh/postboy'), require('ol/interaction'), require('ol/interaction/Draw'), require('ol/sphere'), require('rxjs'), require('rxjs/operators'), require('@artstesh/collections'), require('ol/source'), require('ol/layer/Tile'), require('ol/source/OSM'), require('ol/layer'), require('ol/loadingstrategy'), require('ol/source/Cluster'), 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/geom/Polygon', 'ol/control', 'ol/proj', '@artstesh/postboy', 'ol/interaction', 'ol/interaction/Draw', 'ol/sphere', 'rxjs', 'rxjs/operators', '@artstesh/collections', 'ol/source', 'ol/layer/Tile', 'ol/source/OSM', 'ol/layer', 'ol/loadingstrategy', 'ol/source/Cluster', '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.Polygon, global.control, global.proj, global.postboy, global.interaction, global.Draw, global.Sphere, global.rxjs, global.rxjs.operators, global.collections, global.source, global.TileLayer, global.OSM, global.layer, global.loadingstrategy, global.Cluster, global.Map, global.View, global.Overlay, global.Style, global.style, global.epsg4326));
|
|
5
|
-
})(this, (function (exports, i0, i6, ol, geom, format, extent, Polygon, control, proj, postboy, interaction, Draw, Sphere, rxjs, operators, collections, source, TileLayer, OSM, layer, loadingstrategy, Cluster, 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/geom/Polygon'), require('ol/control'), require('ol/proj'), require('@artstesh/postboy'), require('ol/interaction'), require('ol/interaction/Draw'), require('ol/sphere'), require('rxjs'), require('rxjs/operators'), require('@artstesh/collections'), require('ol/source'), require('ol/layer/Tile'), require('ol/source/OSM'), require('ol/layer'), require('ol/loadingstrategy'), require('ol/source/Cluster'), require('ol/source/ImageStatic'), require('ol/layer/Image'), 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/geom/Polygon', 'ol/control', 'ol/proj', '@artstesh/postboy', 'ol/interaction', 'ol/interaction/Draw', 'ol/sphere', 'rxjs', 'rxjs/operators', '@artstesh/collections', 'ol/source', 'ol/layer/Tile', 'ol/source/OSM', 'ol/layer', 'ol/loadingstrategy', 'ol/source/Cluster', 'ol/source/ImageStatic', 'ol/layer/Image', '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.Polygon, global.control, global.proj, global.postboy, global.interaction, global.Draw, global.Sphere, global.rxjs, global.rxjs.operators, global.collections, global.source, global.TileLayer, global.OSM, global.layer, global.loadingstrategy, global.Cluster, global.Static, global.ImageLayer, global.Map, global.View, global.Overlay, global.Style, global.style, global.epsg4326));
|
|
5
|
+
})(this, (function (exports, i0, i6, ol, geom, format, extent, Polygon, control, proj, postboy, interaction, Draw, Sphere, rxjs, operators, collections, source, TileLayer, OSM, layer, loadingstrategy, Cluster, Static, ImageLayer, 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
|
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
var TileLayer__default = /*#__PURE__*/_interopDefaultLegacy(TileLayer);
|
|
32
32
|
var OSM__default = /*#__PURE__*/_interopDefaultLegacy(OSM);
|
|
33
33
|
var Cluster__default = /*#__PURE__*/_interopDefaultLegacy(Cluster);
|
|
34
|
+
var Static__default = /*#__PURE__*/_interopDefaultLegacy(Static);
|
|
35
|
+
var ImageLayer__default = /*#__PURE__*/_interopDefaultLegacy(ImageLayer);
|
|
34
36
|
var Map__default = /*#__PURE__*/_interopDefaultLegacy(Map);
|
|
35
37
|
var View__default = /*#__PURE__*/_interopDefaultLegacy(View);
|
|
36
38
|
var Overlay__default = /*#__PURE__*/_interopDefaultLegacy(Overlay);
|
|
@@ -1480,6 +1482,28 @@
|
|
|
1480
1482
|
return ZoomControlFactory;
|
|
1481
1483
|
}());
|
|
1482
1484
|
|
|
1485
|
+
var AddImageLayerCommand = /** @class */ (function (_super) {
|
|
1486
|
+
__extends(AddImageLayerCommand, _super);
|
|
1487
|
+
function AddImageLayerCommand(layer) {
|
|
1488
|
+
var _this = _super.call(this) || this;
|
|
1489
|
+
_this.layer = layer;
|
|
1490
|
+
return _this;
|
|
1491
|
+
}
|
|
1492
|
+
return AddImageLayerCommand;
|
|
1493
|
+
}(postboy.PostboyGenericMessage));
|
|
1494
|
+
AddImageLayerCommand.ID = '70f9b86f-8bc2-4f28-ae79-a13fc0b1ee5d';
|
|
1495
|
+
|
|
1496
|
+
var RemoveImageLayerCommand = /** @class */ (function (_super) {
|
|
1497
|
+
__extends(RemoveImageLayerCommand, _super);
|
|
1498
|
+
function RemoveImageLayerCommand(layer) {
|
|
1499
|
+
var _this = _super.call(this) || this;
|
|
1500
|
+
_this.layer = layer;
|
|
1501
|
+
return _this;
|
|
1502
|
+
}
|
|
1503
|
+
return RemoveImageLayerCommand;
|
|
1504
|
+
}(postboy.PostboyGenericMessage));
|
|
1505
|
+
RemoveImageLayerCommand.ID = 'c8e7efdb-17ff-4cf9-89be-e688b8de3b95';
|
|
1506
|
+
|
|
1483
1507
|
var MapPostboyService = /** @class */ (function (_super) {
|
|
1484
1508
|
__extends(MapPostboyService, _super);
|
|
1485
1509
|
function MapPostboyService() {
|
|
@@ -1514,6 +1538,7 @@
|
|
|
1514
1538
|
this.observeLayerQuery();
|
|
1515
1539
|
this.observeFeaturesInArea();
|
|
1516
1540
|
this.observeFeaturesInPoint();
|
|
1541
|
+
this.observeImageLayer();
|
|
1517
1542
|
};
|
|
1518
1543
|
MapManagementService.prototype.observeRemoveTile = function () {
|
|
1519
1544
|
var _this = this;
|
|
@@ -1535,6 +1560,19 @@
|
|
|
1535
1560
|
_this.map.addLayer(c.layer);
|
|
1536
1561
|
});
|
|
1537
1562
|
};
|
|
1563
|
+
MapManagementService.prototype.observeImageLayer = function () {
|
|
1564
|
+
var _this = this;
|
|
1565
|
+
this.postboy.sub(AddImageLayerCommand).subscribe(function (c) {
|
|
1566
|
+
if (!_this.map)
|
|
1567
|
+
return;
|
|
1568
|
+
_this.map.addLayer(c.layer);
|
|
1569
|
+
});
|
|
1570
|
+
this.postboy.sub(RemoveImageLayerCommand).subscribe(function (c) {
|
|
1571
|
+
if (!_this.map)
|
|
1572
|
+
return;
|
|
1573
|
+
_this.map.removeLayer(c.layer);
|
|
1574
|
+
});
|
|
1575
|
+
};
|
|
1538
1576
|
MapManagementService.prototype.observeMapRender = function () {
|
|
1539
1577
|
var _this = this;
|
|
1540
1578
|
this.postboy.sub(MapRenderedEvent).subscribe(function (m) {
|
|
@@ -2016,6 +2054,8 @@
|
|
|
2016
2054
|
this.recordSubject(AddLayerCommand);
|
|
2017
2055
|
this.recordSubject(RemoveLayerCommand);
|
|
2018
2056
|
this.recordSubject(AddTileCommand);
|
|
2057
|
+
this.recordSubject(RemoveImageLayerCommand);
|
|
2058
|
+
this.recordSubject(AddImageLayerCommand);
|
|
2019
2059
|
this.recordSubject(RemoveTileCommand);
|
|
2020
2060
|
this.recordSubject(MapClickEvent);
|
|
2021
2061
|
this.recordSubject(CloseTooltipCommand);
|
|
@@ -2882,6 +2922,219 @@
|
|
|
2882
2922
|
type: i0.Input
|
|
2883
2923
|
}] } });
|
|
2884
2924
|
|
|
2925
|
+
var ImageLayerSettings = /** @class */ (function () {
|
|
2926
|
+
function ImageLayerSettings() {
|
|
2927
|
+
/**
|
|
2928
|
+
* Represents the tiles URL.
|
|
2929
|
+
* @typedef {string} url
|
|
2930
|
+
*
|
|
2931
|
+
* @example
|
|
2932
|
+
* 'https://example.ex/{z}/{x}/{y}.png'
|
|
2933
|
+
*/
|
|
2934
|
+
this.url = '';
|
|
2935
|
+
/**
|
|
2936
|
+
* Use interpolated values when resampling.
|
|
2937
|
+
* By default, linear interpolation is used when resampling.
|
|
2938
|
+
* Set to false to use the nearest neighbor instead.
|
|
2939
|
+
*/
|
|
2940
|
+
this.interpolate = undefined;
|
|
2941
|
+
/**
|
|
2942
|
+
* The projection of the coordinate system.
|
|
2943
|
+
*
|
|
2944
|
+
* @type {string}
|
|
2945
|
+
* @default 'EPSG:3857'
|
|
2946
|
+
*/
|
|
2947
|
+
this.projection = 'EPSG:3857';
|
|
2948
|
+
this.extent = [0, 0, 0, 0];
|
|
2949
|
+
/**
|
|
2950
|
+
* Additional headers that should be added to each tile request
|
|
2951
|
+
*
|
|
2952
|
+
* @type {Record<string, string>}
|
|
2953
|
+
* @default An empty array
|
|
2954
|
+
*/
|
|
2955
|
+
this.requestHeaders = null;
|
|
2956
|
+
}
|
|
2957
|
+
/**
|
|
2958
|
+
* Creates a copy of the given tile layer settings.
|
|
2959
|
+
*
|
|
2960
|
+
* @param {ImageLayerSettings} model - The tile layer settings to be copied.
|
|
2961
|
+
* @return {ImageLayerSettings} - A new instance of ImageLayerSettings with the same properties as the model.
|
|
2962
|
+
*/
|
|
2963
|
+
ImageLayerSettings.copy = function (model) {
|
|
2964
|
+
var result = new ImageLayerSettings();
|
|
2965
|
+
result.interpolate = model.interpolate;
|
|
2966
|
+
result.projection = model.projection;
|
|
2967
|
+
result.extent = model.extent;
|
|
2968
|
+
result.url = model.url;
|
|
2969
|
+
result.requestHeaders = model.requestHeaders;
|
|
2970
|
+
return result;
|
|
2971
|
+
};
|
|
2972
|
+
/**
|
|
2973
|
+
* Sets the URL of the ImageLayerSettings object.
|
|
2974
|
+
*
|
|
2975
|
+
* @param {string} url - The URL to be set.
|
|
2976
|
+
* @return {ImageLayerSettings} - The updated ImageLayerSettings object.
|
|
2977
|
+
*/
|
|
2978
|
+
ImageLayerSettings.prototype.setUrl = function (url) {
|
|
2979
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { url: url }));
|
|
2980
|
+
};
|
|
2981
|
+
/**
|
|
2982
|
+
* Sets the interpolation state for the image layer settings.
|
|
2983
|
+
*
|
|
2984
|
+
* @param {boolean} [interpolate] - Use interpolated values when resampling.
|
|
2985
|
+
* By default, linear interpolation is used when resampling.
|
|
2986
|
+
* Set to false to use the nearest neighbor instead.
|
|
2987
|
+
* @return {ImageLayerSettings} A new instance of ImageLayerSettings with the updated interpolation setting.
|
|
2988
|
+
*/
|
|
2989
|
+
ImageLayerSettings.prototype.setInterpolate = function (interpolate) {
|
|
2990
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { interpolate: interpolate }));
|
|
2991
|
+
};
|
|
2992
|
+
ImageLayerSettings.prototype.setExtent = function (extent) {
|
|
2993
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { extent: extent }));
|
|
2994
|
+
};
|
|
2995
|
+
/**
|
|
2996
|
+
* Sets the requestHeaders of the ImageLayerSettings object.
|
|
2997
|
+
*
|
|
2998
|
+
* @param {Record<string, string>} requestHeaders - The headers which should be provided.
|
|
2999
|
+
* @return {ImageLayerSettings} - The updated ImageLayerSettings object.
|
|
3000
|
+
*/
|
|
3001
|
+
ImageLayerSettings.prototype.setRequestHeaders = function (requestHeaders) {
|
|
3002
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { requestHeaders: requestHeaders }));
|
|
3003
|
+
};
|
|
3004
|
+
/**
|
|
3005
|
+
* Sets the maximum zoom level for the tile layer.
|
|
3006
|
+
*
|
|
3007
|
+
* @param {number} maxZoom - The maximum zoom level.
|
|
3008
|
+
* @returns {ImageLayerSettings} - The updated tile layer settings object.
|
|
3009
|
+
*/
|
|
3010
|
+
ImageLayerSettings.prototype.setMaxZoom = function (maxZoom) {
|
|
3011
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom: maxZoom }));
|
|
3012
|
+
};
|
|
3013
|
+
/**
|
|
3014
|
+
* Sets the minimum zoom level for the Tile Layer.
|
|
3015
|
+
*
|
|
3016
|
+
* @param {number} minZoom - The minimum zoom level to be set.
|
|
3017
|
+
* @return {ImageLayerSettings} The modified ImageLayerSettings object with the updated minimum zoom level.
|
|
3018
|
+
*/
|
|
3019
|
+
ImageLayerSettings.prototype.setMinZoom = function (minZoom) {
|
|
3020
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom: minZoom }));
|
|
3021
|
+
};
|
|
3022
|
+
/**
|
|
3023
|
+
* Sets the opacity of the ImageLayerSettings.
|
|
3024
|
+
*
|
|
3025
|
+
* @param {number} opacity - The opacity value to set. Must be a number between 0 and 1.
|
|
3026
|
+
* @return {ImageLayerSettings} - A new instance of ImageLayerSettings with the opacity set.
|
|
3027
|
+
*/
|
|
3028
|
+
ImageLayerSettings.prototype.setOpacity = function (opacity) {
|
|
3029
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { opacity: opacity }));
|
|
3030
|
+
};
|
|
3031
|
+
/**
|
|
3032
|
+
* Sets the projection for the tile layer settings.
|
|
3033
|
+
*
|
|
3034
|
+
* @param {string} projection - The desired projection for the tile layer settings.
|
|
3035
|
+
* @return {ImageLayerSettings} - The updated tile layer settings with the new projection.
|
|
3036
|
+
*/
|
|
3037
|
+
ImageLayerSettings.prototype.setProjection = function (projection) {
|
|
3038
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { projection: projection }));
|
|
3039
|
+
};
|
|
3040
|
+
/**
|
|
3041
|
+
* Checks if the current instance of ImageLayerSettings is equal to the given model.
|
|
3042
|
+
* @param {ImageLayerSettings} model - The model to compare against.
|
|
3043
|
+
* @return {boolean} - True if all properties of the current instance matches the properties of the model;
|
|
3044
|
+
* otherwise, false.
|
|
3045
|
+
*/
|
|
3046
|
+
ImageLayerSettings.prototype.isSame = function (model) {
|
|
3047
|
+
if (this.url !== model.url)
|
|
3048
|
+
return false;
|
|
3049
|
+
if (this.projection !== model.projection)
|
|
3050
|
+
return false;
|
|
3051
|
+
if (this.extent !== model.extent)
|
|
3052
|
+
return false;
|
|
3053
|
+
if (this.interpolate !== model.interpolate)
|
|
3054
|
+
return false;
|
|
3055
|
+
if (this.requestHeaders !== model.requestHeaders)
|
|
3056
|
+
return false;
|
|
3057
|
+
return true;
|
|
3058
|
+
};
|
|
3059
|
+
return ImageLayerSettings;
|
|
3060
|
+
}());
|
|
3061
|
+
|
|
3062
|
+
var ImageLayerFactory = /** @class */ (function () {
|
|
3063
|
+
function ImageLayerFactory() {
|
|
3064
|
+
}
|
|
3065
|
+
ImageLayerFactory.prototype.build = function (settings) {
|
|
3066
|
+
var source = new Static__default["default"]({
|
|
3067
|
+
url: settings.url,
|
|
3068
|
+
interpolate: settings.interpolate,
|
|
3069
|
+
crossOrigin: 'Anonymous',
|
|
3070
|
+
projection: proj.get(settings.projection),
|
|
3071
|
+
imageExtent: settings.extent,
|
|
3072
|
+
});
|
|
3073
|
+
return new ImageLayer__default["default"]({ source: source });
|
|
3074
|
+
};
|
|
3075
|
+
return ImageLayerFactory;
|
|
3076
|
+
}());
|
|
3077
|
+
ImageLayerFactory.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ImageLayerFactory, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3078
|
+
ImageLayerFactory.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ImageLayerFactory, providedIn: 'root' });
|
|
3079
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ImageLayerFactory, decorators: [{
|
|
3080
|
+
type: i0.Injectable,
|
|
3081
|
+
args: [{
|
|
3082
|
+
providedIn: 'root',
|
|
3083
|
+
}]
|
|
3084
|
+
}] });
|
|
3085
|
+
|
|
3086
|
+
var ImageLayerComponent = /** @class */ (function (_super) {
|
|
3087
|
+
__extends(ImageLayerComponent, _super);
|
|
3088
|
+
function ImageLayerComponent(postboy, factory) {
|
|
3089
|
+
var _this = _super.call(this) || this;
|
|
3090
|
+
_this.postboy = postboy;
|
|
3091
|
+
_this.factory = factory;
|
|
3092
|
+
_this._settings = new ImageLayerSettings();
|
|
3093
|
+
_this.onDestroy = function () { return _this.removeLayer(); };
|
|
3094
|
+
return _this;
|
|
3095
|
+
}
|
|
3096
|
+
Object.defineProperty(ImageLayerComponent.prototype, "settings", {
|
|
3097
|
+
set: function (value) {
|
|
3098
|
+
if (!value || this._settings.isSame(value))
|
|
3099
|
+
return;
|
|
3100
|
+
this._settings = value;
|
|
3101
|
+
this.initLayer();
|
|
3102
|
+
},
|
|
3103
|
+
enumerable: false,
|
|
3104
|
+
configurable: true
|
|
3105
|
+
});
|
|
3106
|
+
ImageLayerComponent.prototype.ngOnInit = function () {
|
|
3107
|
+
var _this = this;
|
|
3108
|
+
this.postboy
|
|
3109
|
+
.sub(MapRenderedEvent)
|
|
3110
|
+
.pipe(operators.filter(function (m) { return !!m; }), operators.first())
|
|
3111
|
+
.subscribe(function (m) { return _this.initLayer(); });
|
|
3112
|
+
};
|
|
3113
|
+
ImageLayerComponent.prototype.initLayer = function () {
|
|
3114
|
+
this.removeLayer();
|
|
3115
|
+
this.layer = this.factory.build(this._settings);
|
|
3116
|
+
this.postboy.fire(new AddImageLayerCommand(this.layer));
|
|
3117
|
+
};
|
|
3118
|
+
ImageLayerComponent.prototype.removeLayer = function () {
|
|
3119
|
+
if (this.layer)
|
|
3120
|
+
this.postboy.fire(new RemoveImageLayerCommand(this.layer));
|
|
3121
|
+
};
|
|
3122
|
+
return ImageLayerComponent;
|
|
3123
|
+
}(DestructibleComponent));
|
|
3124
|
+
ImageLayerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ImageLayerComponent, deps: [{ token: MapPostboyService }, { token: ImageLayerFactory }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3125
|
+
ImageLayerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ImageLayerComponent, selector: "art-image-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0__namespace, template: '', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
3126
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ImageLayerComponent, decorators: [{
|
|
3127
|
+
type: i0.Component,
|
|
3128
|
+
args: [{
|
|
3129
|
+
selector: 'art-image-layer',
|
|
3130
|
+
template: '',
|
|
3131
|
+
styleUrls: [],
|
|
3132
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3133
|
+
}]
|
|
3134
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }, { type: ImageLayerFactory }]; }, propDecorators: { settings: [{
|
|
3135
|
+
type: i0.Input
|
|
3136
|
+
}] } });
|
|
3137
|
+
|
|
2885
3138
|
var MapPlateFactory = /** @class */ (function () {
|
|
2886
3139
|
function MapPlateFactory() {
|
|
2887
3140
|
}
|
|
@@ -3436,14 +3689,16 @@
|
|
|
3436
3689
|
TooltipComponent,
|
|
3437
3690
|
PolygonsComponent,
|
|
3438
3691
|
ClusterLayerComponent,
|
|
3439
|
-
MapControlZoomComponent
|
|
3692
|
+
MapControlZoomComponent,
|
|
3693
|
+
ImageLayerComponent], imports: [i6.CommonModule], exports: [MapPlateComponent,
|
|
3440
3694
|
FeatureLayerComponent,
|
|
3441
3695
|
MarkersComponent,
|
|
3442
3696
|
TileLayerComponent,
|
|
3443
3697
|
TooltipComponent,
|
|
3444
3698
|
PolygonsComponent,
|
|
3445
3699
|
ClusterLayerComponent,
|
|
3446
|
-
MapControlZoomComponent
|
|
3700
|
+
MapControlZoomComponent,
|
|
3701
|
+
ImageLayerComponent] });
|
|
3447
3702
|
MapModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapModule, imports: [[i6.CommonModule]] });
|
|
3448
3703
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapModule, decorators: [{
|
|
3449
3704
|
type: i0.NgModule,
|
|
@@ -3460,6 +3715,7 @@
|
|
|
3460
3715
|
PolygonsComponent,
|
|
3461
3716
|
ClusterLayerComponent,
|
|
3462
3717
|
MapControlZoomComponent,
|
|
3718
|
+
ImageLayerComponent,
|
|
3463
3719
|
],
|
|
3464
3720
|
exports: [
|
|
3465
3721
|
MapPlateComponent,
|
|
@@ -3470,6 +3726,7 @@
|
|
|
3470
3726
|
PolygonsComponent,
|
|
3471
3727
|
ClusterLayerComponent,
|
|
3472
3728
|
MapControlZoomComponent,
|
|
3729
|
+
ImageLayerComponent,
|
|
3473
3730
|
],
|
|
3474
3731
|
}]
|
|
3475
3732
|
}] });
|
|
@@ -3704,6 +3961,8 @@
|
|
|
3704
3961
|
exports.GetFeaturesInAreaQuery = GetFeaturesInAreaQuery;
|
|
3705
3962
|
exports.GetFeaturesInPointQuery = GetFeaturesInPointQuery;
|
|
3706
3963
|
exports.GetMapPositionExecutor = GetMapPositionExecutor;
|
|
3964
|
+
exports.ImageLayerComponent = ImageLayerComponent;
|
|
3965
|
+
exports.ImageLayerSettings = ImageLayerSettings;
|
|
3707
3966
|
exports.MapClickEvent = MapClickEvent;
|
|
3708
3967
|
exports.MapConstants = MapConstants;
|
|
3709
3968
|
exports.MapControl = MapControl;
|