@artstesh/maps 4.1.27 → 4.1.28
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/esm2020/map/map-plate/layers/index.mjs +3 -1
- package/dist/esm2020/map/map-plate/layers/raster-tile/raster-tile-layer.component.mjs +49 -0
- package/dist/esm2020/map/map-plate/layers/raster-tile/raster-tile-layer.factory.mjs +74 -0
- package/dist/esm2020/map/map-plate/layers/raster-tile/raster-tile-layer.settings.mjs +151 -0
- package/dist/esm2020/map/map.module.mjs +8 -3
- package/dist/esm2020/map/messages/commands/add-raster-tile-command.mjs +9 -0
- package/dist/esm2020/map/messages/commands/remove-raster-tile.command.mjs +9 -0
- package/dist/esm2020/map/ol-proxy.mjs +3 -0
- package/dist/esm2020/map/public-api.mjs +2 -2
- package/dist/esm2020/map/services/map-management.service.mjs +18 -9
- package/dist/esm2020/map/services/message-registrator.service.mjs +5 -1
- package/dist/esm2020/src/map/map-plate/layers/index.mjs +3 -1
- package/dist/esm2020/src/map/map-plate/layers/raster-tile/raster-tile-layer.component.mjs +49 -0
- package/dist/esm2020/src/map/map-plate/layers/raster-tile/raster-tile-layer.factory.mjs +74 -0
- package/dist/esm2020/src/map/map-plate/layers/raster-tile/raster-tile-layer.settings.mjs +151 -0
- package/dist/esm2020/src/map/map.module.mjs +8 -3
- package/dist/esm2020/src/map/messages/commands/add-raster-tile-command.mjs +9 -0
- package/dist/esm2020/src/map/messages/commands/remove-raster-tile.command.mjs +9 -0
- package/dist/esm2020/src/map/ol-proxy.mjs +3 -0
- package/dist/esm2020/src/map/public-api.mjs +2 -2
- package/dist/esm2020/src/map/services/map-management.service.mjs +18 -9
- package/dist/esm2020/src/map/services/message-registrator.service.mjs +5 -1
- package/dist/fesm2015/maps-components-src-map.mjs +300 -11
- package/dist/fesm2015/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2015/maps-components.mjs +300 -11
- package/dist/fesm2015/maps-components.mjs.map +1 -1
- package/dist/fesm2020/maps-components-src-map.mjs +300 -11
- package/dist/fesm2020/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2020/maps-components.mjs +300 -11
- package/dist/fesm2020/maps-components.mjs.map +1 -1
- package/dist/map/map-plate/layers/index.d.ts +2 -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 +3 -2
- package/dist/map/messages/commands/add-raster-tile-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 +0 -1
- package/dist/package.json +1 -1
- package/dist/src/map/map-plate/layers/index.d.ts +2 -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 +3 -2
- package/dist/src/map/messages/commands/add-raster-tile-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 +0 -1
- package/package.json +2 -2
|
@@ -3,6 +3,7 @@ import { Component, Injectable, ChangeDetectionStrategy, Input, ViewChild, NgMod
|
|
|
3
3
|
import * as i4 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { Feature, Collection } from 'ol';
|
|
6
|
+
export { Feature } from 'ol';
|
|
6
7
|
import { Point, LineString } from 'ol/geom';
|
|
7
8
|
import { GeoJSON, WKT } from 'ol/format';
|
|
8
9
|
import { getCenter, createEmpty, extend } from 'ol/extent';
|
|
@@ -24,6 +25,7 @@ import { bbox } from 'ol/loadingstrategy';
|
|
|
24
25
|
import Cluster from 'ol/source/Cluster';
|
|
25
26
|
import Static from 'ol/source/ImageStatic';
|
|
26
27
|
import ImageLayer from 'ol/layer/Image';
|
|
28
|
+
import RasterSource from 'ol/source/Raster';
|
|
27
29
|
import Map from 'ol/Map';
|
|
28
30
|
import View from 'ol/View';
|
|
29
31
|
import Overlay from 'ol/Overlay';
|
|
@@ -885,6 +887,22 @@ class RemoveImageLayerCommand extends PostboyGenericMessage {
|
|
|
885
887
|
}
|
|
886
888
|
RemoveImageLayerCommand.ID = 'c8e7efdb-17ff-4cf9-89be-e688b8de3b95';
|
|
887
889
|
|
|
890
|
+
class AddRasterTileCommand extends PostboyGenericMessage {
|
|
891
|
+
constructor(layer) {
|
|
892
|
+
super();
|
|
893
|
+
this.layer = layer;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
AddRasterTileCommand.ID = 'd33447fe-eec0-4205-9b5d-0d79ddc74ad7';
|
|
897
|
+
|
|
898
|
+
class RemoveRasterTileCommand extends PostboyGenericMessage {
|
|
899
|
+
constructor(layer) {
|
|
900
|
+
super();
|
|
901
|
+
this.layer = layer;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
RemoveRasterTileCommand.ID = 'd1c4bf6a-e2f2-4385-a7a2-cecb525f8939';
|
|
905
|
+
|
|
888
906
|
class MapPostboyService extends PostboyService {
|
|
889
907
|
constructor() {
|
|
890
908
|
super();
|
|
@@ -912,19 +930,11 @@ class MapManagementService {
|
|
|
912
930
|
this.observeRemoveLayer();
|
|
913
931
|
this.observePlaceFeatures();
|
|
914
932
|
this.observeAddTile();
|
|
915
|
-
this.observeRemoveTile();
|
|
916
933
|
this.observeLayerQuery();
|
|
917
934
|
this.observeFeaturesInArea();
|
|
918
935
|
this.observeFeaturesInPoint();
|
|
919
936
|
this.observeImageLayer();
|
|
920
937
|
}
|
|
921
|
-
observeRemoveTile() {
|
|
922
|
-
this.postboy.sub(RemoveTileCommand).subscribe((c) => {
|
|
923
|
-
if (!this.map)
|
|
924
|
-
return;
|
|
925
|
-
this.map.removeLayer(c.layer);
|
|
926
|
-
});
|
|
927
|
-
}
|
|
928
938
|
observeLayerQuery() {
|
|
929
939
|
this.postboy.sub(GetLayerQuery).subscribe((ev) => ev.finish(this.layers.take(ev.name)));
|
|
930
940
|
}
|
|
@@ -934,6 +944,21 @@ class MapManagementService {
|
|
|
934
944
|
return;
|
|
935
945
|
this.map.addLayer(c.layer);
|
|
936
946
|
});
|
|
947
|
+
this.postboy.sub(RemoveTileCommand).subscribe((c) => {
|
|
948
|
+
if (!this.map)
|
|
949
|
+
return;
|
|
950
|
+
this.map.removeLayer(c.layer);
|
|
951
|
+
});
|
|
952
|
+
this.postboy.sub(AddRasterTileCommand).subscribe((c) => {
|
|
953
|
+
if (!this.map)
|
|
954
|
+
return;
|
|
955
|
+
this.map.addLayer(c.layer);
|
|
956
|
+
});
|
|
957
|
+
this.postboy.sub(RemoveRasterTileCommand).subscribe((c) => {
|
|
958
|
+
if (!this.map)
|
|
959
|
+
return;
|
|
960
|
+
this.map.removeLayer(c.layer);
|
|
961
|
+
});
|
|
937
962
|
}
|
|
938
963
|
observeImageLayer() {
|
|
939
964
|
this.postboy.sub(AddImageLayerCommand).subscribe((c) => {
|
|
@@ -1391,6 +1416,8 @@ class MessageRegistratorService extends PostboyAbstractRegistrator {
|
|
|
1391
1416
|
this.recordSubject(AddLayerCommand);
|
|
1392
1417
|
this.recordSubject(RemoveLayerCommand);
|
|
1393
1418
|
this.recordSubject(AddTileCommand);
|
|
1419
|
+
this.recordSubject(AddRasterTileCommand);
|
|
1420
|
+
this.recordSubject(RemoveRasterTileCommand);
|
|
1394
1421
|
this.recordSubject(RemoveImageLayerCommand);
|
|
1395
1422
|
this.recordSubject(AddImageLayerCommand);
|
|
1396
1423
|
this.recordSubject(RemoveTileCommand);
|
|
@@ -2380,6 +2407,264 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2380
2407
|
type: Input
|
|
2381
2408
|
}] } });
|
|
2382
2409
|
|
|
2410
|
+
class RasterTileLayerSettings {
|
|
2411
|
+
constructor() {
|
|
2412
|
+
/**
|
|
2413
|
+
* The maximum zoom level for a map view.
|
|
2414
|
+
*
|
|
2415
|
+
* @type {number}
|
|
2416
|
+
* @default 19
|
|
2417
|
+
*/
|
|
2418
|
+
this.maxZoom = 19;
|
|
2419
|
+
/**
|
|
2420
|
+
* The minimum zoom level allowed.
|
|
2421
|
+
*
|
|
2422
|
+
* @type {number}
|
|
2423
|
+
*/
|
|
2424
|
+
this.minZoom = 0;
|
|
2425
|
+
/**
|
|
2426
|
+
* The opacity of an element.
|
|
2427
|
+
*
|
|
2428
|
+
* @type {number}
|
|
2429
|
+
* @default 0.6
|
|
2430
|
+
*/
|
|
2431
|
+
this.opacity = 0.6;
|
|
2432
|
+
/**
|
|
2433
|
+
* Represents the tiles URL.
|
|
2434
|
+
* @typedef {string} url
|
|
2435
|
+
*
|
|
2436
|
+
* @example
|
|
2437
|
+
* 'https://example.ex/{z}/{x}/{y}.png'
|
|
2438
|
+
*/
|
|
2439
|
+
this.url = '';
|
|
2440
|
+
/**
|
|
2441
|
+
* The projection of the coordinate system.
|
|
2442
|
+
*
|
|
2443
|
+
* @type {string}
|
|
2444
|
+
* @default 'EPSG:3857'
|
|
2445
|
+
*/
|
|
2446
|
+
this.projection = 'EPSG:3857';
|
|
2447
|
+
/**
|
|
2448
|
+
* Additional headers that should be added to each tile request
|
|
2449
|
+
*
|
|
2450
|
+
* @type {Record<string, string>}
|
|
2451
|
+
* @default An empty array
|
|
2452
|
+
*/
|
|
2453
|
+
this.requestHeaders = null;
|
|
2454
|
+
this.operation = (d) => { var _a; return (_a = d[0]) !== null && _a !== void 0 ? _a : []; };
|
|
2455
|
+
}
|
|
2456
|
+
/**
|
|
2457
|
+
* Creates a copy of the given tile layer settings.
|
|
2458
|
+
*
|
|
2459
|
+
* @param {RasterTileLayerSettings} model - The tile layer settings to be copied.
|
|
2460
|
+
* @return {RasterTileLayerSettings} - A new instance of RasterTileLayerSettings with the same properties as the model.
|
|
2461
|
+
*/
|
|
2462
|
+
static copy(model) {
|
|
2463
|
+
const result = new RasterTileLayerSettings();
|
|
2464
|
+
result.maxZoom = model.maxZoom;
|
|
2465
|
+
result.minZoom = model.minZoom;
|
|
2466
|
+
result.projection = model.projection;
|
|
2467
|
+
result.opacity = model.opacity;
|
|
2468
|
+
result.url = model.url;
|
|
2469
|
+
result.requestHeaders = model.requestHeaders;
|
|
2470
|
+
result.operation = model.operation;
|
|
2471
|
+
return result;
|
|
2472
|
+
}
|
|
2473
|
+
/**
|
|
2474
|
+
* Sets the URL of the RasterTileLayerSettings object.
|
|
2475
|
+
*
|
|
2476
|
+
* @param {string} url - The URL to be set.
|
|
2477
|
+
* @return {RasterTileLayerSettings} - The updated RasterTileLayerSettings object.
|
|
2478
|
+
*/
|
|
2479
|
+
setUrl(url) {
|
|
2480
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { url }));
|
|
2481
|
+
}
|
|
2482
|
+
/**
|
|
2483
|
+
* Sets the operation to apply on raster tile data.
|
|
2484
|
+
*
|
|
2485
|
+
* @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.
|
|
2486
|
+
* @return {RasterTileLayerSettings} A new instance of RasterTileLayerSettings with the updated operation.
|
|
2487
|
+
*/
|
|
2488
|
+
setOperation(operation) {
|
|
2489
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { operation }));
|
|
2490
|
+
}
|
|
2491
|
+
/**
|
|
2492
|
+
* Sets the requestHeaders of the RasterTileLayerSettings object.
|
|
2493
|
+
*
|
|
2494
|
+
* @param {Record<string, string>} requestHeaders - The headers which should be provided.
|
|
2495
|
+
* @return {RasterTileLayerSettings} - The updated RasterTileLayerSettings object.
|
|
2496
|
+
*/
|
|
2497
|
+
setRequestHeaders(requestHeaders) {
|
|
2498
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { requestHeaders }));
|
|
2499
|
+
}
|
|
2500
|
+
/**
|
|
2501
|
+
* Sets the maximum zoom level for the tile layer.
|
|
2502
|
+
*
|
|
2503
|
+
* @param {number} maxZoom - The maximum zoom level.
|
|
2504
|
+
* @returns {RasterTileLayerSettings} - The updated tile layer settings object.
|
|
2505
|
+
*/
|
|
2506
|
+
setMaxZoom(maxZoom) {
|
|
2507
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { maxZoom }));
|
|
2508
|
+
}
|
|
2509
|
+
/**
|
|
2510
|
+
* Sets the minimum zoom level for the Tile Layer.
|
|
2511
|
+
*
|
|
2512
|
+
* @param {number} minZoom - The minimum zoom level to be set.
|
|
2513
|
+
* @return {RasterTileLayerSettings} The modified RasterTileLayerSettings object with the updated minimum zoom level.
|
|
2514
|
+
*/
|
|
2515
|
+
setMinZoom(minZoom) {
|
|
2516
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { minZoom }));
|
|
2517
|
+
}
|
|
2518
|
+
/**
|
|
2519
|
+
* Sets the opacity of the RasterTileLayerSettings.
|
|
2520
|
+
*
|
|
2521
|
+
* @param {number} opacity - The opacity value to set. Must be a number between 0 and 1.
|
|
2522
|
+
* @return {RasterTileLayerSettings} - A new instance of RasterTileLayerSettings with the opacity set.
|
|
2523
|
+
*/
|
|
2524
|
+
setOpacity(opacity) {
|
|
2525
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { opacity }));
|
|
2526
|
+
}
|
|
2527
|
+
/**
|
|
2528
|
+
* Sets the projection for the tile layer settings.
|
|
2529
|
+
*
|
|
2530
|
+
* @param {string} projection - The desired projection for the tile layer settings.
|
|
2531
|
+
* @return {RasterTileLayerSettings} - The updated tile layer settings with the new projection.
|
|
2532
|
+
*/
|
|
2533
|
+
setProjection(projection) {
|
|
2534
|
+
return RasterTileLayerSettings.copy(Object.assign(Object.assign({}, this), { projection }));
|
|
2535
|
+
}
|
|
2536
|
+
/**
|
|
2537
|
+
* Checks if the current instance of RasterTileLayerSettings is equal to the given model.
|
|
2538
|
+
* @param {RasterTileLayerSettings} model - The model to compare against.
|
|
2539
|
+
* @return {boolean} - True if all properties of the current instance matches the properties of the model;
|
|
2540
|
+
* otherwise, false.
|
|
2541
|
+
*/
|
|
2542
|
+
isSame(model) {
|
|
2543
|
+
if (this.maxZoom !== model.maxZoom)
|
|
2544
|
+
return false;
|
|
2545
|
+
if (this.minZoom !== model.minZoom)
|
|
2546
|
+
return false;
|
|
2547
|
+
if (this.url !== model.url)
|
|
2548
|
+
return false;
|
|
2549
|
+
if (this.projection !== model.projection)
|
|
2550
|
+
return false;
|
|
2551
|
+
if (this.opacity !== model.opacity)
|
|
2552
|
+
return false;
|
|
2553
|
+
if (this.requestHeaders !== model.requestHeaders)
|
|
2554
|
+
return false;
|
|
2555
|
+
if (this.operation !== model.operation)
|
|
2556
|
+
return false;
|
|
2557
|
+
return true;
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
class RasterTileLayerFactory {
|
|
2562
|
+
build(settings) {
|
|
2563
|
+
const source = new XYZ({
|
|
2564
|
+
tileSize: 256,
|
|
2565
|
+
maxZoom: settings.maxZoom || 14,
|
|
2566
|
+
minZoom: settings.minZoom || 1,
|
|
2567
|
+
projection: get(settings.projection),
|
|
2568
|
+
tileUrlFunction: this.getTileFunc(settings),
|
|
2569
|
+
crossOrigin: 'Anonymous',
|
|
2570
|
+
tileLoadFunction: !!settings.requestHeaders
|
|
2571
|
+
? (tile, src) => this.tileLoader(tile, src, settings.requestHeaders)
|
|
2572
|
+
: undefined,
|
|
2573
|
+
});
|
|
2574
|
+
const raster = new RasterSource({
|
|
2575
|
+
sources: [source],
|
|
2576
|
+
operationType: 'image',
|
|
2577
|
+
operation: settings.operation,
|
|
2578
|
+
});
|
|
2579
|
+
return new ImageLayer({ source: raster, opacity: settings.opacity });
|
|
2580
|
+
}
|
|
2581
|
+
getTileFunc(settings) {
|
|
2582
|
+
return (tileCoord) => {
|
|
2583
|
+
const zoom = tileCoord[0];
|
|
2584
|
+
const x = tileCoord[1];
|
|
2585
|
+
const y = tileCoord[2];
|
|
2586
|
+
const normalizedCoord = this.getNormalizedCoord({ x: x, y: y }, zoom);
|
|
2587
|
+
const bound = 1 << zoom;
|
|
2588
|
+
return settings.url
|
|
2589
|
+
.replace('{x}', String((normalizedCoord === null || normalizedCoord === void 0 ? void 0 : normalizedCoord.x) || x))
|
|
2590
|
+
.replace('{z}', String(zoom))
|
|
2591
|
+
.replace('{y}', String(bound - ((normalizedCoord === null || normalizedCoord === void 0 ? void 0 : normalizedCoord.y) || y) - 1));
|
|
2592
|
+
};
|
|
2593
|
+
}
|
|
2594
|
+
tileLoader(tile, src, headers) {
|
|
2595
|
+
const client = new XMLHttpRequest();
|
|
2596
|
+
client.open('GET', src);
|
|
2597
|
+
client.responseType = 'arraybuffer';
|
|
2598
|
+
Object.keys(headers).forEach((k) => client.setRequestHeader(k, headers[k]));
|
|
2599
|
+
client.onload = function () {
|
|
2600
|
+
if (this.response !== undefined) {
|
|
2601
|
+
const arrayBufferView = new Uint8Array(this.response);
|
|
2602
|
+
const blob = new Blob([arrayBufferView], { type: 'image/png' });
|
|
2603
|
+
const urlCreator = window.URL || window.webkitURL;
|
|
2604
|
+
tile.getImage().src = urlCreator.createObjectURL(blob);
|
|
2605
|
+
}
|
|
2606
|
+
};
|
|
2607
|
+
client.send();
|
|
2608
|
+
}
|
|
2609
|
+
getNormalizedCoord(coord, zoom) {
|
|
2610
|
+
const y = coord.y;
|
|
2611
|
+
let x = coord.x;
|
|
2612
|
+
const tileRange = 1 << zoom;
|
|
2613
|
+
if (y < 0 || y >= tileRange)
|
|
2614
|
+
return null;
|
|
2615
|
+
if (x < 0 || x >= tileRange)
|
|
2616
|
+
x = ((x % tileRange) + tileRange) % tileRange;
|
|
2617
|
+
return { x: x, y: y };
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
RasterTileLayerFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RasterTileLayerFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2621
|
+
RasterTileLayerFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RasterTileLayerFactory, providedIn: 'root' });
|
|
2622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RasterTileLayerFactory, decorators: [{
|
|
2623
|
+
type: Injectable,
|
|
2624
|
+
args: [{
|
|
2625
|
+
providedIn: 'root',
|
|
2626
|
+
}]
|
|
2627
|
+
}] });
|
|
2628
|
+
|
|
2629
|
+
class RasterTileLayerComponent extends DestructibleComponent {
|
|
2630
|
+
constructor(postboy, factory) {
|
|
2631
|
+
super();
|
|
2632
|
+
this.postboy = postboy;
|
|
2633
|
+
this.factory = factory;
|
|
2634
|
+
this._settings = new RasterTileLayerSettings();
|
|
2635
|
+
this.onDestroy = () => this.removeLayer();
|
|
2636
|
+
}
|
|
2637
|
+
set settings(value) {
|
|
2638
|
+
if (!value || this._settings.isSame(value))
|
|
2639
|
+
return;
|
|
2640
|
+
this._settings = value;
|
|
2641
|
+
this.initLayer();
|
|
2642
|
+
}
|
|
2643
|
+
ngOnInit() {
|
|
2644
|
+
this.postboy
|
|
2645
|
+
.sub(MapRenderedEvent)
|
|
2646
|
+
.pipe(filter((m) => !!m), first())
|
|
2647
|
+
.subscribe((m) => this.initLayer());
|
|
2648
|
+
}
|
|
2649
|
+
initLayer() {
|
|
2650
|
+
this.removeLayer();
|
|
2651
|
+
this.layer = this.factory.build(this._settings);
|
|
2652
|
+
this.postboy.fire(new AddRasterTileCommand(this.layer));
|
|
2653
|
+
}
|
|
2654
|
+
removeLayer() {
|
|
2655
|
+
if (this.layer)
|
|
2656
|
+
this.postboy.fire(new RemoveRasterTileCommand(this.layer));
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
RasterTileLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RasterTileLayerComponent, deps: [{ token: MapPostboyService }, { token: RasterTileLayerFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
2660
|
+
RasterTileLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RasterTileLayerComponent, selector: "art-raster-tile-layer", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RasterTileLayerComponent, decorators: [{
|
|
2662
|
+
type: Component,
|
|
2663
|
+
args: [{ selector: 'art-raster-tile-layer', template: '', changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
2664
|
+
}], ctorParameters: function () { return [{ type: MapPostboyService }, { type: RasterTileLayerFactory }]; }, propDecorators: { settings: [{
|
|
2665
|
+
type: Input
|
|
2666
|
+
}] } });
|
|
2667
|
+
|
|
2383
2668
|
class MapPlateFactory {
|
|
2384
2669
|
build(settings) {
|
|
2385
2670
|
return new Map({
|
|
@@ -2858,7 +3143,8 @@ MapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
|
2858
3143
|
PolygonsComponent,
|
|
2859
3144
|
ClusterLayerComponent,
|
|
2860
3145
|
MapControlZoomComponent,
|
|
2861
|
-
ImageLayerComponent
|
|
3146
|
+
ImageLayerComponent,
|
|
3147
|
+
RasterTileLayerComponent], imports: [CommonModule], exports: [MapPlateComponent,
|
|
2862
3148
|
FeatureLayerComponent,
|
|
2863
3149
|
MarkersComponent,
|
|
2864
3150
|
TileLayerComponent,
|
|
@@ -2866,7 +3152,8 @@ MapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
|
2866
3152
|
PolygonsComponent,
|
|
2867
3153
|
ClusterLayerComponent,
|
|
2868
3154
|
MapControlZoomComponent,
|
|
2869
|
-
ImageLayerComponent
|
|
3155
|
+
ImageLayerComponent,
|
|
3156
|
+
RasterTileLayerComponent] });
|
|
2870
3157
|
MapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapModule, imports: [CommonModule] });
|
|
2871
3158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapModule, decorators: [{
|
|
2872
3159
|
type: NgModule,
|
|
@@ -2884,6 +3171,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2884
3171
|
ClusterLayerComponent,
|
|
2885
3172
|
MapControlZoomComponent,
|
|
2886
3173
|
ImageLayerComponent,
|
|
3174
|
+
RasterTileLayerComponent,
|
|
2887
3175
|
],
|
|
2888
3176
|
exports: [
|
|
2889
3177
|
MapPlateComponent,
|
|
@@ -2895,6 +3183,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2895
3183
|
ClusterLayerComponent,
|
|
2896
3184
|
MapControlZoomComponent,
|
|
2897
3185
|
ImageLayerComponent,
|
|
3186
|
+
RasterTileLayerComponent,
|
|
2898
3187
|
],
|
|
2899
3188
|
}]
|
|
2900
3189
|
}] });
|
|
@@ -3095,5 +3384,5 @@ class StringifyFeatureHelper {
|
|
|
3095
3384
|
* Generated bundle index. Do not edit.
|
|
3096
3385
|
*/
|
|
3097
3386
|
|
|
3098
|
-
export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FilterFeaturesInPointExecutor, FitToFeaturesCommand, FitToPolygonsCommand, GetFeaturesInAreaQuery, GetFeaturesInPointQuery, GetMapPositionExecutor, ImageLayerComponent, ImageLayerSettings, MapClickEvent, MapConstants, MapControl, MapControlZoomComponent, MapFeatureHoveredEvent, MapLyrs, MapLyrsLabel, MapModule, MapMoveEndEvent, MapPlateComponent, MapPointerMoveEvent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonSelfIntersectionExecutor, PolygonStyleHelper, PolygonsComponent, RemoveControlCommand, SetMapCenterCommand, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings, ZoomControlSettings };
|
|
3387
|
+
export { AddControlCommand, CalculateAreaExecutor, CancelDrawingCommand, CancelFeatureModificationCommand, CloseTooltipCommand, ClusterLayerComponent, ClusterLayerSettings, DrawSelectionAreaCommand, DrawingType, FeatureLayerComponent, FeatureLayerSettings, FeatureOutputFormat, FilterFeaturesInAreaExecutor, FilterFeaturesInPointExecutor, FitToFeaturesCommand, FitToPolygonsCommand, GetFeaturesInAreaQuery, GetFeaturesInPointQuery, GetMapPositionExecutor, ImageLayerComponent, ImageLayerSettings, MapClickEvent, MapConstants, MapControl, MapControlZoomComponent, MapFeatureHoveredEvent, MapLyrs, MapLyrsLabel, MapModule, MapMoveEndEvent, MapPlateComponent, MapPointerMoveEvent, MapPostboyService, MapRenderedEvent, MapSettings, MarkerModel, MarkerStyleHelper, MarkersComponent, MessageRegistratorService, ModifyFeatureCommand, OsmTileLayerComponent, PolygonModel, PolygonSelfIntersectionExecutor, PolygonStyleHelper, PolygonsComponent, RasterTileLayerComponent, RasterTileLayerSettings, RemoveControlCommand, SetMapCenterCommand, StartDrawingCommand, StringifyFeatureHelper, TextStyleHelper, TileLayerComponent, TileLayerSettings, TooltipComponent, TooltipSettings, ZoomControlSettings };
|
|
3099
3388
|
//# sourceMappingURL=maps-components.mjs.map
|