@artstesh/maps 1.1.25 → 1.1.27
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 +591 -14
- package/dist/bundles/maps-components-src-map.umd.js.map +1 -1
- package/dist/bundles/maps-components.umd.js +591 -14
- 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 +5 -1
- package/dist/esm2015/map/map-plate/layers/raster-tile/raster-tile-layer.component.js +54 -0
- package/dist/esm2015/map/map-plate/layers/raster-tile/raster-tile-layer.factory.js +74 -0
- package/dist/esm2015/map/map-plate/layers/raster-tile/raster-tile-layer.settings.js +151 -0
- package/dist/esm2015/map/map.module.js +13 -3
- package/dist/esm2015/map/messages/commands/add-image-layer.command.js +9 -0
- package/dist/esm2015/map/messages/commands/add-raster-tile-command.js +9 -0
- package/dist/esm2015/map/messages/commands/remove-image-layer.command.js +9 -0
- package/dist/esm2015/map/messages/commands/remove-raster-tile.command.js +9 -0
- package/dist/esm2015/map/ol-proxy.js +3 -0
- package/dist/esm2015/map/public-api.js +2 -2
- package/dist/esm2015/map/services/map-management.service.js +32 -8
- package/dist/esm2015/map/services/message-registrator.service.js +9 -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 +5 -1
- package/dist/esm2015/src/map/map-plate/layers/raster-tile/raster-tile-layer.component.js +54 -0
- package/dist/esm2015/src/map/map-plate/layers/raster-tile/raster-tile-layer.factory.js +74 -0
- package/dist/esm2015/src/map/map-plate/layers/raster-tile/raster-tile-layer.settings.js +151 -0
- package/dist/esm2015/src/map/map.module.js +13 -3
- package/dist/esm2015/src/map/messages/commands/add-image-layer.command.js +9 -0
- package/dist/esm2015/src/map/messages/commands/add-raster-tile-command.js +9 -0
- package/dist/esm2015/src/map/messages/commands/remove-image-layer.command.js +9 -0
- package/dist/esm2015/src/map/messages/commands/remove-raster-tile.command.js +9 -0
- package/dist/esm2015/src/map/ol-proxy.js +3 -0
- package/dist/esm2015/src/map/public-api.js +2 -2
- package/dist/esm2015/src/map/services/map-management.service.js +32 -8
- package/dist/esm2015/src/map/services/message-registrator.service.js +9 -1
- package/dist/fesm2015/maps-components-src-map.js +542 -10
- package/dist/fesm2015/maps-components-src-map.js.map +1 -1
- package/dist/fesm2015/maps-components.js +542 -10
- 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 +4 -0
- package/dist/map/map-plate/layers/raster-tile/raster-tile-layer.component.d.ts +21 -0
- package/dist/map/map-plate/layers/raster-tile/raster-tile-layer.factory.d.ts +12 -0
- package/dist/map/map-plate/layers/raster-tile/raster-tile-layer.settings.d.ts +108 -0
- package/dist/map/map.module.d.ts +4 -2
- package/dist/map/messages/commands/add-image-layer.command.d.ts +8 -0
- package/dist/map/messages/commands/add-raster-tile-command.d.ts +8 -0
- package/dist/map/messages/commands/remove-image-layer.command.d.ts +8 -0
- package/dist/map/messages/commands/remove-raster-tile.command.d.ts +8 -0
- package/dist/map/ol-proxy.d.ts +3 -0
- package/dist/map/public-api.d.ts +1 -1
- package/dist/map/services/map-management.service.d.ts +1 -1
- 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 +4 -0
- package/dist/src/map/map-plate/layers/raster-tile/raster-tile-layer.component.d.ts +21 -0
- package/dist/src/map/map-plate/layers/raster-tile/raster-tile-layer.factory.d.ts +12 -0
- package/dist/src/map/map-plate/layers/raster-tile/raster-tile-layer.settings.d.ts +108 -0
- package/dist/src/map/map.module.d.ts +4 -2
- package/dist/src/map/messages/commands/add-image-layer.command.d.ts +8 -0
- package/dist/src/map/messages/commands/add-raster-tile-command.d.ts +8 -0
- package/dist/src/map/messages/commands/remove-image-layer.command.d.ts +8 -0
- package/dist/src/map/messages/commands/remove-raster-tile.command.d.ts +8 -0
- package/dist/src/map/ol-proxy.d.ts +3 -0
- package/dist/src/map/public-api.d.ts +1 -1
- package/dist/src/map/services/map-management.service.d.ts +1 -1
- package/package.json +2 -2
|
@@ -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/source/Raster'), 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/source/Raster', '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.RasterSource, 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, RasterSource, 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,9 @@
|
|
|
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);
|
|
36
|
+
var RasterSource__default = /*#__PURE__*/_interopDefaultLegacy(RasterSource);
|
|
34
37
|
var Map__default = /*#__PURE__*/_interopDefaultLegacy(Map);
|
|
35
38
|
var View__default = /*#__PURE__*/_interopDefaultLegacy(View);
|
|
36
39
|
var Overlay__default = /*#__PURE__*/_interopDefaultLegacy(Overlay);
|
|
@@ -1480,6 +1483,50 @@
|
|
|
1480
1483
|
return ZoomControlFactory;
|
|
1481
1484
|
}());
|
|
1482
1485
|
|
|
1486
|
+
var AddImageLayerCommand = /** @class */ (function (_super) {
|
|
1487
|
+
__extends(AddImageLayerCommand, _super);
|
|
1488
|
+
function AddImageLayerCommand(layer) {
|
|
1489
|
+
var _this = _super.call(this) || this;
|
|
1490
|
+
_this.layer = layer;
|
|
1491
|
+
return _this;
|
|
1492
|
+
}
|
|
1493
|
+
return AddImageLayerCommand;
|
|
1494
|
+
}(postboy.PostboyGenericMessage));
|
|
1495
|
+
AddImageLayerCommand.ID = '70f9b86f-8bc2-4f28-ae79-a13fc0b1ee5d';
|
|
1496
|
+
|
|
1497
|
+
var RemoveImageLayerCommand = /** @class */ (function (_super) {
|
|
1498
|
+
__extends(RemoveImageLayerCommand, _super);
|
|
1499
|
+
function RemoveImageLayerCommand(layer) {
|
|
1500
|
+
var _this = _super.call(this) || this;
|
|
1501
|
+
_this.layer = layer;
|
|
1502
|
+
return _this;
|
|
1503
|
+
}
|
|
1504
|
+
return RemoveImageLayerCommand;
|
|
1505
|
+
}(postboy.PostboyGenericMessage));
|
|
1506
|
+
RemoveImageLayerCommand.ID = 'c8e7efdb-17ff-4cf9-89be-e688b8de3b95';
|
|
1507
|
+
|
|
1508
|
+
var AddRasterTileCommand = /** @class */ (function (_super) {
|
|
1509
|
+
__extends(AddRasterTileCommand, _super);
|
|
1510
|
+
function AddRasterTileCommand(layer) {
|
|
1511
|
+
var _this = _super.call(this) || this;
|
|
1512
|
+
_this.layer = layer;
|
|
1513
|
+
return _this;
|
|
1514
|
+
}
|
|
1515
|
+
return AddRasterTileCommand;
|
|
1516
|
+
}(postboy.PostboyGenericMessage));
|
|
1517
|
+
AddRasterTileCommand.ID = 'd33447fe-eec0-4205-9b5d-0d79ddc74ad7';
|
|
1518
|
+
|
|
1519
|
+
var RemoveRasterTileCommand = /** @class */ (function (_super) {
|
|
1520
|
+
__extends(RemoveRasterTileCommand, _super);
|
|
1521
|
+
function RemoveRasterTileCommand(layer) {
|
|
1522
|
+
var _this = _super.call(this) || this;
|
|
1523
|
+
_this.layer = layer;
|
|
1524
|
+
return _this;
|
|
1525
|
+
}
|
|
1526
|
+
return RemoveRasterTileCommand;
|
|
1527
|
+
}(postboy.PostboyGenericMessage));
|
|
1528
|
+
RemoveRasterTileCommand.ID = 'd1c4bf6a-e2f2-4385-a7a2-cecb525f8939';
|
|
1529
|
+
|
|
1483
1530
|
var MapPostboyService = /** @class */ (function (_super) {
|
|
1484
1531
|
__extends(MapPostboyService, _super);
|
|
1485
1532
|
function MapPostboyService() {
|
|
@@ -1510,30 +1557,50 @@
|
|
|
1510
1557
|
this.observeRemoveLayer();
|
|
1511
1558
|
this.observePlaceFeatures();
|
|
1512
1559
|
this.observeAddTile();
|
|
1513
|
-
this.observeRemoveTile();
|
|
1514
1560
|
this.observeLayerQuery();
|
|
1515
1561
|
this.observeFeaturesInArea();
|
|
1516
1562
|
this.observeFeaturesInPoint();
|
|
1563
|
+
this.observeImageLayer();
|
|
1564
|
+
};
|
|
1565
|
+
MapManagementService.prototype.observeLayerQuery = function () {
|
|
1566
|
+
var _this = this;
|
|
1567
|
+
this.postboy.sub(GetLayerQuery).subscribe(function (ev) { return ev.finish(_this.layers.take(ev.name)); });
|
|
1517
1568
|
};
|
|
1518
|
-
MapManagementService.prototype.
|
|
1569
|
+
MapManagementService.prototype.observeAddTile = function () {
|
|
1519
1570
|
var _this = this;
|
|
1571
|
+
this.postboy.sub(AddTileCommand).subscribe(function (c) {
|
|
1572
|
+
if (!_this.map)
|
|
1573
|
+
return;
|
|
1574
|
+
_this.map.addLayer(c.layer);
|
|
1575
|
+
});
|
|
1520
1576
|
this.postboy.sub(RemoveTileCommand).subscribe(function (c) {
|
|
1521
1577
|
if (!_this.map)
|
|
1522
1578
|
return;
|
|
1523
1579
|
_this.map.removeLayer(c.layer);
|
|
1524
1580
|
});
|
|
1581
|
+
this.postboy.sub(AddRasterTileCommand).subscribe(function (c) {
|
|
1582
|
+
if (!_this.map)
|
|
1583
|
+
return;
|
|
1584
|
+
_this.map.addLayer(c.layer);
|
|
1585
|
+
});
|
|
1586
|
+
this.postboy.sub(RemoveRasterTileCommand).subscribe(function (c) {
|
|
1587
|
+
if (!_this.map)
|
|
1588
|
+
return;
|
|
1589
|
+
_this.map.removeLayer(c.layer);
|
|
1590
|
+
});
|
|
1525
1591
|
};
|
|
1526
|
-
MapManagementService.prototype.
|
|
1527
|
-
var _this = this;
|
|
1528
|
-
this.postboy.sub(GetLayerQuery).subscribe(function (ev) { return ev.finish(_this.layers.take(ev.name)); });
|
|
1529
|
-
};
|
|
1530
|
-
MapManagementService.prototype.observeAddTile = function () {
|
|
1592
|
+
MapManagementService.prototype.observeImageLayer = function () {
|
|
1531
1593
|
var _this = this;
|
|
1532
|
-
this.postboy.sub(
|
|
1594
|
+
this.postboy.sub(AddImageLayerCommand).subscribe(function (c) {
|
|
1533
1595
|
if (!_this.map)
|
|
1534
1596
|
return;
|
|
1535
1597
|
_this.map.addLayer(c.layer);
|
|
1536
1598
|
});
|
|
1599
|
+
this.postboy.sub(RemoveImageLayerCommand).subscribe(function (c) {
|
|
1600
|
+
if (!_this.map)
|
|
1601
|
+
return;
|
|
1602
|
+
_this.map.removeLayer(c.layer);
|
|
1603
|
+
});
|
|
1537
1604
|
};
|
|
1538
1605
|
MapManagementService.prototype.observeMapRender = function () {
|
|
1539
1606
|
var _this = this;
|
|
@@ -2016,6 +2083,10 @@
|
|
|
2016
2083
|
this.recordSubject(AddLayerCommand);
|
|
2017
2084
|
this.recordSubject(RemoveLayerCommand);
|
|
2018
2085
|
this.recordSubject(AddTileCommand);
|
|
2086
|
+
this.recordSubject(AddRasterTileCommand);
|
|
2087
|
+
this.recordSubject(RemoveRasterTileCommand);
|
|
2088
|
+
this.recordSubject(RemoveImageLayerCommand);
|
|
2089
|
+
this.recordSubject(AddImageLayerCommand);
|
|
2019
2090
|
this.recordSubject(RemoveTileCommand);
|
|
2020
2091
|
this.recordSubject(MapClickEvent);
|
|
2021
2092
|
this.recordSubject(CloseTooltipCommand);
|
|
@@ -2882,6 +2953,496 @@
|
|
|
2882
2953
|
type: i0.Input
|
|
2883
2954
|
}] } });
|
|
2884
2955
|
|
|
2956
|
+
var ImageLayerSettings = /** @class */ (function () {
|
|
2957
|
+
function ImageLayerSettings() {
|
|
2958
|
+
/**
|
|
2959
|
+
* Represents the tiles URL.
|
|
2960
|
+
* @typedef {string} url
|
|
2961
|
+
*
|
|
2962
|
+
* @example
|
|
2963
|
+
* 'https://example.ex/{z}/{x}/{y}.png'
|
|
2964
|
+
*/
|
|
2965
|
+
this.url = '';
|
|
2966
|
+
/**
|
|
2967
|
+
* Use interpolated values when resampling.
|
|
2968
|
+
* By default, linear interpolation is used when resampling.
|
|
2969
|
+
* Set to false to use the nearest neighbor instead.
|
|
2970
|
+
*/
|
|
2971
|
+
this.interpolate = undefined;
|
|
2972
|
+
/**
|
|
2973
|
+
* The projection of the coordinate system.
|
|
2974
|
+
*
|
|
2975
|
+
* @type {string}
|
|
2976
|
+
* @default 'EPSG:3857'
|
|
2977
|
+
*/
|
|
2978
|
+
this.projection = 'EPSG:3857';
|
|
2979
|
+
this.extent = [0, 0, 0, 0];
|
|
2980
|
+
/**
|
|
2981
|
+
* Additional headers that should be added to each tile request
|
|
2982
|
+
*
|
|
2983
|
+
* @type {Record<string, string>}
|
|
2984
|
+
* @default An empty array
|
|
2985
|
+
*/
|
|
2986
|
+
this.requestHeaders = null;
|
|
2987
|
+
}
|
|
2988
|
+
/**
|
|
2989
|
+
* Creates a copy of the given tile layer settings.
|
|
2990
|
+
*
|
|
2991
|
+
* @param {ImageLayerSettings} model - The tile layer settings to be copied.
|
|
2992
|
+
* @return {ImageLayerSettings} - A new instance of ImageLayerSettings with the same properties as the model.
|
|
2993
|
+
*/
|
|
2994
|
+
ImageLayerSettings.copy = function (model) {
|
|
2995
|
+
var result = new ImageLayerSettings();
|
|
2996
|
+
result.interpolate = model.interpolate;
|
|
2997
|
+
result.projection = model.projection;
|
|
2998
|
+
result.extent = model.extent;
|
|
2999
|
+
result.url = model.url;
|
|
3000
|
+
result.requestHeaders = model.requestHeaders;
|
|
3001
|
+
return result;
|
|
3002
|
+
};
|
|
3003
|
+
/**
|
|
3004
|
+
* Sets the URL of the ImageLayerSettings object.
|
|
3005
|
+
*
|
|
3006
|
+
* @param {string} url - The URL to be set.
|
|
3007
|
+
* @return {ImageLayerSettings} - The updated ImageLayerSettings object.
|
|
3008
|
+
*/
|
|
3009
|
+
ImageLayerSettings.prototype.setUrl = function (url) {
|
|
3010
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { url: url }));
|
|
3011
|
+
};
|
|
3012
|
+
/**
|
|
3013
|
+
* Sets the interpolation state for the image layer settings.
|
|
3014
|
+
*
|
|
3015
|
+
* @param {boolean} [interpolate] - Use interpolated values when resampling.
|
|
3016
|
+
* By default, linear interpolation is used when resampling.
|
|
3017
|
+
* Set to false to use the nearest neighbor instead.
|
|
3018
|
+
* @return {ImageLayerSettings} A new instance of ImageLayerSettings with the updated interpolation setting.
|
|
3019
|
+
*/
|
|
3020
|
+
ImageLayerSettings.prototype.setInterpolate = function (interpolate) {
|
|
3021
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { interpolate: interpolate }));
|
|
3022
|
+
};
|
|
3023
|
+
ImageLayerSettings.prototype.setExtent = function (extent) {
|
|
3024
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { extent: extent }));
|
|
3025
|
+
};
|
|
3026
|
+
/**
|
|
3027
|
+
* Sets the requestHeaders of the ImageLayerSettings object.
|
|
3028
|
+
*
|
|
3029
|
+
* @param {Record<string, string>} requestHeaders - The headers which should be provided.
|
|
3030
|
+
* @return {ImageLayerSettings} - The updated ImageLayerSettings object.
|
|
3031
|
+
*/
|
|
3032
|
+
ImageLayerSettings.prototype.setRequestHeaders = function (requestHeaders) {
|
|
3033
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { requestHeaders: requestHeaders }));
|
|
3034
|
+
};
|
|
3035
|
+
/**
|
|
3036
|
+
* Sets the maximum zoom level for the tile layer.
|
|
3037
|
+
*
|
|
3038
|
+
* @param {number} maxZoom - The maximum zoom level.
|
|
3039
|
+
* @returns {ImageLayerSettings} - The updated tile layer settings object.
|
|
3040
|
+
*/
|
|
3041
|
+
ImageLayerSettings.prototype.setMaxZoom = function (maxZoom) {
|
|
3042
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom: maxZoom }));
|
|
3043
|
+
};
|
|
3044
|
+
/**
|
|
3045
|
+
* Sets the minimum zoom level for the Tile Layer.
|
|
3046
|
+
*
|
|
3047
|
+
* @param {number} minZoom - The minimum zoom level to be set.
|
|
3048
|
+
* @return {ImageLayerSettings} The modified ImageLayerSettings object with the updated minimum zoom level.
|
|
3049
|
+
*/
|
|
3050
|
+
ImageLayerSettings.prototype.setMinZoom = function (minZoom) {
|
|
3051
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom: minZoom }));
|
|
3052
|
+
};
|
|
3053
|
+
/**
|
|
3054
|
+
* Sets the opacity of the ImageLayerSettings.
|
|
3055
|
+
*
|
|
3056
|
+
* @param {number} opacity - The opacity value to set. Must be a number between 0 and 1.
|
|
3057
|
+
* @return {ImageLayerSettings} - A new instance of ImageLayerSettings with the opacity set.
|
|
3058
|
+
*/
|
|
3059
|
+
ImageLayerSettings.prototype.setOpacity = function (opacity) {
|
|
3060
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { opacity: opacity }));
|
|
3061
|
+
};
|
|
3062
|
+
/**
|
|
3063
|
+
* Sets the projection for the tile layer settings.
|
|
3064
|
+
*
|
|
3065
|
+
* @param {string} projection - The desired projection for the tile layer settings.
|
|
3066
|
+
* @return {ImageLayerSettings} - The updated tile layer settings with the new projection.
|
|
3067
|
+
*/
|
|
3068
|
+
ImageLayerSettings.prototype.setProjection = function (projection) {
|
|
3069
|
+
return ImageLayerSettings.copy(Object.assign(Object.assign({}, this), { projection: projection }));
|
|
3070
|
+
};
|
|
3071
|
+
/**
|
|
3072
|
+
* Checks if the current instance of ImageLayerSettings is equal to the given model.
|
|
3073
|
+
* @param {ImageLayerSettings} model - The model to compare against.
|
|
3074
|
+
* @return {boolean} - True if all properties of the current instance matches the properties of the model;
|
|
3075
|
+
* otherwise, false.
|
|
3076
|
+
*/
|
|
3077
|
+
ImageLayerSettings.prototype.isSame = function (model) {
|
|
3078
|
+
if (this.url !== model.url)
|
|
3079
|
+
return false;
|
|
3080
|
+
if (this.projection !== model.projection)
|
|
3081
|
+
return false;
|
|
3082
|
+
if (this.extent !== model.extent)
|
|
3083
|
+
return false;
|
|
3084
|
+
if (this.interpolate !== model.interpolate)
|
|
3085
|
+
return false;
|
|
3086
|
+
if (this.requestHeaders !== model.requestHeaders)
|
|
3087
|
+
return false;
|
|
3088
|
+
return true;
|
|
3089
|
+
};
|
|
3090
|
+
return ImageLayerSettings;
|
|
3091
|
+
}());
|
|
3092
|
+
|
|
3093
|
+
var ImageLayerFactory = /** @class */ (function () {
|
|
3094
|
+
function ImageLayerFactory() {
|
|
3095
|
+
}
|
|
3096
|
+
ImageLayerFactory.prototype.build = function (settings) {
|
|
3097
|
+
var source = new Static__default["default"]({
|
|
3098
|
+
url: settings.url,
|
|
3099
|
+
interpolate: settings.interpolate,
|
|
3100
|
+
crossOrigin: 'Anonymous',
|
|
3101
|
+
projection: proj.get(settings.projection),
|
|
3102
|
+
imageExtent: settings.extent,
|
|
3103
|
+
});
|
|
3104
|
+
return new ImageLayer__default["default"]({ source: source });
|
|
3105
|
+
};
|
|
3106
|
+
return ImageLayerFactory;
|
|
3107
|
+
}());
|
|
3108
|
+
ImageLayerFactory.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ImageLayerFactory, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3109
|
+
ImageLayerFactory.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ImageLayerFactory, providedIn: 'root' });
|
|
3110
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ImageLayerFactory, decorators: [{
|
|
3111
|
+
type: i0.Injectable,
|
|
3112
|
+
args: [{
|
|
3113
|
+
providedIn: 'root',
|
|
3114
|
+
}]
|
|
3115
|
+
}] });
|
|
3116
|
+
|
|
3117
|
+
var ImageLayerComponent = /** @class */ (function (_super) {
|
|
3118
|
+
__extends(ImageLayerComponent, _super);
|
|
3119
|
+
function ImageLayerComponent(postboy, factory) {
|
|
3120
|
+
var _this = _super.call(this) || this;
|
|
3121
|
+
_this.postboy = postboy;
|
|
3122
|
+
_this.factory = factory;
|
|
3123
|
+
_this._settings = new ImageLayerSettings();
|
|
3124
|
+
_this.onDestroy = function () { return _this.removeLayer(); };
|
|
3125
|
+
return _this;
|
|
3126
|
+
}
|
|
3127
|
+
Object.defineProperty(ImageLayerComponent.prototype, "settings", {
|
|
3128
|
+
set: function (value) {
|
|
3129
|
+
if (!value || this._settings.isSame(value))
|
|
3130
|
+
return;
|
|
3131
|
+
this._settings = value;
|
|
3132
|
+
this.initLayer();
|
|
3133
|
+
},
|
|
3134
|
+
enumerable: false,
|
|
3135
|
+
configurable: true
|
|
3136
|
+
});
|
|
3137
|
+
ImageLayerComponent.prototype.ngOnInit = function () {
|
|
3138
|
+
var _this = this;
|
|
3139
|
+
this.postboy
|
|
3140
|
+
.sub(MapRenderedEvent)
|
|
3141
|
+
.pipe(operators.filter(function (m) { return !!m; }), operators.first())
|
|
3142
|
+
.subscribe(function (m) { return _this.initLayer(); });
|
|
3143
|
+
};
|
|
3144
|
+
ImageLayerComponent.prototype.initLayer = function () {
|
|
3145
|
+
this.removeLayer();
|
|
3146
|
+
this.layer = this.factory.build(this._settings);
|
|
3147
|
+
this.postboy.fire(new AddImageLayerCommand(this.layer));
|
|
3148
|
+
};
|
|
3149
|
+
ImageLayerComponent.prototype.removeLayer = function () {
|
|
3150
|
+
if (this.layer)
|
|
3151
|
+
this.postboy.fire(new RemoveImageLayerCommand(this.layer));
|
|
3152
|
+
};
|
|
3153
|
+
return ImageLayerComponent;
|
|
3154
|
+
}(DestructibleComponent));
|
|
3155
|
+
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 });
|
|
3156
|
+
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 });
|
|
3157
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ImageLayerComponent, decorators: [{
|
|
3158
|
+
type: i0.Component,
|
|
3159
|
+
args: [{
|
|
3160
|
+
selector: 'art-image-layer',
|
|
3161
|
+
template: '',
|
|
3162
|
+
styleUrls: [],
|
|
3163
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3164
|
+
}]
|
|
3165
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }, { type: ImageLayerFactory }]; }, propDecorators: { settings: [{
|
|
3166
|
+
type: i0.Input
|
|
3167
|
+
}] } });
|
|
3168
|
+
|
|
3169
|
+
var RasterTileLayerSettings = /** @class */ (function () {
|
|
3170
|
+
function RasterTileLayerSettings() {
|
|
3171
|
+
/**
|
|
3172
|
+
* The maximum zoom level for a map view.
|
|
3173
|
+
*
|
|
3174
|
+
* @type {number}
|
|
3175
|
+
* @default 19
|
|
3176
|
+
*/
|
|
3177
|
+
this.maxZoom = 19;
|
|
3178
|
+
/**
|
|
3179
|
+
* The minimum zoom level allowed.
|
|
3180
|
+
*
|
|
3181
|
+
* @type {number}
|
|
3182
|
+
*/
|
|
3183
|
+
this.minZoom = 0;
|
|
3184
|
+
/**
|
|
3185
|
+
* The opacity of an element.
|
|
3186
|
+
*
|
|
3187
|
+
* @type {number}
|
|
3188
|
+
* @default 0.6
|
|
3189
|
+
*/
|
|
3190
|
+
this.opacity = 0.6;
|
|
3191
|
+
/**
|
|
3192
|
+
* Represents the tiles URL.
|
|
3193
|
+
* @typedef {string} url
|
|
3194
|
+
*
|
|
3195
|
+
* @example
|
|
3196
|
+
* 'https://example.ex/{z}/{x}/{y}.png'
|
|
3197
|
+
*/
|
|
3198
|
+
this.url = '';
|
|
3199
|
+
/**
|
|
3200
|
+
* The projection of the coordinate system.
|
|
3201
|
+
*
|
|
3202
|
+
* @type {string}
|
|
3203
|
+
* @default 'EPSG:3857'
|
|
3204
|
+
*/
|
|
3205
|
+
this.projection = 'EPSG:3857';
|
|
3206
|
+
/**
|
|
3207
|
+
* Additional headers that should be added to each tile request
|
|
3208
|
+
*
|
|
3209
|
+
* @type {Record<string, string>}
|
|
3210
|
+
* @default An empty array
|
|
3211
|
+
*/
|
|
3212
|
+
this.requestHeaders = null;
|
|
3213
|
+
this.operation = function (d) { var _a; return (_a = d[0]) !== null && _a !== void 0 ? _a : []; };
|
|
3214
|
+
}
|
|
3215
|
+
/**
|
|
3216
|
+
* Creates a copy of the given tile layer settings.
|
|
3217
|
+
*
|
|
3218
|
+
* @param {RasterTileLayerSettings} model - The tile layer settings to be copied.
|
|
3219
|
+
* @return {RasterTileLayerSettings} - A new instance of RasterTileLayerSettings with the same properties as the model.
|
|
3220
|
+
*/
|
|
3221
|
+
RasterTileLayerSettings.copy = function (model) {
|
|
3222
|
+
var result = new RasterTileLayerSettings();
|
|
3223
|
+
result.maxZoom = model.maxZoom;
|
|
3224
|
+
result.minZoom = model.minZoom;
|
|
3225
|
+
result.projection = model.projection;
|
|
3226
|
+
result.opacity = model.opacity;
|
|
3227
|
+
result.url = model.url;
|
|
3228
|
+
result.requestHeaders = model.requestHeaders;
|
|
3229
|
+
result.operation = model.operation;
|
|
3230
|
+
return result;
|
|
3231
|
+
};
|
|
3232
|
+
/**
|
|
3233
|
+
* Sets the URL of the RasterTileLayerSettings object.
|
|
3234
|
+
*
|
|
3235
|
+
* @param {string} url - The URL to be set.
|
|
3236
|
+
* @return {RasterTileLayerSettings} - The updated RasterTileLayerSettings object.
|
|
3237
|
+
*/
|
|
3238
|
+
RasterTileLayerSettings.prototype.setUrl = function (url) {
|
|
3239
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { url: url }));
|
|
3240
|
+
};
|
|
3241
|
+
/**
|
|
3242
|
+
* Sets the operation to apply on raster tile data.
|
|
3243
|
+
*
|
|
3244
|
+
* @param {function} operation - A function that takes an input of either a two-dimensional array of numbers or an array of ImageData objects and returns either a one-dimensional array of numbers or an ImageData object.
|
|
3245
|
+
* @return {RasterTileLayerSettings} A new instance of RasterTileLayerSettings with the updated operation.
|
|
3246
|
+
*/
|
|
3247
|
+
RasterTileLayerSettings.prototype.setOperation = function (operation) {
|
|
3248
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { operation: operation }));
|
|
3249
|
+
};
|
|
3250
|
+
/**
|
|
3251
|
+
* Sets the requestHeaders of the RasterTileLayerSettings object.
|
|
3252
|
+
*
|
|
3253
|
+
* @param {Record<string, string>} requestHeaders - The headers which should be provided.
|
|
3254
|
+
* @return {RasterTileLayerSettings} - The updated RasterTileLayerSettings object.
|
|
3255
|
+
*/
|
|
3256
|
+
RasterTileLayerSettings.prototype.setRequestHeaders = function (requestHeaders) {
|
|
3257
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { requestHeaders: requestHeaders }));
|
|
3258
|
+
};
|
|
3259
|
+
/**
|
|
3260
|
+
* Sets the maximum zoom level for the tile layer.
|
|
3261
|
+
*
|
|
3262
|
+
* @param {number} maxZoom - The maximum zoom level.
|
|
3263
|
+
* @returns {RasterTileLayerSettings} - The updated tile layer settings object.
|
|
3264
|
+
*/
|
|
3265
|
+
RasterTileLayerSettings.prototype.setMaxZoom = function (maxZoom) {
|
|
3266
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom: maxZoom }));
|
|
3267
|
+
};
|
|
3268
|
+
/**
|
|
3269
|
+
* Sets the minimum zoom level for the Tile Layer.
|
|
3270
|
+
*
|
|
3271
|
+
* @param {number} minZoom - The minimum zoom level to be set.
|
|
3272
|
+
* @return {RasterTileLayerSettings} The modified RasterTileLayerSettings object with the updated minimum zoom level.
|
|
3273
|
+
*/
|
|
3274
|
+
RasterTileLayerSettings.prototype.setMinZoom = function (minZoom) {
|
|
3275
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom: minZoom }));
|
|
3276
|
+
};
|
|
3277
|
+
/**
|
|
3278
|
+
* Sets the opacity of the RasterTileLayerSettings.
|
|
3279
|
+
*
|
|
3280
|
+
* @param {number} opacity - The opacity value to set. Must be a number between 0 and 1.
|
|
3281
|
+
* @return {RasterTileLayerSettings} - A new instance of RasterTileLayerSettings with the opacity set.
|
|
3282
|
+
*/
|
|
3283
|
+
RasterTileLayerSettings.prototype.setOpacity = function (opacity) {
|
|
3284
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { opacity: opacity }));
|
|
3285
|
+
};
|
|
3286
|
+
/**
|
|
3287
|
+
* Sets the projection for the tile layer settings.
|
|
3288
|
+
*
|
|
3289
|
+
* @param {string} projection - The desired projection for the tile layer settings.
|
|
3290
|
+
* @return {RasterTileLayerSettings} - The updated tile layer settings with the new projection.
|
|
3291
|
+
*/
|
|
3292
|
+
RasterTileLayerSettings.prototype.setProjection = function (projection) {
|
|
3293
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { projection: projection }));
|
|
3294
|
+
};
|
|
3295
|
+
/**
|
|
3296
|
+
* Checks if the current instance of RasterTileLayerSettings is equal to the given model.
|
|
3297
|
+
* @param {RasterTileLayerSettings} model - The model to compare against.
|
|
3298
|
+
* @return {boolean} - True if all properties of the current instance matches the properties of the model;
|
|
3299
|
+
* otherwise, false.
|
|
3300
|
+
*/
|
|
3301
|
+
RasterTileLayerSettings.prototype.isSame = function (model) {
|
|
3302
|
+
if (this.maxZoom !== model.maxZoom)
|
|
3303
|
+
return false;
|
|
3304
|
+
if (this.minZoom !== model.minZoom)
|
|
3305
|
+
return false;
|
|
3306
|
+
if (this.url !== model.url)
|
|
3307
|
+
return false;
|
|
3308
|
+
if (this.projection !== model.projection)
|
|
3309
|
+
return false;
|
|
3310
|
+
if (this.opacity !== model.opacity)
|
|
3311
|
+
return false;
|
|
3312
|
+
if (this.requestHeaders !== model.requestHeaders)
|
|
3313
|
+
return false;
|
|
3314
|
+
if (this.operation !== model.operation)
|
|
3315
|
+
return false;
|
|
3316
|
+
return true;
|
|
3317
|
+
};
|
|
3318
|
+
return RasterTileLayerSettings;
|
|
3319
|
+
}());
|
|
3320
|
+
|
|
3321
|
+
var RasterTileLayerFactory = /** @class */ (function () {
|
|
3322
|
+
function RasterTileLayerFactory() {
|
|
3323
|
+
}
|
|
3324
|
+
RasterTileLayerFactory.prototype.build = function (settings) {
|
|
3325
|
+
var _this = this;
|
|
3326
|
+
var source$1 = new source.XYZ({
|
|
3327
|
+
tileSize: 256,
|
|
3328
|
+
maxZoom: settings.maxZoom || 14,
|
|
3329
|
+
minZoom: settings.minZoom || 1,
|
|
3330
|
+
projection: proj.get(settings.projection),
|
|
3331
|
+
tileUrlFunction: this.getTileFunc(settings),
|
|
3332
|
+
crossOrigin: 'Anonymous',
|
|
3333
|
+
tileLoadFunction: !!settings.requestHeaders
|
|
3334
|
+
? function (tile, src) { return _this.tileLoader(tile, src, settings.requestHeaders); }
|
|
3335
|
+
: undefined,
|
|
3336
|
+
});
|
|
3337
|
+
var raster = new RasterSource__default["default"]({
|
|
3338
|
+
sources: [source$1],
|
|
3339
|
+
operationType: 'image',
|
|
3340
|
+
operation: settings.operation,
|
|
3341
|
+
});
|
|
3342
|
+
return new ImageLayer__default["default"]({ source: raster, opacity: settings.opacity });
|
|
3343
|
+
};
|
|
3344
|
+
RasterTileLayerFactory.prototype.getTileFunc = function (settings) {
|
|
3345
|
+
var _this = this;
|
|
3346
|
+
return function (tileCoord) {
|
|
3347
|
+
var zoom = tileCoord[0];
|
|
3348
|
+
var x = tileCoord[1];
|
|
3349
|
+
var y = tileCoord[2];
|
|
3350
|
+
var normalizedCoord = _this.getNormalizedCoord({ x: x, y: y }, zoom);
|
|
3351
|
+
var bound = 1 << zoom;
|
|
3352
|
+
return settings.url
|
|
3353
|
+
.replace('{x}', String((normalizedCoord === null || normalizedCoord === void 0 ? void 0 : normalizedCoord.x) || x))
|
|
3354
|
+
.replace('{z}', String(zoom))
|
|
3355
|
+
.replace('{y}', String(bound - ((normalizedCoord === null || normalizedCoord === void 0 ? void 0 : normalizedCoord.y) || y) - 1));
|
|
3356
|
+
};
|
|
3357
|
+
};
|
|
3358
|
+
RasterTileLayerFactory.prototype.tileLoader = function (tile, src, headers) {
|
|
3359
|
+
var client = new XMLHttpRequest();
|
|
3360
|
+
client.open('GET', src);
|
|
3361
|
+
client.responseType = 'arraybuffer';
|
|
3362
|
+
Object.keys(headers).forEach(function (k) { return client.setRequestHeader(k, headers[k]); });
|
|
3363
|
+
client.onload = function () {
|
|
3364
|
+
if (this.response !== undefined) {
|
|
3365
|
+
var arrayBufferView = new Uint8Array(this.response);
|
|
3366
|
+
var blob = new Blob([arrayBufferView], { type: 'image/png' });
|
|
3367
|
+
var urlCreator = window.URL || window.webkitURL;
|
|
3368
|
+
tile.getImage().src = urlCreator.createObjectURL(blob);
|
|
3369
|
+
}
|
|
3370
|
+
};
|
|
3371
|
+
client.send();
|
|
3372
|
+
};
|
|
3373
|
+
RasterTileLayerFactory.prototype.getNormalizedCoord = function (coord, zoom) {
|
|
3374
|
+
var y = coord.y;
|
|
3375
|
+
var x = coord.x;
|
|
3376
|
+
var tileRange = 1 << zoom;
|
|
3377
|
+
if (y < 0 || y >= tileRange)
|
|
3378
|
+
return null;
|
|
3379
|
+
if (x < 0 || x >= tileRange)
|
|
3380
|
+
x = ((x % tileRange) + tileRange) % tileRange;
|
|
3381
|
+
return { x: x, y: y };
|
|
3382
|
+
};
|
|
3383
|
+
return RasterTileLayerFactory;
|
|
3384
|
+
}());
|
|
3385
|
+
RasterTileLayerFactory.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RasterTileLayerFactory, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
3386
|
+
RasterTileLayerFactory.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RasterTileLayerFactory, providedIn: 'root' });
|
|
3387
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RasterTileLayerFactory, decorators: [{
|
|
3388
|
+
type: i0.Injectable,
|
|
3389
|
+
args: [{
|
|
3390
|
+
providedIn: 'root',
|
|
3391
|
+
}]
|
|
3392
|
+
}] });
|
|
3393
|
+
|
|
3394
|
+
var RasterTileLayerComponent = /** @class */ (function (_super) {
|
|
3395
|
+
__extends(RasterTileLayerComponent, _super);
|
|
3396
|
+
function RasterTileLayerComponent(postboy, factory) {
|
|
3397
|
+
var _this = _super.call(this) || this;
|
|
3398
|
+
_this.postboy = postboy;
|
|
3399
|
+
_this.factory = factory;
|
|
3400
|
+
_this._settings = new RasterTileLayerSettings();
|
|
3401
|
+
_this.onDestroy = function () { return _this.removeLayer(); };
|
|
3402
|
+
return _this;
|
|
3403
|
+
}
|
|
3404
|
+
Object.defineProperty(RasterTileLayerComponent.prototype, "settings", {
|
|
3405
|
+
set: function (value) {
|
|
3406
|
+
if (!value || this._settings.isSame(value))
|
|
3407
|
+
return;
|
|
3408
|
+
this._settings = value;
|
|
3409
|
+
this.initLayer();
|
|
3410
|
+
},
|
|
3411
|
+
enumerable: false,
|
|
3412
|
+
configurable: true
|
|
3413
|
+
});
|
|
3414
|
+
RasterTileLayerComponent.prototype.ngOnInit = function () {
|
|
3415
|
+
var _this = this;
|
|
3416
|
+
this.postboy
|
|
3417
|
+
.sub(MapRenderedEvent)
|
|
3418
|
+
.pipe(operators.filter(function (m) { return !!m; }), operators.first())
|
|
3419
|
+
.subscribe(function (m) { return _this.initLayer(); });
|
|
3420
|
+
};
|
|
3421
|
+
RasterTileLayerComponent.prototype.initLayer = function () {
|
|
3422
|
+
this.removeLayer();
|
|
3423
|
+
this.layer = this.factory.build(this._settings);
|
|
3424
|
+
this.postboy.fire(new AddRasterTileCommand(this.layer));
|
|
3425
|
+
};
|
|
3426
|
+
RasterTileLayerComponent.prototype.removeLayer = function () {
|
|
3427
|
+
if (this.layer)
|
|
3428
|
+
this.postboy.fire(new RemoveRasterTileCommand(this.layer));
|
|
3429
|
+
};
|
|
3430
|
+
return RasterTileLayerComponent;
|
|
3431
|
+
}(DestructibleComponent));
|
|
3432
|
+
RasterTileLayerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RasterTileLayerComponent, deps: [{ token: MapPostboyService }, { token: RasterTileLayerFactory }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3433
|
+
RasterTileLayerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RasterTileLayerComponent, selector: "art-raster-tile-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0__namespace, template: '', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
3434
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RasterTileLayerComponent, decorators: [{
|
|
3435
|
+
type: i0.Component,
|
|
3436
|
+
args: [{
|
|
3437
|
+
selector: 'art-raster-tile-layer',
|
|
3438
|
+
template: '',
|
|
3439
|
+
styleUrls: [],
|
|
3440
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3441
|
+
}]
|
|
3442
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }, { type: RasterTileLayerFactory }]; }, propDecorators: { settings: [{
|
|
3443
|
+
type: i0.Input
|
|
3444
|
+
}] } });
|
|
3445
|
+
|
|
2885
3446
|
var MapPlateFactory = /** @class */ (function () {
|
|
2886
3447
|
function MapPlateFactory() {
|
|
2887
3448
|
}
|
|
@@ -3436,14 +3997,18 @@
|
|
|
3436
3997
|
TooltipComponent,
|
|
3437
3998
|
PolygonsComponent,
|
|
3438
3999
|
ClusterLayerComponent,
|
|
3439
|
-
MapControlZoomComponent
|
|
4000
|
+
MapControlZoomComponent,
|
|
4001
|
+
ImageLayerComponent,
|
|
4002
|
+
RasterTileLayerComponent], imports: [i6.CommonModule], exports: [MapPlateComponent,
|
|
3440
4003
|
FeatureLayerComponent,
|
|
3441
4004
|
MarkersComponent,
|
|
3442
4005
|
TileLayerComponent,
|
|
3443
4006
|
TooltipComponent,
|
|
3444
4007
|
PolygonsComponent,
|
|
3445
4008
|
ClusterLayerComponent,
|
|
3446
|
-
MapControlZoomComponent
|
|
4009
|
+
MapControlZoomComponent,
|
|
4010
|
+
ImageLayerComponent,
|
|
4011
|
+
RasterTileLayerComponent] });
|
|
3447
4012
|
MapModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapModule, imports: [[i6.CommonModule]] });
|
|
3448
4013
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MapModule, decorators: [{
|
|
3449
4014
|
type: i0.NgModule,
|
|
@@ -3460,6 +4025,8 @@
|
|
|
3460
4025
|
PolygonsComponent,
|
|
3461
4026
|
ClusterLayerComponent,
|
|
3462
4027
|
MapControlZoomComponent,
|
|
4028
|
+
ImageLayerComponent,
|
|
4029
|
+
RasterTileLayerComponent,
|
|
3463
4030
|
],
|
|
3464
4031
|
exports: [
|
|
3465
4032
|
MapPlateComponent,
|
|
@@ -3470,6 +4037,8 @@
|
|
|
3470
4037
|
PolygonsComponent,
|
|
3471
4038
|
ClusterLayerComponent,
|
|
3472
4039
|
MapControlZoomComponent,
|
|
4040
|
+
ImageLayerComponent,
|
|
4041
|
+
RasterTileLayerComponent,
|
|
3473
4042
|
],
|
|
3474
4043
|
}]
|
|
3475
4044
|
}] });
|
|
@@ -3683,6 +4252,10 @@
|
|
|
3683
4252
|
* Generated bundle index. Do not edit.
|
|
3684
4253
|
*/
|
|
3685
4254
|
|
|
4255
|
+
Object.defineProperty(exports, 'Feature', {
|
|
4256
|
+
enumerable: true,
|
|
4257
|
+
get: function () { return ol.Feature; }
|
|
4258
|
+
});
|
|
3686
4259
|
Object.defineProperty(exports, 'Style', {
|
|
3687
4260
|
enumerable: true,
|
|
3688
4261
|
get: function () { return style.Style; }
|
|
@@ -3704,6 +4277,8 @@
|
|
|
3704
4277
|
exports.GetFeaturesInAreaQuery = GetFeaturesInAreaQuery;
|
|
3705
4278
|
exports.GetFeaturesInPointQuery = GetFeaturesInPointQuery;
|
|
3706
4279
|
exports.GetMapPositionExecutor = GetMapPositionExecutor;
|
|
4280
|
+
exports.ImageLayerComponent = ImageLayerComponent;
|
|
4281
|
+
exports.ImageLayerSettings = ImageLayerSettings;
|
|
3707
4282
|
exports.MapClickEvent = MapClickEvent;
|
|
3708
4283
|
exports.MapConstants = MapConstants;
|
|
3709
4284
|
exports.MapControl = MapControl;
|
|
@@ -3727,6 +4302,8 @@
|
|
|
3727
4302
|
exports.PolygonSelfIntersectionExecutor = PolygonSelfIntersectionExecutor;
|
|
3728
4303
|
exports.PolygonStyleHelper = PolygonStyleHelper;
|
|
3729
4304
|
exports.PolygonsComponent = PolygonsComponent;
|
|
4305
|
+
exports.RasterTileLayerComponent = RasterTileLayerComponent;
|
|
4306
|
+
exports.RasterTileLayerSettings = RasterTileLayerSettings;
|
|
3730
4307
|
exports.RemoveControlCommand = RemoveControlCommand;
|
|
3731
4308
|
exports.SetMapCenterCommand = SetMapCenterCommand;
|
|
3732
4309
|
exports.StartDrawingCommand = StartDrawingCommand;
|