aur-openlayers 1.0.4 → 19.6.4
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 +63 -63
- package/fesm2022/aur-openlayers.mjs +73 -42
- package/fesm2022/aur-openlayers.mjs.map +1 -1
- package/lib/map-framework/public/types.d.ts +11 -0
- package/lib/map-framework/runtime/fit-layer.utils.d.ts +4 -2
- package/lib/map-framework/runtime/vector-layer-base.d.ts +1 -0
- package/package.json +5 -1
|
@@ -271,6 +271,8 @@ export type ViewFitOptions = {
|
|
|
271
271
|
duration?: number;
|
|
272
272
|
/** Верхний предел увеличения. */
|
|
273
273
|
maxZoom?: number;
|
|
274
|
+
/** Сохранить текущий зум (maxZoom = текущий зум). Перекрывает maxZoom. */
|
|
275
|
+
keepZoom?: boolean;
|
|
274
276
|
};
|
|
275
277
|
/**
|
|
276
278
|
* Функция отписки от событий.
|
|
@@ -363,6 +365,11 @@ export type VectorLayerApi<M, G extends Geometry> = VectorLayerCollectionApi<M>
|
|
|
363
365
|
* Сбросить состояния стиля у фич к состоянию по умолчанию.
|
|
364
366
|
*/
|
|
365
367
|
clearFeatureStates: (ids: Id | ReadonlyArray<Id>) => void;
|
|
368
|
+
/**
|
|
369
|
+
* Возвращает extent всех фич базового источника (без кластеризации).
|
|
370
|
+
* Возвращает null, если фич нет.
|
|
371
|
+
*/
|
|
372
|
+
getExtent: () => import('ol/extent').Extent | null;
|
|
366
373
|
};
|
|
367
374
|
/**
|
|
368
375
|
* Источник появления popup-элемента.
|
|
@@ -432,6 +439,10 @@ export type MapContext = {
|
|
|
432
439
|
* Батчинг для группировки mutate/invalidate.
|
|
433
440
|
*/
|
|
434
441
|
batch: (fn: () => void, options?: BatchOptions) => void;
|
|
442
|
+
/** Центрирует карту на всех видимых слоях. No-op если нет фич. */
|
|
443
|
+
centerOnAllLayers: (opts?: ViewFitOptions) => void;
|
|
444
|
+
/** Центрирует карту на указанных слоях (скрытые пропускаются). No-op если нет фич. */
|
|
445
|
+
centerOnLayers: (layerIds: ReadonlyArray<string>, opts?: ViewFitOptions) => void;
|
|
435
446
|
};
|
|
436
447
|
/**
|
|
437
448
|
* Контроллер, который связывается с контекстом карты.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type OlMap from 'ol/Map';
|
|
2
|
+
import type { VectorLayerApi, ViewFitOptions, ViewFitPadding } from '../public/types';
|
|
2
3
|
export declare function toOlPadding(p?: ViewFitPadding, fallback?: [number, number, number, number] | undefined): [number, number, number, number] | undefined;
|
|
3
|
-
export declare function toOlFitOptions(opts?: ViewFitOptions): any;
|
|
4
|
+
export declare function toOlFitOptions(opts?: ViewFitOptions, map?: OlMap): any;
|
|
5
|
+
export declare function collectLayersExtent(layers: Record<string, VectorLayerApi<any, any>>, layerIds?: ReadonlyArray<string>): import('ol/extent').Extent | null;
|
|
@@ -44,6 +44,7 @@ export declare abstract class VectorLayerBase<M, G extends Geometry, OPTS extend
|
|
|
44
44
|
* Missing ids are ignored. No-op if none found.
|
|
45
45
|
*/
|
|
46
46
|
centerOnModels(ids: ReadonlyArray<string | number>, opts?: ViewFitOptions): void;
|
|
47
|
+
getExtent(): import('ol/extent').Extent | null;
|
|
47
48
|
setVisible(visible: boolean): void;
|
|
48
49
|
isVisible(): boolean;
|
|
49
50
|
setOpacity(opacity: number): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aur-openlayers",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.6.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^19.2.0",
|
|
6
6
|
"@angular/core": "^19.2.0",
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
"tslib": "^2.3.0"
|
|
11
11
|
},
|
|
12
12
|
"sideEffects": false,
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/NikolayNN/aur-openlayers"
|
|
16
|
+
},
|
|
13
17
|
"module": "fesm2022/aur-openlayers.mjs",
|
|
14
18
|
"typings": "index.d.ts",
|
|
15
19
|
"exports": {
|