@angular-helpers/openlayers 21.14.1 → 22.0.1
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/fesm2022/angular-helpers-openlayers-controls.mjs +114 -86
- package/fesm2022/angular-helpers-openlayers-core.mjs +42 -30
- package/fesm2022/angular-helpers-openlayers-interactions.mjs +76 -55
- package/fesm2022/angular-helpers-openlayers-layers.mjs +155 -97
- package/fesm2022/angular-helpers-openlayers-military.mjs +6 -6
- package/fesm2022/angular-helpers-openlayers-overlays.mjs +26 -19
- package/package.json +4 -4
- package/types/angular-helpers-openlayers-controls.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, input, output, DestroyRef, effect,
|
|
2
|
+
import { inject, ElementRef, input, output, DestroyRef, effect, Component, Directive, EnvironmentInjector, ApplicationRef, createComponent, Injectable } from '@angular/core';
|
|
3
3
|
import Overlay from 'ol/Overlay';
|
|
4
4
|
import { OlMapService, OlZoneHelper } from '@angular-helpers/openlayers/core';
|
|
5
5
|
import { OlLayerService } from '@angular-helpers/openlayers/layers';
|
|
@@ -30,15 +30,20 @@ class OlPopupComponent {
|
|
|
30
30
|
mapService = inject(OlMapService);
|
|
31
31
|
zoneHelper = inject(OlZoneHelper);
|
|
32
32
|
/** Map coordinate where the popup is anchored. `null` hides the popup. */
|
|
33
|
-
position = input(null,
|
|
33
|
+
position = input(null, /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
34
35
|
/** Pixel offset relative to `position`. */
|
|
35
|
-
offset = input([0, 0],
|
|
36
|
+
offset = input([0, 0], /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
36
38
|
/** Anchor of the popup element relative to `position`. */
|
|
37
|
-
positioning = input('bottom-center',
|
|
39
|
+
positioning = input('bottom-center', /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "positioning" }] : /* istanbul ignore next */ []));
|
|
38
41
|
/** Whether the map auto-pans to keep the popup in view. */
|
|
39
|
-
autoPan = input(false,
|
|
42
|
+
autoPan = input(false, /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "autoPan" }] : /* istanbul ignore next */ []));
|
|
40
44
|
/** Whether to render the default close button. */
|
|
41
|
-
closeButton = input(false,
|
|
45
|
+
closeButton = input(false, /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "closeButton" }] : /* istanbul ignore next */ []));
|
|
42
47
|
/** Emitted when the popup transitions from visible to hidden (close button or `position` set to null). */
|
|
43
48
|
closed = output();
|
|
44
49
|
overlay = null;
|
|
@@ -107,19 +112,19 @@ class OlPopupComponent {
|
|
|
107
112
|
this.overlay = null;
|
|
108
113
|
this.currentMap = null;
|
|
109
114
|
}
|
|
110
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
111
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
115
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: OlPopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
116
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: OlPopupComponent, isStandalone: true, selector: "ol-popup", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, positioning: { classPropertyName: "positioning", publicName: "positioning", isSignal: true, isRequired: false, transformFunction: null }, autoPan: { classPropertyName: "autoPan", publicName: "autoPan", isSignal: true, isRequired: false, transformFunction: null }, closeButton: { classPropertyName: "closeButton", publicName: "closeButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { attributes: { "role": "dialog" } }, ngImport: i0, template: `
|
|
112
117
|
@if (closeButton()) {
|
|
113
118
|
<button type="button" class="ol-popup-close" aria-label="Close" (click)="onCloseClick()">
|
|
114
119
|
×
|
|
115
120
|
</button>
|
|
116
121
|
}
|
|
117
122
|
<ng-content />
|
|
118
|
-
`, isInline: true, styles: [":host{display:block;position:relative}.ol-popup-close{position:absolute;top:4px;right:4px;width:20px;height:20px;padding:0;border:none;background:transparent;font-size:16px;line-height:1;cursor:pointer;color:inherit}\n"]
|
|
123
|
+
`, isInline: true, styles: [":host{display:block;position:relative}.ol-popup-close{position:absolute;top:4px;right:4px;width:20px;height:20px;padding:0;border:none;background:transparent;font-size:16px;line-height:1;cursor:pointer;color:inherit}\n"] });
|
|
119
124
|
}
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: OlPopupComponent, decorators: [{
|
|
121
126
|
type: Component,
|
|
122
|
-
args: [{ selector: 'ol-popup',
|
|
127
|
+
args: [{ selector: 'ol-popup', template: `
|
|
123
128
|
@if (closeButton()) {
|
|
124
129
|
<button type="button" class="ol-popup-close" aria-label="Close" (click)="onCloseClick()">
|
|
125
130
|
×
|
|
@@ -154,9 +159,11 @@ class OlTooltipDirective {
|
|
|
154
159
|
mapService = inject(OlMapService);
|
|
155
160
|
zoneHelper = inject(OlZoneHelper);
|
|
156
161
|
/** Property key to read from the hovered feature. */
|
|
157
|
-
olTooltip = input.required(
|
|
162
|
+
olTooltip = input.required(/* @ts-ignore */
|
|
163
|
+
...(ngDevMode ? [{ debugName: "olTooltip" }] : /* istanbul ignore next */ []));
|
|
158
164
|
/** Optional layer id; when set, only features on that layer trigger the tooltip. */
|
|
159
|
-
olTooltipLayer = input(null,
|
|
165
|
+
olTooltipLayer = input(null, /* @ts-ignore */
|
|
166
|
+
...(ngDevMode ? [{ debugName: "olTooltipLayer" }] : /* istanbul ignore next */ []));
|
|
160
167
|
element = null;
|
|
161
168
|
listener = null;
|
|
162
169
|
currentMap = null;
|
|
@@ -253,10 +260,10 @@ class OlTooltipDirective {
|
|
|
253
260
|
this.listener = null;
|
|
254
261
|
this.currentMap = null;
|
|
255
262
|
}
|
|
256
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
257
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
263
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: OlTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
264
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.0", type: OlTooltipDirective, isStandalone: true, selector: "[olTooltip]", inputs: { olTooltip: { classPropertyName: "olTooltip", publicName: "olTooltip", isSignal: true, isRequired: true, transformFunction: null }, olTooltipLayer: { classPropertyName: "olTooltipLayer", publicName: "olTooltipLayer", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
258
265
|
}
|
|
259
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: OlTooltipDirective, decorators: [{
|
|
260
267
|
type: Directive,
|
|
261
268
|
args: [{
|
|
262
269
|
selector: '[olTooltip]',
|
|
@@ -434,10 +441,10 @@ class OlPopupService {
|
|
|
434
441
|
this.popups.set(id, { id, overlay, componentRef: ref, dispose });
|
|
435
442
|
});
|
|
436
443
|
}
|
|
437
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
438
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
444
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: OlPopupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
445
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: OlPopupService });
|
|
439
446
|
}
|
|
440
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: OlPopupService, decorators: [{
|
|
441
448
|
type: Injectable
|
|
442
449
|
}], ctorParameters: () => [] });
|
|
443
450
|
// -----------------------------------------------------------------------------
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-helpers/openlayers",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.1",
|
|
4
4
|
"description": "Modern Angular wrapper for OpenLayers with modular architecture, standalone components, and hybrid template/programmatic API",
|
|
5
5
|
"homepage": "https://gaspar1992.github.io/angular-helpers/docs/openlayers",
|
|
6
6
|
"repository": {
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@angular-helpers/testing": "
|
|
34
|
-
"@angular/common": "^
|
|
35
|
-
"@angular/core": "^
|
|
33
|
+
"@angular-helpers/testing": "workspace:*",
|
|
34
|
+
"@angular/common": "^22.0.0",
|
|
35
|
+
"@angular/core": "^22.0.0",
|
|
36
36
|
"milsymbol": "^3.0.0",
|
|
37
37
|
"ol": "^10.0.0"
|
|
38
38
|
},
|
|
@@ -204,7 +204,7 @@ declare class OlGeolocationControlComponent {
|
|
|
204
204
|
private destroyRef;
|
|
205
205
|
position: _angular_core.InputSignal<ControlPosition>;
|
|
206
206
|
trackingChange: _angular_core.OutputEmitterRef<boolean>;
|
|
207
|
-
controlElement: ElementRef<HTMLElement
|
|
207
|
+
controlElement: _angular_core.Signal<ElementRef<HTMLElement>>;
|
|
208
208
|
protected tracking: _angular_core.WritableSignal<boolean>;
|
|
209
209
|
private control?;
|
|
210
210
|
private geolocation?;
|