@angular-helpers/openlayers 0.1.0
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/README.md +156 -0
- package/fesm2022/angular-helpers-openlayers-controls.mjs +224 -0
- package/fesm2022/angular-helpers-openlayers-core.mjs +184 -0
- package/fesm2022/angular-helpers-openlayers-interactions.mjs +34 -0
- package/fesm2022/angular-helpers-openlayers-layers.mjs +215 -0
- package/fesm2022/angular-helpers-openlayers-military.mjs +38 -0
- package/fesm2022/angular-helpers-openlayers-overlays.mjs +31 -0
- package/fesm2022/angular-helpers-openlayers.mjs +3 -0
- package/package.json +80 -0
- package/types/angular-helpers-openlayers-controls.d.ts +77 -0
- package/types/angular-helpers-openlayers-core.d.ts +144 -0
- package/types/angular-helpers-openlayers-interactions.d.ts +35 -0
- package/types/angular-helpers-openlayers-layers.d.ts +88 -0
- package/types/angular-helpers-openlayers-military.d.ts +33 -0
- package/types/angular-helpers-openlayers-overlays.d.ts +29 -0
- package/types/angular-helpers-openlayers.d.ts +2 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
|
+
import { Feature, Style, Layer, Extent, OlFeature } from '@angular-helpers/openlayers/core';
|
|
4
|
+
|
|
5
|
+
declare class OlVectorLayerComponent implements OnInit, OnDestroy {
|
|
6
|
+
private layerService;
|
|
7
|
+
id: _angular_core.InputSignal<string>;
|
|
8
|
+
features: _angular_core.InputSignal<Feature[]>;
|
|
9
|
+
zIndex: _angular_core.InputSignal<number>;
|
|
10
|
+
opacity: _angular_core.InputSignal<number>;
|
|
11
|
+
visible: _angular_core.InputSignal<boolean>;
|
|
12
|
+
style: _angular_core.InputSignal<Style | ((feature: Feature) => Style)>;
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
ngOnDestroy(): void;
|
|
15
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OlVectorLayerComponent, never>;
|
|
16
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OlVectorLayerComponent, "ol-vector-layer", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "features": { "alias": "features"; "required": false; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare class OlTileLayerComponent implements OnInit, OnDestroy {
|
|
20
|
+
private layerService;
|
|
21
|
+
id: _angular_core.InputSignal<string>;
|
|
22
|
+
source: _angular_core.InputSignal<"osm" | "xyz" | "wms">;
|
|
23
|
+
url: _angular_core.InputSignal<string>;
|
|
24
|
+
attributions: _angular_core.InputSignal<string | string[]>;
|
|
25
|
+
params: _angular_core.InputSignal<Record<string, unknown>>;
|
|
26
|
+
zIndex: _angular_core.InputSignal<number>;
|
|
27
|
+
opacity: _angular_core.InputSignal<number>;
|
|
28
|
+
visible: _angular_core.InputSignal<boolean>;
|
|
29
|
+
ngOnInit(): void;
|
|
30
|
+
private tryAddLayer;
|
|
31
|
+
ngOnDestroy(): void;
|
|
32
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OlTileLayerComponent, never>;
|
|
33
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OlTileLayerComponent, "ol-tile-layer", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "source": { "alias": "source"; "required": true; "isSignal": true; }; "url": { "alias": "url"; "required": false; "isSignal": true; }; "attributions": { "alias": "attributions"; "required": false; "isSignal": true; }; "params": { "alias": "params"; "required": false; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface LayerConfig extends Layer {
|
|
37
|
+
type: 'vector' | 'tile' | 'image';
|
|
38
|
+
extent?: Extent;
|
|
39
|
+
minResolution?: number;
|
|
40
|
+
maxResolution?: number;
|
|
41
|
+
}
|
|
42
|
+
interface VectorLayerConfig extends LayerConfig {
|
|
43
|
+
type: 'vector';
|
|
44
|
+
features?: Feature[];
|
|
45
|
+
style?: Style | ((feature: Feature) => Style);
|
|
46
|
+
}
|
|
47
|
+
interface TileLayerConfig extends LayerConfig {
|
|
48
|
+
type: 'tile';
|
|
49
|
+
source: SourceConfig;
|
|
50
|
+
}
|
|
51
|
+
interface ImageLayerConfig extends LayerConfig {
|
|
52
|
+
type: 'image';
|
|
53
|
+
source: ImageSourceConfig;
|
|
54
|
+
}
|
|
55
|
+
interface SourceConfig {
|
|
56
|
+
type: 'osm' | 'xyz' | 'wms' | 'wmts';
|
|
57
|
+
url?: string;
|
|
58
|
+
attributions?: string | string[];
|
|
59
|
+
params?: Record<string, unknown>;
|
|
60
|
+
}
|
|
61
|
+
interface ImageSourceConfig {
|
|
62
|
+
type: 'wms' | 'static';
|
|
63
|
+
url: string;
|
|
64
|
+
params?: Record<string, unknown>;
|
|
65
|
+
imageExtent?: Extent;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare class OlLayerService {
|
|
69
|
+
private mapService;
|
|
70
|
+
private layerCache;
|
|
71
|
+
addLayer(config: LayerConfig): {
|
|
72
|
+
id: string;
|
|
73
|
+
};
|
|
74
|
+
removeLayer(id: string): void;
|
|
75
|
+
setVisibility(id: string, visible: boolean): void;
|
|
76
|
+
setOpacity(id: string, opacity: number): void;
|
|
77
|
+
private createVectorLayer;
|
|
78
|
+
private createTileLayer;
|
|
79
|
+
private createImageLayer;
|
|
80
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OlLayerService, never>;
|
|
81
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<OlLayerService>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
declare function withLayers(): OlFeature<'layers'>;
|
|
85
|
+
declare function provideLayers(): OlFeature<'layers'>;
|
|
86
|
+
|
|
87
|
+
export { OlLayerService, OlTileLayerComponent, OlVectorLayerComponent, provideLayers, withLayers };
|
|
88
|
+
export type { ImageLayerConfig, ImageSourceConfig, LayerConfig, SourceConfig, TileLayerConfig, VectorLayerConfig };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Coordinate, Feature, OlFeature } from '@angular-helpers/openlayers/core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
|
|
4
|
+
interface EllipseConfig {
|
|
5
|
+
center: Coordinate;
|
|
6
|
+
semiMajor: number;
|
|
7
|
+
semiMinor: number;
|
|
8
|
+
rotation?: number;
|
|
9
|
+
}
|
|
10
|
+
interface SectorConfig {
|
|
11
|
+
center: Coordinate;
|
|
12
|
+
radius: number;
|
|
13
|
+
startAngle: number;
|
|
14
|
+
endAngle: number;
|
|
15
|
+
}
|
|
16
|
+
interface MilSymbolConfig {
|
|
17
|
+
sidc: string;
|
|
18
|
+
position: Coordinate;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare class OlMilitaryService {
|
|
22
|
+
createEllipse(config: EllipseConfig): Feature;
|
|
23
|
+
createSector(config: SectorConfig): Feature;
|
|
24
|
+
addMilSymbol(config: MilSymbolConfig): Feature;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OlMilitaryService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OlMilitaryService>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare function withMilitary(): OlFeature<'military'>;
|
|
30
|
+
declare function provideMilitary(): OlFeature<'military'>;
|
|
31
|
+
|
|
32
|
+
export { OlMilitaryService, provideMilitary, withMilitary };
|
|
33
|
+
export type { EllipseConfig, MilSymbolConfig, SectorConfig };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Coordinate, OlFeature } from '@angular-helpers/openlayers/core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
|
|
4
|
+
type OverlayPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center' | 'left-center' | 'right-center';
|
|
5
|
+
interface OverlayConfig {
|
|
6
|
+
position?: OverlayPosition;
|
|
7
|
+
offset?: [number, number];
|
|
8
|
+
}
|
|
9
|
+
interface PopupOptions {
|
|
10
|
+
id?: string;
|
|
11
|
+
content: string | HTMLElement;
|
|
12
|
+
position: Coordinate;
|
|
13
|
+
autoClose?: boolean;
|
|
14
|
+
closeButton?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class OlPopupService {
|
|
18
|
+
showPopup(options: PopupOptions): string;
|
|
19
|
+
hidePopup(id: string): void;
|
|
20
|
+
hideAllPopups(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OlPopupService, never>;
|
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OlPopupService>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare function withOverlays(): OlFeature<'overlays'>;
|
|
26
|
+
declare function provideOverlays(): OlFeature<'overlays'>;
|
|
27
|
+
|
|
28
|
+
export { OlPopupService, provideOverlays, withOverlays };
|
|
29
|
+
export type { OverlayConfig, OverlayPosition, PopupOptions };
|