@angular-helpers/openlayers 0.3.0 → 0.5.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.
@@ -1,19 +1,89 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Feature, Style, Layer, Extent, OlFeature } from '@angular-helpers/openlayers/core';
2
+ import { Layer, Extent, Feature, Style, OlFeature } from '@angular-helpers/openlayers/core';
3
+ import { FlatStyleLike } from 'ol/style/flat';
4
+ import { Style as Style$1 } from 'ol/layer/WebGLTile';
3
5
  import BaseLayer from 'ol/layer/Base';
4
6
 
7
+ interface LayerConfig extends Layer {
8
+ type: 'vector' | 'tile' | 'image' | 'heatmap';
9
+ extent?: Extent;
10
+ minResolution?: number;
11
+ maxResolution?: number;
12
+ }
13
+ interface ClusterConfig {
14
+ /** Enable clustering (default: false) */
15
+ enabled: boolean;
16
+ /** Distance in pixels within which features will be clustered (default: 40) */
17
+ distance?: number;
18
+ /** Minimum distance between clusters (default: 20) */
19
+ minDistance?: number;
20
+ /** Show count badge on cluster (default: true) */
21
+ showCount?: boolean;
22
+ /** Style for individual features when clustering */
23
+ featureStyle?: Style;
24
+ }
25
+ interface VectorLayerConfig extends LayerConfig {
26
+ type: 'vector';
27
+ features?: Feature[];
28
+ url?: string;
29
+ format?: 'geojson' | 'topojson' | 'kml';
30
+ style?: Style | ((feature: Feature) => Style);
31
+ cluster?: ClusterConfig;
32
+ }
33
+ interface HeatmapLayerConfig extends LayerConfig {
34
+ type: 'heatmap';
35
+ features?: Feature[];
36
+ weight?: string | ((feature: Feature) => number);
37
+ blur?: number;
38
+ radius?: number;
39
+ }
40
+ interface TileLayerConfig extends LayerConfig {
41
+ type: 'tile';
42
+ source: SourceConfig;
43
+ }
44
+ interface ImageLayerConfig extends LayerConfig {
45
+ type: 'image';
46
+ source: ImageSourceConfig;
47
+ }
48
+ interface SourceConfig {
49
+ type: 'osm' | 'xyz' | 'wms' | 'wmts';
50
+ url?: string;
51
+ attributions?: string | string[];
52
+ params?: Record<string, unknown>;
53
+ }
54
+ interface ImageSourceConfig {
55
+ type: 'wms' | 'static';
56
+ url: string;
57
+ params?: Record<string, unknown>;
58
+ imageExtent?: Extent;
59
+ }
60
+ type AnyLayerConfig = VectorLayerConfig | TileLayerConfig | ImageLayerConfig | HeatmapLayerConfig;
61
+
62
+ declare class OlClusterComponent {
63
+ distance: _angular_core.InputSignal<number>;
64
+ minDistance: _angular_core.InputSignal<number>;
65
+ showCount: _angular_core.InputSignal<boolean>;
66
+ featureStyle: _angular_core.InputSignal<Style>;
67
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<OlClusterComponent, never>;
68
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<OlClusterComponent, "ol-cluster", never, { "distance": { "alias": "distance"; "required": false; "isSignal": true; }; "minDistance": { "alias": "minDistance"; "required": false; "isSignal": true; }; "showCount": { "alias": "showCount"; "required": false; "isSignal": true; }; "featureStyle": { "alias": "featureStyle"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
69
+ }
70
+
5
71
  declare class OlVectorLayerComponent {
6
72
  private layerService;
7
73
  private destroyRef;
8
74
  id: _angular_core.InputSignal<string>;
9
75
  features: _angular_core.InputSignal<Feature[]>;
76
+ url: _angular_core.InputSignal<string>;
77
+ format: _angular_core.InputSignal<"geojson" | "topojson" | "kml">;
10
78
  zIndex: _angular_core.InputSignal<number>;
11
79
  opacity: _angular_core.InputSignal<number>;
12
80
  visible: _angular_core.InputSignal<boolean>;
13
- style: _angular_core.InputSignal<Style | ((feature: Feature) => Style)>;
81
+ style: _angular_core.InputSignal<any>;
82
+ cluster: _angular_core.InputSignal<ClusterConfig>;
83
+ clusterComponent: _angular_core.Signal<OlClusterComponent>;
14
84
  constructor();
15
85
  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>;
86
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<OlVectorLayerComponent, "ol-vector-layer", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "features": { "alias": "features"; "required": false; "isSignal": true; }; "url": { "alias": "url"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "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; }; "cluster": { "alias": "cluster"; "required": false; "isSignal": true; }; }, {}, ["clusterComponent"], never, true, never>;
17
87
  }
18
88
 
19
89
  declare class OlTileLayerComponent {
@@ -48,41 +118,124 @@ declare class OlImageLayerComponent {
48
118
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<OlImageLayerComponent, "ol-image-layer", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "sourceType": { "alias": "sourceType"; "required": true; "isSignal": true; }; "url": { "alias": "url"; "required": true; "isSignal": true; }; "params": { "alias": "params"; "required": false; "isSignal": true; }; "imageExtent": { "alias": "imageExtent"; "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>;
49
119
  }
50
120
 
51
- interface LayerConfig extends Layer {
52
- type: 'vector' | 'tile' | 'image';
53
- extent?: Extent;
54
- minResolution?: number;
55
- maxResolution?: number;
56
- }
57
- interface VectorLayerConfig extends LayerConfig {
58
- type: 'vector';
59
- features?: Feature[];
60
- style?: Style | ((feature: Feature) => Style);
61
- }
62
- interface TileLayerConfig extends LayerConfig {
63
- type: 'tile';
64
- source: SourceConfig;
65
- }
66
- interface ImageLayerConfig extends LayerConfig {
67
- type: 'image';
68
- source: ImageSourceConfig;
121
+ declare class OlHeatmapLayerComponent {
122
+ private layerService;
123
+ private mapService;
124
+ private destroyRef;
125
+ id: _angular_core.InputSignal<string>;
126
+ features: _angular_core.InputSignal<Feature[]>;
127
+ zIndex: _angular_core.InputSignal<number>;
128
+ opacity: _angular_core.InputSignal<number>;
129
+ visible: _angular_core.InputSignal<boolean>;
130
+ blur: _angular_core.InputSignal<number>;
131
+ radius: _angular_core.InputSignal<number>;
132
+ /** Unit for radius and blur: 'pixels' (default) or 'meters' */
133
+ radiusUnit: _angular_core.InputSignal<"pixels" | "meters">;
134
+ weight: _angular_core.InputSignal<string | ((feature: Feature) => number)>;
135
+ /** Computed radius in pixels based on current resolution if unit is 'meters' */
136
+ private scaledRadius;
137
+ /** Computed blur in pixels based on current resolution if unit is 'meters' */
138
+ private scaledBlur;
139
+ constructor();
140
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<OlHeatmapLayerComponent, never>;
141
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<OlHeatmapLayerComponent, "ol-heatmap-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; }; "blur": { "alias": "blur"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "radiusUnit": { "alias": "radiusUnit"; "required": false; "isSignal": true; }; "weight": { "alias": "weight"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
69
142
  }
70
- interface SourceConfig {
71
- type: 'osm' | 'xyz' | 'wms' | 'wmts';
72
- url?: string;
73
- attributions?: string | string[];
74
- params?: Record<string, unknown>;
143
+
144
+ /**
145
+ * GPU-accelerated vector layer for rendering large datasets.
146
+ *
147
+ * Important: Uses WebGL 2 for rendering. Styles must be provided as
148
+ * `FlatStyleLike` objects (not `ol/style/Style` instances).
149
+ * Hit detection is disabled by default for performance.
150
+ *
151
+ * @usageNotes
152
+ * ```html
153
+ * <ol-webgl-vector-layer
154
+ * id="big-dataset"
155
+ * [features]="largeDataset()"
156
+ * [flatStyle]="{
157
+ * 'circle-radius': 6,
158
+ * 'circle-fill-color': ['match', ['get', 'type'], 'alert', 'red', 'blue'],
159
+ * 'stroke-color': '#333',
160
+ * 'stroke-width': 1
161
+ * }"
162
+ * [disableHitDetection]="true">
163
+ * </ol-webgl-vector-layer>
164
+ * ```
165
+ */
166
+ declare class OlWebGLVectorLayerComponent {
167
+ private mapService;
168
+ private destroyRef;
169
+ /** Unique layer identifier */
170
+ id: _angular_core.InputSignal<string>;
171
+ /** Features to render */
172
+ features: _angular_core.InputSignal<Feature[]>;
173
+ /** WebGL flat style (required — no default provided) */
174
+ flatStyle: _angular_core.InputSignal<FlatStyleLike>;
175
+ /** Z-index for layer ordering */
176
+ zIndex: _angular_core.InputSignal<number>;
177
+ /** Opacity (0–1) */
178
+ opacity: _angular_core.InputSignal<number>;
179
+ /** Layer visibility */
180
+ visible: _angular_core.InputSignal<boolean>;
181
+ /** Disable hit detection for better performance (default: true) */
182
+ disableHitDetection: _angular_core.InputSignal<boolean>;
183
+ /** Style variables for dynamic expressions (e.g. `['var', 'threshold']`) */
184
+ variables: _angular_core.InputSignal<Record<string, string | number | boolean | number[]>>;
185
+ private layer;
186
+ private vectorSource;
187
+ constructor();
188
+ private syncFeatures;
189
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<OlWebGLVectorLayerComponent, never>;
190
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<OlWebGLVectorLayerComponent, "ol-webgl-vector-layer", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "features": { "alias": "features"; "required": false; "isSignal": true; }; "flatStyle": { "alias": "flatStyle"; "required": true; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "disableHitDetection": { "alias": "disableHitDetection"; "required": false; "isSignal": true; }; "variables": { "alias": "variables"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
75
191
  }
76
- interface ImageSourceConfig {
77
- type: 'wms' | 'static';
78
- url: string;
79
- params?: Record<string, unknown>;
80
- imageExtent?: Extent;
192
+
193
+ /**
194
+ * GPU-accelerated tile layer with color/brightness/contrast expressions.
195
+ *
196
+ * Supports the same tile sources as `ol-tile-layer` but renders via WebGL,
197
+ * enabling GPU-powered color manipulation (brightness, contrast, saturation, gamma).
198
+ *
199
+ * @usageNotes
200
+ * ```html
201
+ * <ol-webgl-tile-layer
202
+ * id="satellite-webgl"
203
+ * source="xyz"
204
+ * [url]="'https://server.arcgisonline.com/.../{z}/{y}/{x}'"
205
+ * [tileStyle]="{ brightness: 0.1, contrast: 0.2 }">
206
+ * </ol-webgl-tile-layer>
207
+ * ```
208
+ */
209
+ declare class OlWebGLTileLayerComponent {
210
+ private mapService;
211
+ private destroyRef;
212
+ /** Unique layer identifier */
213
+ id: _angular_core.InputSignal<string>;
214
+ /** Tile source type */
215
+ source: _angular_core.InputSignal<"osm" | "xyz" | "mvt">;
216
+ /** Tile URL template (required for 'xyz' and 'mvt') */
217
+ url: _angular_core.InputSignal<string>;
218
+ /** Attribution text */
219
+ attributions: _angular_core.InputSignal<string | string[]>;
220
+ /** WebGL tile style (raster expressions) or flat style (MVT) */
221
+ tileStyle: _angular_core.InputSignal<FlatStyleLike | Style$1>;
222
+ /** Z-index for layer ordering */
223
+ zIndex: _angular_core.InputSignal<number>;
224
+ /** Opacity (0–1) */
225
+ opacity: _angular_core.InputSignal<number>;
226
+ /** Layer visibility */
227
+ visible: _angular_core.InputSignal<boolean>;
228
+ /** Preload low-res tiles up to this many zoom levels */
229
+ preload: _angular_core.InputSignal<number>;
230
+ private layer;
231
+ constructor();
232
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<OlWebGLTileLayerComponent, never>;
233
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<OlWebGLTileLayerComponent, "ol-webgl-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; }; "tileStyle": { "alias": "tileStyle"; "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; }; "preload": { "alias": "preload"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
81
234
  }
82
235
 
83
236
  interface LayerInfo {
84
237
  id: string;
85
- type: 'vector' | 'tile' | 'image';
238
+ type: 'vector' | 'tile' | 'image' | 'heatmap';
86
239
  visible: boolean;
87
240
  opacity: number;
88
241
  zIndex: number;
@@ -96,7 +249,7 @@ declare class OlLayerService {
96
249
  readonly visibleLayers: _angular_core.Signal<LayerInfo[]>;
97
250
  readonly tileLayers: _angular_core.Signal<LayerInfo[]>;
98
251
  readonly vectorLayers: _angular_core.Signal<LayerInfo[]>;
99
- addLayer(config: LayerConfig): {
252
+ addLayer(config: AnyLayerConfig): {
100
253
  id: string;
101
254
  };
102
255
  private flushPending;
@@ -108,6 +261,11 @@ declare class OlLayerService {
108
261
  toggleVisibility(id: string): boolean;
109
262
  setOpacity(id: string, opacity: number): void;
110
263
  setZIndex(id: string, zIndex: number): void;
264
+ setHeatmapProperties(id: string, props: {
265
+ blur?: number;
266
+ radius?: number;
267
+ weight?: string | ((feature: any) => number);
268
+ }): void;
111
269
  isVisible(id: string): boolean;
112
270
  getOpacity(id: string): number;
113
271
  getZIndex(id: string): number;
@@ -126,6 +284,7 @@ declare class OlLayerService {
126
284
  updateFeatures(id: string, features: VectorLayerConfig['features']): void;
127
285
  private updateLayerState;
128
286
  private createVectorLayer;
287
+ private createHeatmapLayer;
129
288
  private createTileLayer;
130
289
  private createImageLayer;
131
290
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<OlLayerService, never>;
@@ -135,5 +294,5 @@ declare class OlLayerService {
135
294
  declare function withLayers(): OlFeature<'layers'>;
136
295
  declare function provideLayers(): OlFeature<'layers'>;
137
296
 
138
- export { OlImageLayerComponent, OlLayerService, OlTileLayerComponent, OlVectorLayerComponent, provideLayers, withLayers };
139
- export type { ImageLayerConfig, ImageSourceConfig, LayerConfig, LayerInfo, SourceConfig, TileLayerConfig, VectorLayerConfig };
297
+ export { OlClusterComponent, OlHeatmapLayerComponent, OlImageLayerComponent, OlLayerService, OlTileLayerComponent, OlVectorLayerComponent, OlWebGLTileLayerComponent, OlWebGLVectorLayerComponent, provideLayers, withLayers };
298
+ export type { HeatmapLayerConfig, ImageLayerConfig, ImageSourceConfig, LayerConfig, LayerInfo, SourceConfig, TileLayerConfig, VectorLayerConfig };
@@ -1,33 +1,177 @@
1
- import { Coordinate, Feature, OlFeature } from '@angular-helpers/openlayers/core';
2
1
  import * as i0 from '@angular/core';
2
+ import { Coordinate, EllipseConfig, Feature, SectorConfig, DonutConfig, OlFeature } from '@angular-helpers/openlayers/core';
3
+ import { Style } from 'ol/style';
4
+ import { Feature as Feature$1 } from 'ol';
3
5
 
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
- }
6
+ /**
7
+ * Subset of `milsymbol`'s `SymbolOptions` exposed by this package.
8
+ * `sidc` is the only required field; everything else is optional and
9
+ * forwarded verbatim to `new Symbol(sidc, options)`.
10
+ */
16
11
  interface MilSymbolConfig {
12
+ /** MIL-STD-2525 SIDC code. Required. */
17
13
  sidc: string;
14
+ /** Symbol position as `[lon, lat]` in EPSG:4326. Required. */
18
15
  position: Coordinate;
16
+ /** Symbol size in pixels. Default (set by `milsymbol`): 30. */
17
+ size?: number;
18
+ /** Mono-color override (e.g. `'#000'`). */
19
+ monoColor?: string;
20
+ /** Outline color. */
21
+ outlineColor?: string;
22
+ /** Icon (interior glyph) color. */
23
+ iconColor?: string;
24
+ /** Additional information field (top of the symbol). */
25
+ additionalInformation?: string;
26
+ /** Staff comments field. */
27
+ staffComments?: string;
28
+ /** Quantity field. */
29
+ quantity?: number;
30
+ /** Unique designation field (unit identifier). */
31
+ uniqueDesignation?: string;
32
+ /** Custom feature properties merged into the output feature's `properties`. */
33
+ properties?: Record<string, unknown>;
34
+ }
35
+ /**
36
+ * Result of resolving a `MilSymbolConfig` against `milsymbol`. Embedded
37
+ * into the output feature's `style.icon` so that `<ol-vector-layer>` can
38
+ * render it as an `ol/style/Icon`.
39
+ */
40
+ interface MilSymbolStyleResult {
41
+ /** `data:image/svg+xml;base64,...` URL produced from `Symbol.asSVG()`. */
42
+ src: string;
43
+ /** Pixel `[width, height]` from `Symbol.getSize()`. */
44
+ size: [number, number];
45
+ /**
46
+ * Anchor in fractional coordinates `[x, y]` (0..1), computed from
47
+ * `Symbol.getAnchor()` divided by the size. `[0.5, 0.5]` centers the
48
+ * icon on the feature.
49
+ */
50
+ anchor: [number, number];
19
51
  }
20
52
 
53
+ /**
54
+ * Service exposing geometry helpers and MIL-STD-2525 symbology rendering.
55
+ *
56
+ * - `createEllipse`, `createSector`, `createDonut` are **pure math** and
57
+ * delegate to {@link OlGeometryService} in core.
58
+ * - `createMilSymbol` uses the milsymbol library via Angular resource loading.
59
+ */
21
60
  declare class OlMilitaryService {
61
+ private idCounter;
62
+ private geometryService;
63
+ /**
64
+ * Resource managing the lazy-loading of the milsymbol library.
65
+ * Angular resource provides native signals for value, loading state, and errors.
66
+ */
67
+ private readonly msResource;
68
+ /** Signal indicating if the milsymbol library is currently being loaded. */
69
+ readonly isLoading: i0.Signal<boolean>;
70
+ constructor();
71
+ /**
72
+ * Build a `Feature<Polygon>` approximating an ellipse centered at
73
+ * `config.center`. See {@link EllipseConfig} for parameter semantics.
74
+ */
22
75
  createEllipse(config: EllipseConfig): Feature;
76
+ /**
77
+ * Build a `Feature<Polygon>` for a circular sector (pie slice).
78
+ * See {@link SectorConfig} for parameter semantics.
79
+ */
23
80
  createSector(config: SectorConfig): Feature;
24
- addMilSymbol(config: MilSymbolConfig): Feature;
81
+ /**
82
+ * Build a `Feature<Polygon>` for a donut (annular ring).
83
+ */
84
+ createDonut(config: DonutConfig): Feature;
85
+ /**
86
+ * Pre-load the optional `milsymbol` peer dependency.
87
+ * Since resource() starts loading immediately, this simply returns a promise
88
+ * that resolves when the resource is ready.
89
+ */
90
+ preloadMilsymbol(): Promise<void>;
91
+ /**
92
+ * Build a MIL-STD-2525 symbol feature asynchronously.
93
+ * Waits for the milsymbol resource to resolve.
94
+ */
95
+ createMilSymbol(config: MilSymbolConfig): Promise<Feature>;
96
+ /**
97
+ * Build a MIL-STD-2525 symbol feature synchronously.
98
+ * Throws if `milsymbol` resource is not ready.
99
+ */
100
+ createMilSymbolSync(config: MilSymbolConfig): Feature;
101
+ private nextId;
102
+ private buildSymbolFeature;
103
+ private symbolToStyleResult;
104
+ private encodeBase64Utf8;
105
+ /**
106
+ * Generates a canvas and anchor for a MIL-STD-2525 symbol.
107
+ * Requires milsymbol to be loaded (synchronous).
108
+ */
109
+ createUnitStyle(sidc: string, selected?: boolean, size?: number): {
110
+ image: {
111
+ img: HTMLCanvasElement;
112
+ size: [number, number];
113
+ anchor: [number, number];
114
+ };
115
+ zIndex: number;
116
+ } | null;
117
+ private assertSidc;
118
+ private assertBrowser;
25
119
  static ɵfac: i0.ɵɵFactoryDeclaration<OlMilitaryService, never>;
26
120
  static ɵprov: i0.ɵɵInjectableDeclaration<OlMilitaryService>;
27
121
  }
28
122
 
123
+ /**
124
+ * Service providing styles and geometry generators for military tactical graphics
125
+ * such as battle fronts, axes of attack, and boundaries.
126
+ *
127
+ * NOTE: For point symbols (units), it delegates to {@link OlMilitaryService}
128
+ * for lazy-loading `milsymbol`.
129
+ */
130
+ declare class OlTacticalGraphicsService {
131
+ private idCounter;
132
+ private militaryService;
133
+ /**
134
+ * Creates a LineString feature representing a battle front.
135
+ */
136
+ createFrontLine(coordinates: Coordinate[], direction?: 'friendly' | 'hostile'): Feature;
137
+ /**
138
+ * Creates a LineString feature representing an attack arrow.
139
+ */
140
+ createAttackArrow(coordinates: Coordinate[], direction?: 'friendly' | 'hostile'): Feature;
141
+ /**
142
+ * Creates a Polygon feature representing a control zone.
143
+ */
144
+ createControlZone(coordinates: Coordinate[][], direction?: 'friendly' | 'hostile'): Feature;
145
+ /**
146
+ * Creates a Point feature representing a military unit.
147
+ * @param sidc - Symbol Identification Code (MIL-STD-2525 / APP-6)
148
+ */
149
+ createUnit(coordinate: Coordinate, sidc: string, name: string): Feature;
150
+ private nextId;
151
+ /**
152
+ * Style for Troop Units using milsymbol.
153
+ * NOTE: Requires milsymbol to be pre-loaded via OlMilitaryService.
154
+ */
155
+ createUnitStyle(sidc: string, selected?: boolean): Style | null;
156
+ /**
157
+ * Style for Battle Fronts (Complex LineString with teeth).
158
+ */
159
+ createFrontLineStyle(color: string, direction?: 'friendly' | 'hostile'): (feature: Feature$1, resolution: number) => Style[];
160
+ /**
161
+ * Style for Troop Movements (Arrows).
162
+ */
163
+ createAttackArrowStyle(color: string): (feature: Feature$1) => Style[];
164
+ /**
165
+ * Style for Control Zones (Polygons).
166
+ */
167
+ createZoneStyle(color: string, opacity?: number): Style;
168
+ private hexToRgba;
169
+ static ɵfac: i0.ɵɵFactoryDeclaration<OlTacticalGraphicsService, never>;
170
+ static ɵprov: i0.ɵɵInjectableDeclaration<OlTacticalGraphicsService>;
171
+ }
172
+
29
173
  declare function withMilitary(): OlFeature<'military'>;
30
174
  declare function provideMilitary(): OlFeature<'military'>;
31
175
 
32
- export { OlMilitaryService, provideMilitary, withMilitary };
33
- export type { EllipseConfig, MilSymbolConfig, SectorConfig };
176
+ export { OlMilitaryService, OlTacticalGraphicsService, provideMilitary, withMilitary };
177
+ export type { MilSymbolConfig, MilSymbolStyleResult };