@artstesh/maps 6.1.6 → 6.1.8
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/esm2022/map/helpers/text-style.helper.mjs +15 -7
- package/dist/esm2022/map/map-plate/layers/index.mjs +3 -1
- package/dist/esm2022/map/map-plate/layers/raster-tile/raster-tile-layer.component.mjs +52 -0
- package/dist/esm2022/map/map-plate/layers/raster-tile/raster-tile-layer.factory.mjs +74 -0
- package/dist/esm2022/map/map-plate/layers/raster-tile/raster-tile-layer.settings.mjs +149 -0
- package/dist/esm2022/map/map.module.mjs +8 -3
- package/dist/esm2022/map/messages/commands/add-raster-tile-command.mjs +10 -0
- package/dist/esm2022/map/messages/commands/remove-raster-tile.command.mjs +10 -0
- package/dist/esm2022/map/messages/commands/start-drawing.command.mjs +1 -1
- package/dist/esm2022/map/messages/executors/generate-draw.executor.mjs +1 -1
- package/dist/esm2022/map/messages/executors/get-geometry-length.executor.mjs +18 -0
- package/dist/esm2022/map/messages/index.mjs +2 -1
- package/dist/esm2022/map/models/drawing-type.enum.mjs +2 -1
- package/dist/esm2022/map/ol-proxy.mjs +6 -0
- package/dist/esm2022/map/public-api.mjs +2 -2
- package/dist/esm2022/map/services/drawing/drawing-generation.service.mjs +2 -2
- package/dist/esm2022/map/services/map-management.service.mjs +18 -9
- package/dist/esm2022/map/services/message-registrator.service.mjs +7 -1
- package/dist/esm2022/src/map/helpers/text-style.helper.mjs +15 -7
- package/dist/esm2022/src/map/map-plate/layers/index.mjs +3 -1
- package/dist/esm2022/src/map/map-plate/layers/raster-tile/raster-tile-layer.component.mjs +52 -0
- package/dist/esm2022/src/map/map-plate/layers/raster-tile/raster-tile-layer.factory.mjs +74 -0
- package/dist/esm2022/src/map/map-plate/layers/raster-tile/raster-tile-layer.settings.mjs +149 -0
- package/dist/esm2022/src/map/map.module.mjs +8 -3
- package/dist/esm2022/src/map/messages/commands/add-raster-tile-command.mjs +10 -0
- package/dist/esm2022/src/map/messages/commands/remove-raster-tile.command.mjs +10 -0
- package/dist/esm2022/src/map/messages/commands/start-drawing.command.mjs +1 -1
- package/dist/esm2022/src/map/messages/executors/generate-draw.executor.mjs +1 -1
- package/dist/esm2022/src/map/messages/executors/get-geometry-length.executor.mjs +18 -0
- package/dist/esm2022/src/map/messages/index.mjs +2 -1
- package/dist/esm2022/src/map/models/drawing-type.enum.mjs +2 -1
- package/dist/esm2022/src/map/ol-proxy.mjs +6 -0
- package/dist/esm2022/src/map/public-api.mjs +2 -2
- package/dist/esm2022/src/map/services/drawing/drawing-generation.service.mjs +2 -2
- package/dist/esm2022/src/map/services/map-management.service.mjs +18 -9
- package/dist/esm2022/src/map/services/message-registrator.service.mjs +7 -1
- package/dist/fesm2022/maps-components-src-map.mjs +345 -23
- package/dist/fesm2022/maps-components-src-map.mjs.map +1 -1
- package/dist/fesm2022/maps-components.mjs +345 -23
- package/dist/fesm2022/maps-components.mjs.map +1 -1
- package/dist/map/helpers/text-style.helper.d.ts +10 -6
- 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/messages/commands/start-drawing.command.d.ts +3 -3
- package/dist/map/messages/executors/generate-draw.executor.d.ts +3 -3
- package/dist/map/messages/executors/get-geometry-length.executor.d.ts +11 -0
- package/dist/map/messages/index.d.ts +1 -0
- package/dist/map/models/drawing-type.enum.d.ts +2 -1
- package/dist/map/ol-proxy.d.ts +7 -0
- package/dist/map/public-api.d.ts +1 -1
- package/dist/map/services/map-management.service.d.ts +0 -1
- package/dist/src/map/helpers/text-style.helper.d.ts +10 -6
- 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/messages/commands/start-drawing.command.d.ts +3 -3
- package/dist/src/map/messages/executors/generate-draw.executor.d.ts +3 -3
- package/dist/src/map/messages/executors/get-geometry-length.executor.d.ts +11 -0
- package/dist/src/map/messages/index.d.ts +1 -0
- package/dist/src/map/models/drawing-type.enum.d.ts +2 -1
- package/dist/src/map/ol-proxy.d.ts +7 -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 +1 -1
|
@@ -4,12 +4,16 @@ import { Text } from 'ol/style';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare class TextStyleHelper {
|
|
6
6
|
/**
|
|
7
|
-
* Creates a new
|
|
7
|
+
* Creates and returns a new Text instance with specified styling properties.
|
|
8
8
|
*
|
|
9
|
-
* @param {string} text - The text content
|
|
10
|
-
* @param {string} font - The font style
|
|
11
|
-
* @param {string} color - The color of the
|
|
12
|
-
* @
|
|
9
|
+
* @param {string} text - The text content to display.
|
|
10
|
+
* @param {string} font - The font style to use for the text.
|
|
11
|
+
* @param {string} color - The color of the text.
|
|
12
|
+
* @param {string|null|undefined} [backColor] - The background color of the text. Optional.
|
|
13
|
+
* @param {number[]|null|undefined} [padding] - The padding around the text in pixels. Optional.
|
|
14
|
+
* @param {string|null|undefined} [textBaseline] - The text baseline alignment. Optional.
|
|
15
|
+
* @param {number|null|undefined} [offsetY] - The vertical offset for the text. Optional.
|
|
16
|
+
* @return {Text} A new Text instance configured with the specified properties.
|
|
13
17
|
*/
|
|
14
|
-
static get(text: string, font: string, color: string): Text;
|
|
18
|
+
static get(text: string, font: string, color: string, backColor?: string | null, padding?: number[] | null, textBaseline?: string | null, offsetY?: number | null): Text;
|
|
15
19
|
}
|
|
@@ -7,3 +7,5 @@ export * from './cluster-layer/cluster-layer.component';
|
|
|
7
7
|
export * from './cluster-layer/cluster-layer.settings';
|
|
8
8
|
export * from './image-layer/image-layer.component';
|
|
9
9
|
export * from './image-layer/image-layer.settings';
|
|
10
|
+
export * from './raster-tile/raster-tile-layer.component';
|
|
11
|
+
export * from './raster-tile/raster-tile-layer.settings';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DestructibleComponent } from '../../../common/destructible.component';
|
|
2
|
+
import { Raster } from 'ol/source';
|
|
3
|
+
import { MapPostboyService } from '../../../services/map-postboy.service';
|
|
4
|
+
import ImageLayer from 'ol/layer/Image';
|
|
5
|
+
import { RasterTileLayerFactory } from './raster-tile-layer.factory';
|
|
6
|
+
import { RasterTileLayerSettings } from './raster-tile-layer.settings';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class RasterTileLayerComponent extends DestructibleComponent {
|
|
9
|
+
private postboy;
|
|
10
|
+
private factory;
|
|
11
|
+
layer?: ImageLayer<Raster>;
|
|
12
|
+
constructor(postboy: MapPostboyService, factory: RasterTileLayerFactory);
|
|
13
|
+
_settings: RasterTileLayerSettings;
|
|
14
|
+
set settings(value: RasterTileLayerSettings | undefined);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
onDestroy: () => void;
|
|
17
|
+
private initLayer;
|
|
18
|
+
private removeLayer;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RasterTileLayerComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RasterTileLayerComponent, "art-raster-tile-layer", never, { "settings": { "alias": "settings"; "required": false; }; }, {}, never, never, false, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Raster } from 'ol/source';
|
|
2
|
+
import { RasterTileLayerSettings } from './raster-tile-layer.settings';
|
|
3
|
+
import ImageLayer from 'ol/layer/Image';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class RasterTileLayerFactory {
|
|
6
|
+
build(settings: RasterTileLayerSettings): ImageLayer<Raster>;
|
|
7
|
+
private getTileFunc;
|
|
8
|
+
private tileLoader;
|
|
9
|
+
private getNormalizedCoord;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RasterTileLayerFactory, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RasterTileLayerFactory>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export declare class RasterTileLayerSettings {
|
|
2
|
+
/**
|
|
3
|
+
* The maximum zoom level for a map view.
|
|
4
|
+
*
|
|
5
|
+
* @type {number}
|
|
6
|
+
* @default 19
|
|
7
|
+
*/
|
|
8
|
+
maxZoom: number;
|
|
9
|
+
/**
|
|
10
|
+
* The minimum zoom level allowed.
|
|
11
|
+
*
|
|
12
|
+
* @type {number}
|
|
13
|
+
*/
|
|
14
|
+
minZoom: number;
|
|
15
|
+
/**
|
|
16
|
+
* The opacity of an element.
|
|
17
|
+
*
|
|
18
|
+
* @type {number}
|
|
19
|
+
* @default 0.6
|
|
20
|
+
*/
|
|
21
|
+
opacity: number;
|
|
22
|
+
/**
|
|
23
|
+
* Represents the tiles URL.
|
|
24
|
+
* @typedef {string} url
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* 'https://example.ex/{z}/{x}/{y}.png'
|
|
28
|
+
*/
|
|
29
|
+
url: string;
|
|
30
|
+
/**
|
|
31
|
+
* The projection of the coordinate system.
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @default 'EPSG:3857'
|
|
35
|
+
*/
|
|
36
|
+
projection: string;
|
|
37
|
+
/**
|
|
38
|
+
* Additional headers that should be added to each tile request
|
|
39
|
+
*
|
|
40
|
+
* @type {Record<string, string>}
|
|
41
|
+
* @default An empty array
|
|
42
|
+
*/
|
|
43
|
+
requestHeaders: Record<string, string> | null;
|
|
44
|
+
operation: (data: number[][] | ImageData[]) => number[] | ImageData;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a copy of the given tile layer settings.
|
|
47
|
+
*
|
|
48
|
+
* @param {RasterTileLayerSettings} model - The tile layer settings to be copied.
|
|
49
|
+
* @return {RasterTileLayerSettings} - A new instance of RasterTileLayerSettings with the same properties as the model.
|
|
50
|
+
*/
|
|
51
|
+
static copy(model: RasterTileLayerSettings): RasterTileLayerSettings;
|
|
52
|
+
/**
|
|
53
|
+
* Sets the URL of the RasterTileLayerSettings object.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} url - The URL to be set.
|
|
56
|
+
* @return {RasterTileLayerSettings} - The updated RasterTileLayerSettings object.
|
|
57
|
+
*/
|
|
58
|
+
setUrl(url: string): RasterTileLayerSettings;
|
|
59
|
+
/**
|
|
60
|
+
* Sets the operation to apply on raster tile data.
|
|
61
|
+
*
|
|
62
|
+
* @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.
|
|
63
|
+
* @return {RasterTileLayerSettings} A new instance of RasterTileLayerSettings with the updated operation.
|
|
64
|
+
*/
|
|
65
|
+
setOperation(operation: (data: number[][] | ImageData[]) => number[] | ImageData): RasterTileLayerSettings;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the requestHeaders of the RasterTileLayerSettings object.
|
|
68
|
+
*
|
|
69
|
+
* @param {Record<string, string>} requestHeaders - The headers which should be provided.
|
|
70
|
+
* @return {RasterTileLayerSettings} - The updated RasterTileLayerSettings object.
|
|
71
|
+
*/
|
|
72
|
+
setRequestHeaders(requestHeaders: Record<string, string>): RasterTileLayerSettings;
|
|
73
|
+
/**
|
|
74
|
+
* Sets the maximum zoom level for the tile layer.
|
|
75
|
+
*
|
|
76
|
+
* @param {number} maxZoom - The maximum zoom level.
|
|
77
|
+
* @returns {RasterTileLayerSettings} - The updated tile layer settings object.
|
|
78
|
+
*/
|
|
79
|
+
setMaxZoom(maxZoom: number): RasterTileLayerSettings;
|
|
80
|
+
/**
|
|
81
|
+
* Sets the minimum zoom level for the Tile Layer.
|
|
82
|
+
*
|
|
83
|
+
* @param {number} minZoom - The minimum zoom level to be set.
|
|
84
|
+
* @return {RasterTileLayerSettings} The modified RasterTileLayerSettings object with the updated minimum zoom level.
|
|
85
|
+
*/
|
|
86
|
+
setMinZoom(minZoom: number): RasterTileLayerSettings;
|
|
87
|
+
/**
|
|
88
|
+
* Sets the opacity of the RasterTileLayerSettings.
|
|
89
|
+
*
|
|
90
|
+
* @param {number} opacity - The opacity value to set. Must be a number between 0 and 1.
|
|
91
|
+
* @return {RasterTileLayerSettings} - A new instance of RasterTileLayerSettings with the opacity set.
|
|
92
|
+
*/
|
|
93
|
+
setOpacity(opacity: number): RasterTileLayerSettings;
|
|
94
|
+
/**
|
|
95
|
+
* Sets the projection for the tile layer settings.
|
|
96
|
+
*
|
|
97
|
+
* @param {string} projection - The desired projection for the tile layer settings.
|
|
98
|
+
* @return {RasterTileLayerSettings} - The updated tile layer settings with the new projection.
|
|
99
|
+
*/
|
|
100
|
+
setProjection(projection: string): RasterTileLayerSettings;
|
|
101
|
+
/**
|
|
102
|
+
* Checks if the current instance of RasterTileLayerSettings is equal to the given model.
|
|
103
|
+
* @param {RasterTileLayerSettings} model - The model to compare against.
|
|
104
|
+
* @return {boolean} - True if all properties of the current instance matches the properties of the model;
|
|
105
|
+
* otherwise, false.
|
|
106
|
+
*/
|
|
107
|
+
isSame(model: RasterTileLayerSettings): boolean;
|
|
108
|
+
}
|
package/dist/map/map.module.d.ts
CHANGED
|
@@ -10,9 +10,10 @@ import * as i8 from "./map-plate/features/polygons/polygons.component";
|
|
|
10
10
|
import * as i9 from "./map-plate/layers/cluster-layer/cluster-layer.component";
|
|
11
11
|
import * as i10 from "./map-plate/controls/map-control-zoom/map-control-zoom.component";
|
|
12
12
|
import * as i11 from "./map-plate/layers/image-layer/image-layer.component";
|
|
13
|
-
import * as i12 from "
|
|
13
|
+
import * as i12 from "./map-plate/layers/raster-tile/raster-tile-layer.component";
|
|
14
|
+
import * as i13 from "@angular/common";
|
|
14
15
|
export declare class MapModule {
|
|
15
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<MapModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MapModule, [typeof i1.DestructibleComponent, typeof i2.MapPlateComponent, typeof i3.TileLayerComponent, typeof i4.OsmTileLayerComponent, typeof i5.FeatureLayerComponent, typeof i6.MarkersComponent, typeof i7.TooltipComponent, typeof i8.PolygonsComponent, typeof i9.ClusterLayerComponent, typeof i10.MapControlZoomComponent, typeof i11.ImageLayerComponent], [typeof
|
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MapModule, [typeof i1.DestructibleComponent, typeof i2.MapPlateComponent, typeof i3.TileLayerComponent, typeof i4.OsmTileLayerComponent, typeof i5.FeatureLayerComponent, typeof i6.MarkersComponent, typeof i7.TooltipComponent, typeof i8.PolygonsComponent, typeof i9.ClusterLayerComponent, typeof i10.MapControlZoomComponent, typeof i11.ImageLayerComponent, typeof i12.RasterTileLayerComponent], [typeof i13.CommonModule], [typeof i2.MapPlateComponent, typeof i5.FeatureLayerComponent, typeof i6.MarkersComponent, typeof i3.TileLayerComponent, typeof i7.TooltipComponent, typeof i8.PolygonsComponent, typeof i9.ClusterLayerComponent, typeof i10.MapControlZoomComponent, typeof i11.ImageLayerComponent, typeof i12.RasterTileLayerComponent]>;
|
|
17
18
|
static ɵinj: i0.ɵɵInjectorDeclaration<MapModule>;
|
|
18
19
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PostboyGenericMessage } from '@artstesh/postboy';
|
|
2
|
+
import ImageLayer from 'ol/layer/Image';
|
|
3
|
+
import { Raster } from 'ol/source';
|
|
4
|
+
export declare class AddRasterTileCommand extends PostboyGenericMessage {
|
|
5
|
+
layer: ImageLayer<Raster>;
|
|
6
|
+
static readonly ID = "d33447fe-eec0-4205-9b5d-0d79ddc74ad7";
|
|
7
|
+
constructor(layer: ImageLayer<Raster>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PostboyGenericMessage } from '@artstesh/postboy';
|
|
2
|
+
import ImageLayer from 'ol/layer/Image';
|
|
3
|
+
import { Raster } from 'ol/source';
|
|
4
|
+
export declare class RemoveRasterTileCommand extends PostboyGenericMessage {
|
|
5
|
+
layer: ImageLayer<Raster>;
|
|
6
|
+
static readonly ID = "d1c4bf6a-e2f2-4385-a7a2-cecb525f8939";
|
|
7
|
+
constructor(layer: ImageLayer<Raster>);
|
|
8
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PostboyCallbackMessage } from '@artstesh/postboy';
|
|
2
2
|
import { DrawingType, FeatureOutputFormat } from '../../models';
|
|
3
|
-
import
|
|
3
|
+
import { StyleLike } from 'ol/style/Style';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a command to start a drawing operation.
|
|
6
6
|
*/
|
|
7
7
|
export declare class StartDrawingCommand extends PostboyCallbackMessage<string | null> {
|
|
8
8
|
type: DrawingType;
|
|
9
|
-
style:
|
|
9
|
+
style: StyleLike;
|
|
10
10
|
format: FeatureOutputFormat;
|
|
11
11
|
static readonly ID = "4407e9ee-d6c3-4e77-8000-c1aae7433fb6";
|
|
12
12
|
/**
|
|
@@ -16,5 +16,5 @@ export declare class StartDrawingCommand extends PostboyCallbackMessage<string |
|
|
|
16
16
|
* @param {Style} style - The style defining visual appearance of the drawing.
|
|
17
17
|
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The format of the feature output. Defaults to GeoJson.
|
|
18
18
|
*/
|
|
19
|
-
constructor(type: DrawingType, style:
|
|
19
|
+
constructor(type: DrawingType, style: StyleLike, format?: FeatureOutputFormat);
|
|
20
20
|
}
|
|
@@ -3,11 +3,11 @@ import { Vector as Layer } from 'ol/layer';
|
|
|
3
3
|
import VectorSource from 'ol/source/Vector';
|
|
4
4
|
import { Draw } from 'ol/interaction';
|
|
5
5
|
import { DrawingType } from '../../models';
|
|
6
|
-
import
|
|
6
|
+
import { StyleLike } from 'ol/style/Style';
|
|
7
7
|
export declare class GenerateDrawExecutor extends PostboyExecutor<Draw> {
|
|
8
8
|
layer: Layer<VectorSource<any>>;
|
|
9
|
-
style:
|
|
9
|
+
style: StyleLike;
|
|
10
10
|
type: DrawingType;
|
|
11
11
|
static readonly ID = "5d5f0737-ff70-461e-9a2e-bf6166c914cb";
|
|
12
|
-
constructor(layer: Layer<VectorSource<any>>, style:
|
|
12
|
+
constructor(layer: Layer<VectorSource<any>>, style: StyleLike, type: DrawingType);
|
|
13
13
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PostboyExecutor } from '@artstesh/postboy';
|
|
2
|
+
import { Geometry } from 'ol/geom';
|
|
3
|
+
export declare class GetGeometryLengthExecutor extends PostboyExecutor<number> {
|
|
4
|
+
geometry: Geometry;
|
|
5
|
+
projection: string;
|
|
6
|
+
static readonly ID = "763146df-6d93-4dc2-a532-0e9ba2b2d023";
|
|
7
|
+
constructor(geometry: Geometry, projection?: string);
|
|
8
|
+
}
|
|
9
|
+
export declare class GetGeometryLengthExecutorHandler {
|
|
10
|
+
handle(executor: GetGeometryLengthExecutor): number;
|
|
11
|
+
}
|
|
@@ -21,3 +21,4 @@ export * from './executors/polygon-self-intersection.executor';
|
|
|
21
21
|
export * from './queries/get-features-in-area.query';
|
|
22
22
|
export * from './queries/get-features-in-point.query';
|
|
23
23
|
export * from './commands/fit-to-features.command';
|
|
24
|
+
export { GetGeometryLengthExecutor } from './executors/get-geometry-length.executor';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { FeatureLike } from 'ol/Feature';
|
|
2
|
+
export { Feature } from 'ol';
|
|
3
|
+
export { Style } from 'ol/style';
|
|
4
|
+
export { Fill, RegularShape, Stroke, Text } from 'ol/style';
|
|
5
|
+
export { StyleLike } from 'ol/style/Style';
|
|
6
|
+
export { Geometry, LineString, Point } from 'ol/geom';
|
|
7
|
+
export * as CircleStyle from 'ol/style/Circle';
|
package/dist/map/public-api.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export declare class MapManagementService implements IPostboyDependingService {
|
|
|
7
7
|
private layers;
|
|
8
8
|
constructor(postboy: MapPostboyService);
|
|
9
9
|
up(): void;
|
|
10
|
-
private observeRemoveTile;
|
|
11
10
|
private observeLayerQuery;
|
|
12
11
|
private observeAddTile;
|
|
13
12
|
private observeImageLayer;
|
|
@@ -4,12 +4,16 @@ import { Text } from 'ol/style';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare class TextStyleHelper {
|
|
6
6
|
/**
|
|
7
|
-
* Creates a new
|
|
7
|
+
* Creates and returns a new Text instance with specified styling properties.
|
|
8
8
|
*
|
|
9
|
-
* @param {string} text - The text content
|
|
10
|
-
* @param {string} font - The font style
|
|
11
|
-
* @param {string} color - The color of the
|
|
12
|
-
* @
|
|
9
|
+
* @param {string} text - The text content to display.
|
|
10
|
+
* @param {string} font - The font style to use for the text.
|
|
11
|
+
* @param {string} color - The color of the text.
|
|
12
|
+
* @param {string|null|undefined} [backColor] - The background color of the text. Optional.
|
|
13
|
+
* @param {number[]|null|undefined} [padding] - The padding around the text in pixels. Optional.
|
|
14
|
+
* @param {string|null|undefined} [textBaseline] - The text baseline alignment. Optional.
|
|
15
|
+
* @param {number|null|undefined} [offsetY] - The vertical offset for the text. Optional.
|
|
16
|
+
* @return {Text} A new Text instance configured with the specified properties.
|
|
13
17
|
*/
|
|
14
|
-
static get(text: string, font: string, color: string): Text;
|
|
18
|
+
static get(text: string, font: string, color: string, backColor?: string | null, padding?: number[] | null, textBaseline?: string | null, offsetY?: number | null): Text;
|
|
15
19
|
}
|
|
@@ -7,3 +7,5 @@ export * from './cluster-layer/cluster-layer.component';
|
|
|
7
7
|
export * from './cluster-layer/cluster-layer.settings';
|
|
8
8
|
export * from './image-layer/image-layer.component';
|
|
9
9
|
export * from './image-layer/image-layer.settings';
|
|
10
|
+
export * from './raster-tile/raster-tile-layer.component';
|
|
11
|
+
export * from './raster-tile/raster-tile-layer.settings';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DestructibleComponent } from '../../../common/destructible.component';
|
|
2
|
+
import { Raster } from 'ol/source';
|
|
3
|
+
import { MapPostboyService } from '../../../services/map-postboy.service';
|
|
4
|
+
import ImageLayer from 'ol/layer/Image';
|
|
5
|
+
import { RasterTileLayerFactory } from './raster-tile-layer.factory';
|
|
6
|
+
import { RasterTileLayerSettings } from './raster-tile-layer.settings';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class RasterTileLayerComponent extends DestructibleComponent {
|
|
9
|
+
private postboy;
|
|
10
|
+
private factory;
|
|
11
|
+
layer?: ImageLayer<Raster>;
|
|
12
|
+
constructor(postboy: MapPostboyService, factory: RasterTileLayerFactory);
|
|
13
|
+
_settings: RasterTileLayerSettings;
|
|
14
|
+
set settings(value: RasterTileLayerSettings | undefined);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
onDestroy: () => void;
|
|
17
|
+
private initLayer;
|
|
18
|
+
private removeLayer;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RasterTileLayerComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RasterTileLayerComponent, "art-raster-tile-layer", never, { "settings": { "alias": "settings"; "required": false; }; }, {}, never, never, false, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Raster } from 'ol/source';
|
|
2
|
+
import { RasterTileLayerSettings } from './raster-tile-layer.settings';
|
|
3
|
+
import ImageLayer from 'ol/layer/Image';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class RasterTileLayerFactory {
|
|
6
|
+
build(settings: RasterTileLayerSettings): ImageLayer<Raster>;
|
|
7
|
+
private getTileFunc;
|
|
8
|
+
private tileLoader;
|
|
9
|
+
private getNormalizedCoord;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RasterTileLayerFactory, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RasterTileLayerFactory>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export declare class RasterTileLayerSettings {
|
|
2
|
+
/**
|
|
3
|
+
* The maximum zoom level for a map view.
|
|
4
|
+
*
|
|
5
|
+
* @type {number}
|
|
6
|
+
* @default 19
|
|
7
|
+
*/
|
|
8
|
+
maxZoom: number;
|
|
9
|
+
/**
|
|
10
|
+
* The minimum zoom level allowed.
|
|
11
|
+
*
|
|
12
|
+
* @type {number}
|
|
13
|
+
*/
|
|
14
|
+
minZoom: number;
|
|
15
|
+
/**
|
|
16
|
+
* The opacity of an element.
|
|
17
|
+
*
|
|
18
|
+
* @type {number}
|
|
19
|
+
* @default 0.6
|
|
20
|
+
*/
|
|
21
|
+
opacity: number;
|
|
22
|
+
/**
|
|
23
|
+
* Represents the tiles URL.
|
|
24
|
+
* @typedef {string} url
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* 'https://example.ex/{z}/{x}/{y}.png'
|
|
28
|
+
*/
|
|
29
|
+
url: string;
|
|
30
|
+
/**
|
|
31
|
+
* The projection of the coordinate system.
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @default 'EPSG:3857'
|
|
35
|
+
*/
|
|
36
|
+
projection: string;
|
|
37
|
+
/**
|
|
38
|
+
* Additional headers that should be added to each tile request
|
|
39
|
+
*
|
|
40
|
+
* @type {Record<string, string>}
|
|
41
|
+
* @default An empty array
|
|
42
|
+
*/
|
|
43
|
+
requestHeaders: Record<string, string> | null;
|
|
44
|
+
operation: (data: number[][] | ImageData[]) => number[] | ImageData;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a copy of the given tile layer settings.
|
|
47
|
+
*
|
|
48
|
+
* @param {RasterTileLayerSettings} model - The tile layer settings to be copied.
|
|
49
|
+
* @return {RasterTileLayerSettings} - A new instance of RasterTileLayerSettings with the same properties as the model.
|
|
50
|
+
*/
|
|
51
|
+
static copy(model: RasterTileLayerSettings): RasterTileLayerSettings;
|
|
52
|
+
/**
|
|
53
|
+
* Sets the URL of the RasterTileLayerSettings object.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} url - The URL to be set.
|
|
56
|
+
* @return {RasterTileLayerSettings} - The updated RasterTileLayerSettings object.
|
|
57
|
+
*/
|
|
58
|
+
setUrl(url: string): RasterTileLayerSettings;
|
|
59
|
+
/**
|
|
60
|
+
* Sets the operation to apply on raster tile data.
|
|
61
|
+
*
|
|
62
|
+
* @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.
|
|
63
|
+
* @return {RasterTileLayerSettings} A new instance of RasterTileLayerSettings with the updated operation.
|
|
64
|
+
*/
|
|
65
|
+
setOperation(operation: (data: number[][] | ImageData[]) => number[] | ImageData): RasterTileLayerSettings;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the requestHeaders of the RasterTileLayerSettings object.
|
|
68
|
+
*
|
|
69
|
+
* @param {Record<string, string>} requestHeaders - The headers which should be provided.
|
|
70
|
+
* @return {RasterTileLayerSettings} - The updated RasterTileLayerSettings object.
|
|
71
|
+
*/
|
|
72
|
+
setRequestHeaders(requestHeaders: Record<string, string>): RasterTileLayerSettings;
|
|
73
|
+
/**
|
|
74
|
+
* Sets the maximum zoom level for the tile layer.
|
|
75
|
+
*
|
|
76
|
+
* @param {number} maxZoom - The maximum zoom level.
|
|
77
|
+
* @returns {RasterTileLayerSettings} - The updated tile layer settings object.
|
|
78
|
+
*/
|
|
79
|
+
setMaxZoom(maxZoom: number): RasterTileLayerSettings;
|
|
80
|
+
/**
|
|
81
|
+
* Sets the minimum zoom level for the Tile Layer.
|
|
82
|
+
*
|
|
83
|
+
* @param {number} minZoom - The minimum zoom level to be set.
|
|
84
|
+
* @return {RasterTileLayerSettings} The modified RasterTileLayerSettings object with the updated minimum zoom level.
|
|
85
|
+
*/
|
|
86
|
+
setMinZoom(minZoom: number): RasterTileLayerSettings;
|
|
87
|
+
/**
|
|
88
|
+
* Sets the opacity of the RasterTileLayerSettings.
|
|
89
|
+
*
|
|
90
|
+
* @param {number} opacity - The opacity value to set. Must be a number between 0 and 1.
|
|
91
|
+
* @return {RasterTileLayerSettings} - A new instance of RasterTileLayerSettings with the opacity set.
|
|
92
|
+
*/
|
|
93
|
+
setOpacity(opacity: number): RasterTileLayerSettings;
|
|
94
|
+
/**
|
|
95
|
+
* Sets the projection for the tile layer settings.
|
|
96
|
+
*
|
|
97
|
+
* @param {string} projection - The desired projection for the tile layer settings.
|
|
98
|
+
* @return {RasterTileLayerSettings} - The updated tile layer settings with the new projection.
|
|
99
|
+
*/
|
|
100
|
+
setProjection(projection: string): RasterTileLayerSettings;
|
|
101
|
+
/**
|
|
102
|
+
* Checks if the current instance of RasterTileLayerSettings is equal to the given model.
|
|
103
|
+
* @param {RasterTileLayerSettings} model - The model to compare against.
|
|
104
|
+
* @return {boolean} - True if all properties of the current instance matches the properties of the model;
|
|
105
|
+
* otherwise, false.
|
|
106
|
+
*/
|
|
107
|
+
isSame(model: RasterTileLayerSettings): boolean;
|
|
108
|
+
}
|
|
@@ -10,9 +10,10 @@ import * as i8 from "./map-plate/features/polygons/polygons.component";
|
|
|
10
10
|
import * as i9 from "./map-plate/layers/cluster-layer/cluster-layer.component";
|
|
11
11
|
import * as i10 from "./map-plate/controls/map-control-zoom/map-control-zoom.component";
|
|
12
12
|
import * as i11 from "./map-plate/layers/image-layer/image-layer.component";
|
|
13
|
-
import * as i12 from "
|
|
13
|
+
import * as i12 from "./map-plate/layers/raster-tile/raster-tile-layer.component";
|
|
14
|
+
import * as i13 from "@angular/common";
|
|
14
15
|
export declare class MapModule {
|
|
15
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<MapModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MapModule, [typeof i1.DestructibleComponent, typeof i2.MapPlateComponent, typeof i3.TileLayerComponent, typeof i4.OsmTileLayerComponent, typeof i5.FeatureLayerComponent, typeof i6.MarkersComponent, typeof i7.TooltipComponent, typeof i8.PolygonsComponent, typeof i9.ClusterLayerComponent, typeof i10.MapControlZoomComponent, typeof i11.ImageLayerComponent], [typeof
|
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MapModule, [typeof i1.DestructibleComponent, typeof i2.MapPlateComponent, typeof i3.TileLayerComponent, typeof i4.OsmTileLayerComponent, typeof i5.FeatureLayerComponent, typeof i6.MarkersComponent, typeof i7.TooltipComponent, typeof i8.PolygonsComponent, typeof i9.ClusterLayerComponent, typeof i10.MapControlZoomComponent, typeof i11.ImageLayerComponent, typeof i12.RasterTileLayerComponent], [typeof i13.CommonModule], [typeof i2.MapPlateComponent, typeof i5.FeatureLayerComponent, typeof i6.MarkersComponent, typeof i3.TileLayerComponent, typeof i7.TooltipComponent, typeof i8.PolygonsComponent, typeof i9.ClusterLayerComponent, typeof i10.MapControlZoomComponent, typeof i11.ImageLayerComponent, typeof i12.RasterTileLayerComponent]>;
|
|
17
18
|
static ɵinj: i0.ɵɵInjectorDeclaration<MapModule>;
|
|
18
19
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PostboyGenericMessage } from '@artstesh/postboy';
|
|
2
|
+
import ImageLayer from 'ol/layer/Image';
|
|
3
|
+
import { Raster } from 'ol/source';
|
|
4
|
+
export declare class AddRasterTileCommand extends PostboyGenericMessage {
|
|
5
|
+
layer: ImageLayer<Raster>;
|
|
6
|
+
static readonly ID = "d33447fe-eec0-4205-9b5d-0d79ddc74ad7";
|
|
7
|
+
constructor(layer: ImageLayer<Raster>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PostboyGenericMessage } from '@artstesh/postboy';
|
|
2
|
+
import ImageLayer from 'ol/layer/Image';
|
|
3
|
+
import { Raster } from 'ol/source';
|
|
4
|
+
export declare class RemoveRasterTileCommand extends PostboyGenericMessage {
|
|
5
|
+
layer: ImageLayer<Raster>;
|
|
6
|
+
static readonly ID = "d1c4bf6a-e2f2-4385-a7a2-cecb525f8939";
|
|
7
|
+
constructor(layer: ImageLayer<Raster>);
|
|
8
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PostboyCallbackMessage } from '@artstesh/postboy';
|
|
2
2
|
import { DrawingType, FeatureOutputFormat } from '../../models';
|
|
3
|
-
import
|
|
3
|
+
import { StyleLike } from 'ol/style/Style';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a command to start a drawing operation.
|
|
6
6
|
*/
|
|
7
7
|
export declare class StartDrawingCommand extends PostboyCallbackMessage<string | null> {
|
|
8
8
|
type: DrawingType;
|
|
9
|
-
style:
|
|
9
|
+
style: StyleLike;
|
|
10
10
|
format: FeatureOutputFormat;
|
|
11
11
|
static readonly ID = "4407e9ee-d6c3-4e77-8000-c1aae7433fb6";
|
|
12
12
|
/**
|
|
@@ -16,5 +16,5 @@ export declare class StartDrawingCommand extends PostboyCallbackMessage<string |
|
|
|
16
16
|
* @param {Style} style - The style defining visual appearance of the drawing.
|
|
17
17
|
* @param {FeatureOutputFormat} [format=FeatureOutputFormat.GeoJson] - The format of the feature output. Defaults to GeoJson.
|
|
18
18
|
*/
|
|
19
|
-
constructor(type: DrawingType, style:
|
|
19
|
+
constructor(type: DrawingType, style: StyleLike, format?: FeatureOutputFormat);
|
|
20
20
|
}
|
|
@@ -3,11 +3,11 @@ import { Vector as Layer } from 'ol/layer';
|
|
|
3
3
|
import VectorSource from 'ol/source/Vector';
|
|
4
4
|
import { Draw } from 'ol/interaction';
|
|
5
5
|
import { DrawingType } from '../../models';
|
|
6
|
-
import
|
|
6
|
+
import { StyleLike } from 'ol/style/Style';
|
|
7
7
|
export declare class GenerateDrawExecutor extends PostboyExecutor<Draw> {
|
|
8
8
|
layer: Layer<VectorSource<any>>;
|
|
9
|
-
style:
|
|
9
|
+
style: StyleLike;
|
|
10
10
|
type: DrawingType;
|
|
11
11
|
static readonly ID = "5d5f0737-ff70-461e-9a2e-bf6166c914cb";
|
|
12
|
-
constructor(layer: Layer<VectorSource<any>>, style:
|
|
12
|
+
constructor(layer: Layer<VectorSource<any>>, style: StyleLike, type: DrawingType);
|
|
13
13
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PostboyExecutor } from '@artstesh/postboy';
|
|
2
|
+
import { Geometry } from 'ol/geom';
|
|
3
|
+
export declare class GetGeometryLengthExecutor extends PostboyExecutor<number> {
|
|
4
|
+
geometry: Geometry;
|
|
5
|
+
projection: string;
|
|
6
|
+
static readonly ID = "763146df-6d93-4dc2-a532-0e9ba2b2d023";
|
|
7
|
+
constructor(geometry: Geometry, projection?: string);
|
|
8
|
+
}
|
|
9
|
+
export declare class GetGeometryLengthExecutorHandler {
|
|
10
|
+
handle(executor: GetGeometryLengthExecutor): number;
|
|
11
|
+
}
|
|
@@ -21,3 +21,4 @@ export * from './executors/polygon-self-intersection.executor';
|
|
|
21
21
|
export * from './queries/get-features-in-area.query';
|
|
22
22
|
export * from './queries/get-features-in-point.query';
|
|
23
23
|
export * from './commands/fit-to-features.command';
|
|
24
|
+
export { GetGeometryLengthExecutor } from './executors/get-geometry-length.executor';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { FeatureLike } from 'ol/Feature';
|
|
2
|
+
export { Feature } from 'ol';
|
|
3
|
+
export { Style } from 'ol/style';
|
|
4
|
+
export { Fill, RegularShape, Stroke, Text } from 'ol/style';
|
|
5
|
+
export { StyleLike } from 'ol/style/Style';
|
|
6
|
+
export { Geometry, LineString, Point } from 'ol/geom';
|
|
7
|
+
export * as CircleStyle from 'ol/style/Circle';
|
|
@@ -7,7 +7,6 @@ export declare class MapManagementService implements IPostboyDependingService {
|
|
|
7
7
|
private layers;
|
|
8
8
|
constructor(postboy: MapPostboyService);
|
|
9
9
|
up(): void;
|
|
10
|
-
private observeRemoveTile;
|
|
11
10
|
private observeLayerQuery;
|
|
12
11
|
private observeAddTile;
|
|
13
12
|
private observeImageLayer;
|