aur-openlayers 19.6.5 → 19.6.6

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.
@@ -483,12 +483,25 @@ export type ArrowDecoration = {
483
483
  */
484
484
  offsetRatio?: number;
485
485
  };
486
+ /**
487
+ * Конфигурация буферного полигона (коридора) вдоль LineString.
488
+ */
489
+ export type BufferDecoration = {
490
+ /** Ширина буфера в метрах (в одну сторону — полная ширина = distance * 2). */
491
+ distance: number;
492
+ /** Стиль буферного полигона (OL Style). */
493
+ style: Style | Style[];
494
+ /** Форма торцов. По умолчанию: 'round'. */
495
+ cap?: 'round' | 'flat';
496
+ };
486
497
  /**
487
498
  * Декоративные элементы вдоль LineString-геометрий.
488
499
  */
489
500
  export type LineDecorations = {
490
501
  /** Стрелки направления вдоль линии. */
491
502
  arrows?: ArrowDecoration;
503
+ /** Буферный полигон (коридор) вокруг линии. */
504
+ buffer?: BufferDecoration;
492
505
  };
493
506
  /**
494
507
  * Описание фичи: геометрия, стиль, взаимодействия и popup.
@@ -0,0 +1,27 @@
1
+ import VectorLayer from 'ol/layer/Vector';
2
+ import type OlMap from 'ol/Map';
3
+ import type { BufferDecoration, VectorLayerApi } from '../../public/types';
4
+ export type BufferDecorationManagerOptions = {
5
+ map: OlMap;
6
+ parentLayer: VectorLayer;
7
+ parentApi: VectorLayerApi<any, any>;
8
+ config: BufferDecoration;
9
+ };
10
+ export declare class BufferDecorationManager {
11
+ private readonly source;
12
+ private readonly layer;
13
+ private readonly config;
14
+ private readonly map;
15
+ private readonly parentLayer;
16
+ private readonly parentApi;
17
+ private readonly moveEndKey;
18
+ private readonly unsubCollection;
19
+ private readonly unsubChanges;
20
+ private rafId;
21
+ constructor(options: BufferDecorationManagerOptions);
22
+ private scheduleUpdate;
23
+ private rebuild;
24
+ private syncVisibility;
25
+ private syncOpacity;
26
+ dispose(): void;
27
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Generate a closed polygon ring representing a buffer around a polyline.
3
+ *
4
+ * @param coords Line vertices in EPSG:3857.
5
+ * @param distance Buffer width in meters (one side).
6
+ * @param cap End cap style: 'round' or 'flat'.
7
+ * @returns Closed ring (first == last point), or empty array if line is degenerate.
8
+ */
9
+ export declare function generateBufferPolygon(coords: number[][], distance: number, cap: 'round' | 'flat'): number[][];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aur-openlayers",
3
- "version": "19.6.5",
3
+ "version": "19.6.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0",