@geosdi/ngx-leaflet-minimap-plugin 1.1.6 → 2.0.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 CHANGED
@@ -1,24 +1,45 @@
1
- # NgxLeafletMinimap
1
+ # @geosdi/ngx-leaflet-minimap-plugin
2
2
 
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.0.
4
-
5
- # General information
6
-
7
- Service to wrap Leaflet.MiniMap see documentation to https://github.com/Norkart/Leaflet-MiniMap
3
+ Adds a minimap to a Leaflet map: a small overview in a corner that follows the main map. It is an
4
+ Angular service around [Leaflet-MiniMap](https://github.com/Norkart/Leaflet-MiniMap), configured
5
+ with a fluent API.
8
6
 
9
7
  ## Installation
10
8
 
11
9
  `npm i @geosdi/ngx-leaflet-minimap-plugin --save`
12
10
 
13
- It depends on :
11
+ Peer dependencies:
14
12
 
15
- "@angular/common": ">=20.0.0",
16
- "@angular/core": ">=20.0.0",
17
- "typescript": ">=5.0.0",
13
+ "@angular/core": ">=22.0.0",
18
14
  "leaflet": ">=1.9.3",
19
15
  "rxjs": ">=7.8.2",
20
16
  "leaflet-minimap": ">=3.6.1"
21
17
 
18
+ Include `leaflet-minimap/dist/Control.MiniMap.min.css` for the minimap's frame and toggle button.
19
+
20
+ ## Usage
21
+
22
+ ```typescript
23
+ import { inject } from "@angular/core";
24
+ import * as L from "leaflet";
25
+ import { NgxLeafletMinimapPluginService } from "@geosdi/ngx-leaflet-minimap-plugin";
26
+
27
+ const minimap = inject(NgxLeafletMinimapPluginService);
28
+
29
+ minimap
30
+ .withMap(map)
31
+ .withLayer(L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png"))
32
+ .withPosition("bottomright")
33
+ .withZoomLevelOffset(-3)
34
+ .withMimimized(false)
35
+ .withStrings({ hideText: "Hide", showText: "Show" })
36
+ .applyMiniMapPlugin();
37
+
38
+ minimap.subjectMiniMapEvent$.subscribe((open) =>
39
+ console.log(open ? "restored" : "minimized"),
40
+ );
41
+ ```
42
+
22
43
  ## The base layer
23
44
 
24
45
  `withLayer` is optional: without it the minimap shows OpenStreetMap, requested the way their
@@ -33,62 +54,60 @@ forbids relying on them for an application you distribute. Pass your own layer
33
54
  `NgxLeafletLayersPluginService.createLayer(...)`, which builds the same layers as the main map — and
34
55
  the default is never used.
35
56
 
36
- ## Usage
37
-
38
- ```typescript
39
-
40
- @Injectable({
41
- providedIn: 'root'
42
- })
43
- export class BootstrapService {
44
-
45
-
46
- constructor(private ngxLeafletPrintPluginService: NgxLeafletPrintPluginService) {
47
- }
48
-
49
- public initMiniMap() {
50
- this.ngxLeafletMinimapPluginService
51
- .withMap(this.map)
52
- .withLayer(this.ngxLeafletLayersPluginService.createLayer(BaseLayerEnum.OPEN_STREET_MAP))
53
- .withZoomLevelOffset(-3)
54
- .withAutoToogleDisplay(false)
55
- .withToogleDisplay(true)
56
- .withPosition('bottomright')
57
- .withHeight(150)
58
- .withWidth(150)
59
- .withCollapsedWidth(9)
60
- .withCollapsedWidth(9)
61
- .withCenterFixed([lat, lng])
62
- .withMinimized(true)
63
- .withStrings(strings: { hideText: 'Hide', showText: 'Show' }
64
- .withZoomAnimation()
65
- .withZoomLevelFixed(3)
66
- .withZoomLevelOffset(3)
67
- .applyMiniMapPlugin();
68
- }
69
-
70
- }
71
-
72
- ```
73
-
74
57
  ## Methods
75
58
 
76
- | Method | action |
77
- | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
78
- | withMap(map: any): NgxLeafletMinimapPluginService | the leaflet map |
79
- | withLayer(layer: any): NgxLeafletMinimapPluginService | base layer to display |
80
- | withToogleDisplay(toogle: boolean): NgxLeafletMinimapPluginService | Sets whether the minimap should have a button to minimise it. Defaults to false. |
81
- | withAutoToogleDisplay(autoToogleDislay: boolean): NgxLeafletMinimapPluginService | Sets whether the minimap should hide automatically if the parent map bounds does not fit within the minimap bounds. Especially useful when 'zoomLevelFixed' is set. |
82
- | withPosition(position: 'topleft' | 'topright' | 'bottomleft' | 'bottomright'): NgxLeafletMinimapPluginService | position of the button |
83
- | withHeight(height: number): NgxLeafletMinimapPluginService | The height of the minimap in pixels. Defaults to 150 |
84
- | withWidth(width: number): NgxLeafletMinimapPluginService | The width of the minimap in pixels. Defaults to 150 |
85
- | withCollapseHeight(collapseHeight: number): NgxLeafletMinimapPluginService | The width of the toggle marker and the minimap when collapsed, in pixels. Defaults to 19. |
86
- | withCollapseWidth(collapseWidth: number): NgxLeafletMinimapPluginService | The height of the toggle marker and the minimap when collapsed, in pixels. Defaults to 19. |
87
- | withZoomLevelOffset(zoomLevelOffset: number): NgxLeafletMinimapPluginService | The offset applied to the zoom in the minimap compared to the zoom of the main map. Can be positive or negative, defaults to -5. |
88
- | withZoomLevelFixed(zoomLevelFixed: number): NgxLeafletMinimapPluginService | Overrides the offset to apply a fixed zoom level to the minimap regardless of the main map zoom. Set it to any valid zoom level, if unset zoomLevelOffset is used instead. |
89
- | withCenterFixed(centerFixed: number[]): NgxLeafletMinimapPluginService | Applies a fixed position to the minimap regardless of the main map's view / position. Prevents panning the minimap, but does allow zooming (both in the minimap and the main map). If the minimap is zoomed, it will always zoom around the centerFixed point. You can pass in a LatLng-equivalent object. Defaults to false. |
90
- | withZoomAnimation(zoomAnimation: any): NgxLeafletMinimapPluginService | Sets whether the minimap should have an animated zoom. (Will cause it to lag a bit after the movement of the main map.) Defaults to false. |
91
- | withMimimized(minimized: boolean): NgxLeafletMinimapPluginService | Sets whether the minimap should start in a minimized position. |
92
- | withStrings(strings: {hideText: string, showText: string}): NgxLeafletMinimapPluginService | Overrides the default strings allowing for translation. |
93
- | applyMiniMapPlugin(): void | add plugin to map |
94
- | changeLayer(layer: any): void | change base layer to map |
59
+ Every `with…` method returns the service, so the calls can be chained; `applyMiniMapPlugin()` adds
60
+ the minimap. The defaults are the service's, which differ from Leaflet-MiniMap's in three places
61
+ (toggle button, automatic hiding, Italian labels).
62
+
63
+ | Method | Default | Meaning |
64
+ | ------------------------------------- | ---------------------------------------------- | ---------------------------------------------------------------- |
65
+ | `withMap(map)` | — | the Leaflet map to add the minimap to; required |
66
+ | `withLayer(layer)` | OpenStreetMap, see above | the layer the minimap shows |
67
+ | `withPosition(position)` | `"bottomright"` | `"topleft"`, `"topright"`, `"bottomleft"` or `"bottomright"` |
68
+ | `withWidth(width)` | `150` | width in pixels |
69
+ | `withHeight(height)` | `150` | height in pixels |
70
+ | `withCollapseWidth(width)` | `19` | width in pixels when minimized |
71
+ | `withCollapseHeight(height)` | `19` | height in pixels when minimized |
72
+ | `withZoomLevelOffset(offset)` | `-5` | the minimap's zoom relative to the main map's |
73
+ | `withZoomLevelFixed(zoom)` | not set | a fixed zoom, overriding the offset |
74
+ | `withCenterFixed([lat, lng])` | not set | a fixed center: the minimap does not pan |
75
+ | `withZoomAnimation(animate)` | `false` | animate the minimap's zoom (it then lags a bit behind the map) |
76
+ | `withToogleDisplay(toggle)` | `true` | show the button that minimizes the minimap |
77
+ | `withAutoToogleDisplay(auto)` | `true` | hide the minimap when the main map's view does not fit inside it |
78
+ | `withMimimized(minimized)` | `false` | start minimized |
79
+ | `withStrings({ hideText, showText })` | `{ hideText: "Nascondi", showText: "Mostra" }` | the labels of the toggle button |
80
+ | `withMapOptions(options)` | — | **has no effect**: see below |
81
+ | `applyMiniMapPlugin()` | — | adds the minimap; does nothing without a map |
82
+ | `changeLayer(layer)` | — | changes the layer of the minimap already on the map |
83
+
84
+ | Member | Meaning |
85
+ | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
86
+ | `subjectMiniMapEvent$` | emits `false` when the user minimizes the minimap, `true` when they restore it |
87
+ | `subjectChangeLayer$` | a layer pushed here is used by the **next** `applyMiniMapPlugin()`; it does not change the minimap on screen, `changeLayer` does |
88
+ | `minimap` | the Leaflet-MiniMap control, once added |
89
+
90
+ ## Things to know
91
+
92
+ - **The names `withToogleDisplay`, `withAutoToogleDisplay` and `withMimimized` are misspelled**:
93
+ they are part of the public API and are kept as they are.
94
+ - **`withMapOptions` does not change anything**: the value is stored but not passed to
95
+ Leaflet-MiniMap.
96
+ - **`withAutoToogleDisplay` is on by default**: with a fixed zoom or on a map zoomed far out the
97
+ minimap can disappear by itself, and re-appear when the view fits again.
98
+ - **The service is a singleton** (`providedIn: "root"`): the settings stay for the next call, and
99
+ each `applyMiniMapPlugin()` adds a new minimap, so call it once per map.
100
+
101
+ ## Changes in 2.0.0
102
+
103
+ - **A major version** because the peer dependencies now ask for Angular 22: an application on an
104
+ older Angular can no longer install it. The API is unchanged unless a point below says otherwise.
105
+ - `typescript` is no longer a peer dependency: nothing in the package imports it.
106
+ - **The Angular peer dependencies are `>=22.0.0`**: the library is compiled and tested with
107
+ Angular 22 only, so it no longer claims to install on older versions.
108
+ - Compiled with Angular 22.
109
+ - `@angular/common` is no longer a peer dependency: nothing in the library imports it. The
110
+ `rxjs` range lost a stray leading space (`" >=7.8.2"`), and the keywords say "minimap" instead
111
+ of "base layer".
112
+ - The installation block of this README matches the new peer dependencies. The code is
113
+ unchanged.
@@ -1,227 +1,160 @@
1
- import * as L from 'leaflet';
2
- import * as i0 from '@angular/core';
3
- import { Injectable } from '@angular/core';
4
- import MiniMap from 'leaflet-minimap';
5
- import { Subject } from 'rxjs';
6
-
7
- //@ts-ignore
8
- class NgxLeafletMinimapPluginService {
9
- constructor() {
10
- this.subjectMiniMapEvent$ = new Subject();
11
- this.subjectChangeLayer$ = new Subject();
12
- /**
13
- * Lo sfondo di ripiego, per chi non passa `withLayer`.
14
- *
15
- * Chiede i tile di OSM come la loro
16
- * {@link https://operations.osmfoundation.org/policies/tiles/ usage policy}
17
- * pretende, che è la stessa regola del basemap in
18
- * `ngx-leaflet-layers-plugin` — e chi non la rispetta si vede rispondere
19
- * **403 con il tile «Access blocked»**, che a video non è un errore ma un
20
- * riquadro grigio, quindi si cerca il guasto nel codice che disegna :
21
- *
22
- * - **host singolo**, niente sottodomini `{s}` : quelli servivano a
23
- * moltiplicare le connessioni parallele di HTTP/1.1 verso server tenuti da
24
- * volontari, sono deprecati e oggi sono solo carico in più;
25
- * - **attribuzione cliccabile**, verso `openstreetmap.org/copyright`;
26
- * - **fin dove si vuole chiedere**, che è la coppia qui sotto.
27
- *
28
- * `maxNativeZoom` a 13 **non** è un limite di quanto si può zoomare : è fin
29
- * dove i tile si scaricano, e sopra Leaflet ingrandisce quelli che ha. Tenuto
30
- * basso di proposito — la minimappa è un riquadro da 150px, dove un tile z13
31
- * ingrandito non si distingue da uno z18 nuovo, e ogni livello in più sarebbe
32
- * un'altra griglia di richieste a quei server per niente. È il risparmio che
33
- * il vecchio `maxZoom: 13` otteneva, ma quello **nascondeva il layer** oltre
34
- * il 13 : su una mappa che zooma più in là — maplite in Agitec arriva a 30 —
35
- * la minimappa restava **bianca**, senza che niente lo dicesse.
36
- *
37
- * La minimappa raddoppia le richieste di una pagina, perché mostra lo stesso
38
- * sfondo della mappa grande : è il motivo per cui qui conta più che altrove.
39
- */
40
- this.layer = new L.TileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
41
- minZoom: 0,
42
- maxNativeZoom: 13,
43
- maxZoom: 22,
44
- attribution: '&copy; <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">OpenStreetMap</a> contributors',
45
- });
46
- this.position = "bottomright";
47
- this.toogle = true;
48
- this.autoToogleDisplay = true;
49
- this.height = 150;
50
- this.width = 150;
51
- this.collapsedHeight = 19;
52
- this.collapsedWidth = 19;
53
- this.minimized = false;
54
- this.strings = {
55
- hideText: "Nascondi",
56
- showText: "Mostra",
57
- };
58
- this.zoomLevelOffset = -5;
59
- this.subjectChangeLayer$.subscribe((theLayer) => (this.layer = theLayer));
60
- }
61
- /**
62
- * @param map
63
- */
64
- withMap(map) {
65
- this.map = map;
66
- return this;
67
- }
68
- withToogleDisplay(toogle) {
69
- this.toogle = toogle;
70
- return this;
71
- }
72
- /**
73
- * @param autoToogleDislay
74
- */
75
- withAutoToogleDisplay(autoToogleDislay) {
76
- this.autoToogleDisplay = autoToogleDislay;
77
- return this;
78
- }
79
- /**
80
- * @param layer
81
- */
82
- withLayer(layer) {
83
- this.layer = layer;
84
- return this;
85
- }
86
- /**
87
- * @param position
88
- */
89
- withPosition(position) {
90
- this.position = position;
91
- return this;
92
- }
93
- /**
94
- * @param height
95
- */
96
- withHeight(height) {
97
- this.height = height;
98
- return this;
99
- }
100
- /**
101
- * @param width
102
- */
103
- withWidth(width) {
104
- this.width = width;
105
- return this;
106
- }
107
- /**
108
- * @param centerFixed
109
- */
110
- withCenterFixed(centerFixed) {
111
- this.centerFixed = centerFixed;
112
- return this;
113
- }
114
- /**
115
- * @param collapseHeight
116
- */
117
- withCollapseHeight(collapseHeight) {
118
- this.collapsedHeight = collapseHeight;
119
- return this;
120
- }
121
- /**
122
- * @param collapseWidth
123
- */
124
- withCollapseWidth(collapseWidth) {
125
- this.collapsedWidth = collapseWidth;
126
- return this;
127
- }
128
- /**
129
- * @param minimized
130
- */
131
- withMimimized(minimized) {
132
- this.minimized = minimized;
133
- return this;
134
- }
135
- withStrings(strings) {
136
- this.strings = strings;
137
- return this;
138
- }
139
- /**
140
- * @param zoomAnimation
141
- */
142
- withZoomAnimation(zoomAnimation) {
143
- this.zoomAnimation = zoomAnimation;
144
- return this;
145
- }
146
- /**
147
- * @param zoomLevelFixed
148
- */
149
- withZoomLevelFixed(zoomLevelFixed) {
150
- this.zoomLevelFixed = zoomLevelFixed;
151
- return this;
152
- }
153
- /**
154
- * @param zoomLevelOffset
155
- */
156
- withZoomLevelOffset(zoomLevelOffset) {
157
- this.zoomLevelOffset = zoomLevelOffset;
158
- return this;
159
- }
160
- /**
161
- * @param theMapOptions
162
- */
163
- withMapOptions(theMapOptions) {
164
- this.mapOptions = theMapOptions;
165
- return this;
166
- }
167
- /**
168
- * @param layer
169
- */
170
- changeLayer(layer) {
171
- this.layer = layer;
172
- this._miniMap?.changeLayer(this.layer);
173
- }
174
- /**
175
- *
176
- */
177
- get minimap() {
178
- return this._miniMap;
179
- }
180
- /**
181
- */
182
- applyMiniMapPlugin() {
183
- if (this.map) {
184
- this._miniMap = new MiniMap(this.layer, {
185
- position: this.position,
186
- width: this.width,
187
- height: this.height,
188
- collapsedWidth: this.collapsedWidth,
189
- collapsedHeight: this.collapsedHeight,
190
- zoomLevelOffset: this.zoomLevelOffset,
191
- zoomLevelFixed: this.zoomLevelFixed,
192
- centerFixed: this.centerFixed,
193
- zoomAnimation: this.zoomAnimation,
194
- toggleDisplay: this.toogle,
195
- autoToggleDisplay: this.autoToogleDisplay,
196
- minimized: this.minimized,
197
- strings: this.strings,
198
- //mapOptions: this.mapOptions
199
- }).addTo(this.map);
200
- this._miniMap.on("minimize", () => {
201
- this.subjectMiniMapEvent$.next(false);
202
- });
203
- this._miniMap.on("restore", () => {
204
- this.subjectMiniMapEvent$.next(true);
205
- });
206
- }
207
- }
208
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxLeafletMinimapPluginService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
209
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxLeafletMinimapPluginService, providedIn: "root" }); }
210
- }
211
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxLeafletMinimapPluginService, decorators: [{
212
- type: Injectable,
213
- args: [{
214
- providedIn: "root",
215
- }]
216
- }], ctorParameters: () => [] });
217
-
218
- /*
219
- * Public API Surface of ngx-leaflet-minimap-plugin
220
- */
221
-
222
- /**
223
- * Generated bundle index. Do not edit.
224
- */
225
-
1
+ import * as L from "leaflet";
2
+ import * as i0 from "@angular/core";
3
+ import { Injectable } from "@angular/core";
4
+ import MiniMap from "leaflet-minimap";
5
+ import { Subject } from "rxjs";
6
+ var NgxLeafletMinimapPluginService = class NgxLeafletMinimapPluginService {
7
+ constructor() {
8
+ this.subjectMiniMapEvent$ = new Subject();
9
+ this.subjectChangeLayer$ = new Subject();
10
+ this.layer = new L.TileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
11
+ minZoom: 0,
12
+ maxNativeZoom: 13,
13
+ maxZoom: 22,
14
+ attribution: "&copy; <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noopener\">OpenStreetMap</a> contributors"
15
+ });
16
+ this.position = "bottomright";
17
+ this.toogle = true;
18
+ this.autoToogleDisplay = true;
19
+ this.height = 150;
20
+ this.width = 150;
21
+ this.collapsedHeight = 19;
22
+ this.collapsedWidth = 19;
23
+ this.minimized = false;
24
+ this.strings = {
25
+ hideText: "Nascondi",
26
+ showText: "Mostra"
27
+ };
28
+ this.zoomLevelOffset = -5;
29
+ this.subjectChangeLayer$.subscribe((theLayer) => this.layer = theLayer);
30
+ }
31
+ withMap(map) {
32
+ this.map = map;
33
+ return this;
34
+ }
35
+ withToogleDisplay(toogle) {
36
+ this.toogle = toogle;
37
+ return this;
38
+ }
39
+ withAutoToogleDisplay(autoToogleDislay) {
40
+ this.autoToogleDisplay = autoToogleDislay;
41
+ return this;
42
+ }
43
+ withLayer(layer) {
44
+ this.layer = layer;
45
+ return this;
46
+ }
47
+ withPosition(position) {
48
+ this.position = position;
49
+ return this;
50
+ }
51
+ withHeight(height) {
52
+ this.height = height;
53
+ return this;
54
+ }
55
+ withWidth(width) {
56
+ this.width = width;
57
+ return this;
58
+ }
59
+ withCenterFixed(centerFixed) {
60
+ this.centerFixed = centerFixed;
61
+ return this;
62
+ }
63
+ withCollapseHeight(collapseHeight) {
64
+ this.collapsedHeight = collapseHeight;
65
+ return this;
66
+ }
67
+ withCollapseWidth(collapseWidth) {
68
+ this.collapsedWidth = collapseWidth;
69
+ return this;
70
+ }
71
+ withMimimized(minimized) {
72
+ this.minimized = minimized;
73
+ return this;
74
+ }
75
+ withStrings(strings) {
76
+ this.strings = strings;
77
+ return this;
78
+ }
79
+ withZoomAnimation(zoomAnimation) {
80
+ this.zoomAnimation = zoomAnimation;
81
+ return this;
82
+ }
83
+ withZoomLevelFixed(zoomLevelFixed) {
84
+ this.zoomLevelFixed = zoomLevelFixed;
85
+ return this;
86
+ }
87
+ withZoomLevelOffset(zoomLevelOffset) {
88
+ this.zoomLevelOffset = zoomLevelOffset;
89
+ return this;
90
+ }
91
+ withMapOptions(theMapOptions) {
92
+ this.mapOptions = theMapOptions;
93
+ return this;
94
+ }
95
+ changeLayer(layer) {
96
+ this.layer = layer;
97
+ this._miniMap?.changeLayer(this.layer);
98
+ }
99
+ get minimap() {
100
+ return this._miniMap;
101
+ }
102
+ applyMiniMapPlugin() {
103
+ if (this.map) {
104
+ this._miniMap = new MiniMap(this.layer, {
105
+ position: this.position,
106
+ width: this.width,
107
+ height: this.height,
108
+ collapsedWidth: this.collapsedWidth,
109
+ collapsedHeight: this.collapsedHeight,
110
+ zoomLevelOffset: this.zoomLevelOffset,
111
+ zoomLevelFixed: this.zoomLevelFixed,
112
+ centerFixed: this.centerFixed,
113
+ zoomAnimation: this.zoomAnimation,
114
+ toggleDisplay: this.toogle,
115
+ autoToggleDisplay: this.autoToogleDisplay,
116
+ minimized: this.minimized,
117
+ strings: this.strings
118
+ }).addTo(this.map);
119
+ this._miniMap.on("minimize", () => {
120
+ this.subjectMiniMapEvent$.next(false);
121
+ });
122
+ this._miniMap.on("restore", () => {
123
+ this.subjectMiniMapEvent$.next(true);
124
+ });
125
+ }
126
+ }
127
+ static {
128
+ this.ɵfac = i0.ɵɵngDeclareFactory({
129
+ minVersion: "12.0.0",
130
+ version: "22.2.4",
131
+ ngImport: i0,
132
+ type: NgxLeafletMinimapPluginService,
133
+ deps: [],
134
+ target: i0.ɵɵFactoryTarget.Injectable
135
+ });
136
+ }
137
+ static {
138
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
139
+ minVersion: "12.0.0",
140
+ version: "22.2.4",
141
+ ngImport: i0,
142
+ type: NgxLeafletMinimapPluginService,
143
+ providedIn: "root"
144
+ });
145
+ }
146
+ };
147
+ i0.ɵɵngDeclareClassMetadata({
148
+ minVersion: "12.0.0",
149
+ version: "22.2.4",
150
+ ngImport: i0,
151
+ type: NgxLeafletMinimapPluginService,
152
+ decorators: [{
153
+ type: Injectable,
154
+ args: [{ providedIn: "root" }]
155
+ }],
156
+ ctorParameters: () => []
157
+ });
226
158
  export { NgxLeafletMinimapPluginService };
227
- //# sourceMappingURL=geosdi-ngx-leaflet-minimap-plugin.mjs.map
159
+
160
+ //# sourceMappingURL=geosdi-ngx-leaflet-minimap-plugin.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"geosdi-ngx-leaflet-minimap-plugin.mjs","sources":["../../../../projects/geosdi/leaflet/ngx-leaflet-minimap-plugin/src/lib/ngx-leaflet-minimap-plugin.service.ts","../../../../projects/geosdi/leaflet/ngx-leaflet-minimap-plugin/src/index.ts","../../../../projects/geosdi/leaflet/ngx-leaflet-minimap-plugin/src/geosdi-ngx-leaflet-minimap-plugin.ts"],"sourcesContent":["//@ts-ignore\nimport * as L from \"leaflet\";\nimport { Injectable } from \"@angular/core\";\n//@ts-ignore\nimport MiniMap from \"leaflet-minimap\";\nimport { Subject } from \"rxjs\";\n\n/**\n * @author Vito Salvia - CNR IMAA geoSDI Group\n * @email vito.salvia@gmail.com\n */\nexport interface INgxLeafletMinimapPluginService {\n /**\n * @param map\n */\n withMap(map: any): NgxLeafletMinimapPluginService;\n\n /**\n * @param layer\n */\n withLayer(layer: any): NgxLeafletMinimapPluginService;\n\n /**\n * @param toogle\n */\n withToogleDisplay(toogle: boolean): NgxLeafletMinimapPluginService;\n\n /**\n * @param autoToogleDislay\n */\n withAutoToogleDisplay(\n autoToogleDislay: boolean,\n ): NgxLeafletMinimapPluginService;\n\n /**\n * @param position\n */\n withPosition(\n position: \"topleft\" | \"topright\" | \"bottomleft\" | \"bottomright\",\n ): NgxLeafletMinimapPluginService;\n\n /**\n * @param height\n */\n withHeight(height: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param width\n */\n withWidth(width: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param collapseHeight\n */\n withCollapseHeight(collapseHeight: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param collapseWidth\n */\n withCollapseWidth(collapseWidth: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param zoomLevelOffset\n */\n withZoomLevelOffset(\n zoomLevelOffset: number,\n ): NgxLeafletMinimapPluginService;\n\n /**\n * @param zoomLevelOffset\n */\n withZoomLevelFixed(zoomLevelFixed: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param centerFixed\n */\n withCenterFixed(centerFixed: number[]): NgxLeafletMinimapPluginService;\n\n /**\n * @param zoomAnimation\n */\n withZoomAnimation(zoomAnimation: any): NgxLeafletMinimapPluginService;\n\n /**\n * @param minimized\n */\n withMimimized(minimized: boolean): NgxLeafletMinimapPluginService;\n\n /**\n * @param strings\n */\n withStrings(strings: {\n hideText: string;\n showText: string;\n }): NgxLeafletMinimapPluginService;\n\n /**\n * @param theMapOptions\n */\n withMapOptions(theMapOptions: any): NgxLeafletMinimapPluginService;\n\n /**\n */\n applyMiniMapPlugin(): void;\n\n /**\n * @param layer\n */\n changeLayer(layer: any): void;\n}\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class NgxLeafletMinimapPluginService implements INgxLeafletMinimapPluginService {\n subjectMiniMapEvent$ = new Subject<boolean>();\n subjectChangeLayer$ = new Subject<any>();\n private map: any;\n /**\n * Lo sfondo di ripiego, per chi non passa `withLayer`.\n *\n * Chiede i tile di OSM come la loro\n * {@link https://operations.osmfoundation.org/policies/tiles/ usage policy}\n * pretende, che è la stessa regola del basemap in\n * `ngx-leaflet-layers-plugin` — e chi non la rispetta si vede rispondere\n * **403 con il tile «Access blocked»**, che a video non è un errore ma un\n * riquadro grigio, quindi si cerca il guasto nel codice che disegna :\n *\n * - **host singolo**, niente sottodomini `{s}` : quelli servivano a\n * moltiplicare le connessioni parallele di HTTP/1.1 verso server tenuti da\n * volontari, sono deprecati e oggi sono solo carico in più;\n * - **attribuzione cliccabile**, verso `openstreetmap.org/copyright`;\n * - **fin dove si vuole chiedere**, che è la coppia qui sotto.\n *\n * `maxNativeZoom` a 13 **non** è un limite di quanto si può zoomare : è fin\n * dove i tile si scaricano, e sopra Leaflet ingrandisce quelli che ha. Tenuto\n * basso di proposito — la minimappa è un riquadro da 150px, dove un tile z13\n * ingrandito non si distingue da uno z18 nuovo, e ogni livello in più sarebbe\n * un'altra griglia di richieste a quei server per niente. È il risparmio che\n * il vecchio `maxZoom: 13` otteneva, ma quello **nascondeva il layer** oltre\n * il 13 : su una mappa che zooma più in là — maplite in Agitec arriva a 30 —\n * la minimappa restava **bianca**, senza che niente lo dicesse.\n *\n * La minimappa raddoppia le richieste di una pagina, perché mostra lo stesso\n * sfondo della mappa grande : è il motivo per cui qui conta più che altrove.\n */\n private layer: any = new L.TileLayer(\n \"https://tile.openstreetmap.org/{z}/{x}/{y}.png\",\n {\n minZoom: 0,\n maxNativeZoom: 13,\n maxZoom: 22,\n attribution:\n '&copy; <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noopener\">OpenStreetMap</a> contributors',\n },\n );\n private _miniMap: any;\n private position: string = \"bottomright\";\n private toogle: boolean = true;\n private autoToogleDisplay: boolean = true;\n private height: number = 150;\n private width: number = 150;\n private collapsedHeight: number = 19;\n private collapsedWidth: number = 19;\n private centerFixed: number[];\n private minimized: boolean = false;\n private strings: { hideText: string; showText: string } = {\n hideText: \"Nascondi\",\n showText: \"Mostra\",\n };\n private zoomAnimation: any;\n private zoomLevelFixed: number;\n private zoomLevelOffset: number = -5;\n private mapOptions: any;\n\n constructor() {\n this.subjectChangeLayer$.subscribe(\n (theLayer: any) => (this.layer = theLayer),\n );\n }\n\n /**\n * @param map\n */\n withMap(map: any): NgxLeafletMinimapPluginService {\n this.map = map;\n return this;\n }\n\n withToogleDisplay(toogle: boolean): NgxLeafletMinimapPluginService {\n this.toogle = toogle;\n return this;\n }\n\n /**\n * @param autoToogleDislay\n */\n withAutoToogleDisplay(\n autoToogleDislay: boolean,\n ): NgxLeafletMinimapPluginService {\n this.autoToogleDisplay = autoToogleDislay;\n return this;\n }\n\n /**\n * @param layer\n */\n withLayer(layer: any): NgxLeafletMinimapPluginService {\n this.layer = layer;\n return this;\n }\n\n /**\n * @param position\n */\n withPosition(\n position: \"topleft\" | \"topright\" | \"bottomleft\" | \"bottomright\",\n ): NgxLeafletMinimapPluginService {\n this.position = position;\n return this;\n }\n\n /**\n * @param height\n */\n withHeight(height: number): NgxLeafletMinimapPluginService {\n this.height = height;\n return this;\n }\n\n /**\n * @param width\n */\n withWidth(width: number): NgxLeafletMinimapPluginService {\n this.width = width;\n return this;\n }\n\n /**\n * @param centerFixed\n */\n withCenterFixed(centerFixed: number[]): NgxLeafletMinimapPluginService {\n this.centerFixed = centerFixed;\n return this;\n }\n\n /**\n * @param collapseHeight\n */\n withCollapseHeight(collapseHeight: number): NgxLeafletMinimapPluginService {\n this.collapsedHeight = collapseHeight;\n return this;\n }\n\n /**\n * @param collapseWidth\n */\n withCollapseWidth(collapseWidth: number): NgxLeafletMinimapPluginService {\n this.collapsedWidth = collapseWidth;\n return this;\n }\n\n /**\n * @param minimized\n */\n withMimimized(minimized: boolean): NgxLeafletMinimapPluginService {\n this.minimized = minimized;\n return this;\n }\n\n withStrings(strings: {\n hideText: string;\n showText: string;\n }): NgxLeafletMinimapPluginService {\n this.strings = strings;\n return this;\n }\n\n /**\n * @param zoomAnimation\n */\n withZoomAnimation(zoomAnimation: any): NgxLeafletMinimapPluginService {\n this.zoomAnimation = zoomAnimation;\n return this;\n }\n\n /**\n * @param zoomLevelFixed\n */\n withZoomLevelFixed(zoomLevelFixed: number): NgxLeafletMinimapPluginService {\n this.zoomLevelFixed = zoomLevelFixed;\n return this;\n }\n\n /**\n * @param zoomLevelOffset\n */\n withZoomLevelOffset(\n zoomLevelOffset: number,\n ): NgxLeafletMinimapPluginService {\n this.zoomLevelOffset = zoomLevelOffset;\n return this;\n }\n\n /**\n * @param theMapOptions\n */\n withMapOptions(theMapOptions: any): NgxLeafletMinimapPluginService {\n this.mapOptions = theMapOptions;\n return this;\n }\n\n /**\n * @param layer\n */\n changeLayer(layer: any): void {\n this.layer = layer;\n this._miniMap?.changeLayer(this.layer);\n }\n\n /**\n *\n */\n get minimap() {\n return this._miniMap;\n }\n\n /**\n */\n applyMiniMapPlugin(): void {\n if (this.map) {\n this._miniMap = new MiniMap(this.layer, {\n position: this.position,\n width: this.width,\n height: this.height,\n collapsedWidth: this.collapsedWidth,\n collapsedHeight: this.collapsedHeight,\n zoomLevelOffset: this.zoomLevelOffset,\n zoomLevelFixed: this.zoomLevelFixed,\n centerFixed: this.centerFixed,\n zoomAnimation: this.zoomAnimation,\n toggleDisplay: this.toogle,\n autoToggleDisplay: this.autoToogleDisplay,\n minimized: this.minimized,\n strings: this.strings,\n //mapOptions: this.mapOptions\n }).addTo(this.map);\n this._miniMap.on(\"minimize\", () => {\n this.subjectMiniMapEvent$.next(false);\n });\n this._miniMap.on(\"restore\", () => {\n this.subjectMiniMapEvent$.next(true);\n });\n }\n }\n}\n","/*\n * Public API Surface of ngx-leaflet-minimap-plugin\n */\n\nexport * from \"./lib/ngx-leaflet-minimap-plugin.service\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;MAkHa,8BAA8B,CAAA;AA6DvC,IAAA,WAAA,GAAA;AA5DA,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,OAAO,EAAW;AAC7C,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,OAAO,EAAO;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AACK,QAAA,IAAA,CAAA,KAAK,GAAQ,IAAI,CAAC,CAAC,SAAS,CAChC,gDAAgD,EAChD;AACI,YAAA,OAAO,EAAE,CAAC;AACV,YAAA,aAAa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AQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAK;AAC7B,gBAAA,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;AACxC,YAAA,CAAC,CAAC;QACN;IACJ;iIAhPS,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA9B,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8BAA8B,cAF3B,MAAM,EAAA,CAAA,CAAA;;2FAET,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAH1C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA;;;ACjHD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"geosdi-ngx-leaflet-minimap-plugin.mjs","names":[],"sources":["../../../../projects/geosdi/leaflet/ngx-leaflet-minimap-plugin/src/lib/ngx-leaflet-minimap-plugin.service.ts"],"sourcesContent":["//@ts-ignore\nimport * as L from \"leaflet\";\nimport { Injectable } from \"@angular/core\";\n//@ts-ignore\nimport MiniMap from \"leaflet-minimap\";\nimport { Subject } from \"rxjs\";\n\n/**\n * @author Vito Salvia - CNR IMAA geoSDI Group\n * @email vito.salvia@gmail.com\n */\nexport interface INgxLeafletMinimapPluginService {\n /**\n * @param map\n */\n withMap(map: any): NgxLeafletMinimapPluginService;\n\n /**\n * @param layer\n */\n withLayer(layer: any): NgxLeafletMinimapPluginService;\n\n /**\n * @param toogle\n */\n withToogleDisplay(toogle: boolean): NgxLeafletMinimapPluginService;\n\n /**\n * @param autoToogleDislay\n */\n withAutoToogleDisplay(\n autoToogleDislay: boolean,\n ): NgxLeafletMinimapPluginService;\n\n /**\n * @param position\n */\n withPosition(\n position: \"topleft\" | \"topright\" | \"bottomleft\" | \"bottomright\",\n ): NgxLeafletMinimapPluginService;\n\n /**\n * @param height\n */\n withHeight(height: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param width\n */\n withWidth(width: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param collapseHeight\n */\n withCollapseHeight(collapseHeight: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param collapseWidth\n */\n withCollapseWidth(collapseWidth: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param zoomLevelOffset\n */\n withZoomLevelOffset(\n zoomLevelOffset: number,\n ): NgxLeafletMinimapPluginService;\n\n /**\n * @param zoomLevelOffset\n */\n withZoomLevelFixed(zoomLevelFixed: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param centerFixed\n */\n withCenterFixed(centerFixed: number[]): NgxLeafletMinimapPluginService;\n\n /**\n * @param zoomAnimation\n */\n withZoomAnimation(zoomAnimation: any): NgxLeafletMinimapPluginService;\n\n /**\n * @param minimized\n */\n withMimimized(minimized: boolean): NgxLeafletMinimapPluginService;\n\n /**\n * @param strings\n */\n withStrings(strings: {\n hideText: string;\n showText: string;\n }): NgxLeafletMinimapPluginService;\n\n /**\n * @param theMapOptions\n */\n withMapOptions(theMapOptions: any): NgxLeafletMinimapPluginService;\n\n /**\n */\n applyMiniMapPlugin(): void;\n\n /**\n * @param layer\n */\n changeLayer(layer: any): void;\n}\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class NgxLeafletMinimapPluginService implements INgxLeafletMinimapPluginService {\n subjectMiniMapEvent$ = new Subject<boolean>();\n subjectChangeLayer$ = new Subject<any>();\n private map: any;\n /**\n * Lo sfondo di ripiego, per chi non passa `withLayer`.\n *\n * Chiede i tile di OSM come la loro\n * {@link https://operations.osmfoundation.org/policies/tiles/ usage policy}\n * pretende, che è la stessa regola del basemap in\n * `ngx-leaflet-layers-plugin` — e chi non la rispetta si vede rispondere\n * **403 con il tile «Access blocked»**, che a video non è un errore ma un\n * riquadro grigio, quindi si cerca il guasto nel codice che disegna :\n *\n * - **host singolo**, niente sottodomini `{s}` : quelli servivano a\n * moltiplicare le connessioni parallele di HTTP/1.1 verso server tenuti da\n * volontari, sono deprecati e oggi sono solo carico in più;\n * - **attribuzione cliccabile**, verso `openstreetmap.org/copyright`;\n * - **fin dove si vuole chiedere**, che è la coppia qui sotto.\n *\n * `maxNativeZoom` a 13 **non** è un limite di quanto si può zoomare : è fin\n * dove i tile si scaricano, e sopra Leaflet ingrandisce quelli che ha. Tenuto\n * basso di proposito — la minimappa è un riquadro da 150px, dove un tile z13\n * ingrandito non si distingue da uno z18 nuovo, e ogni livello in più sarebbe\n * un'altra griglia di richieste a quei server per niente. È il risparmio che\n * il vecchio `maxZoom: 13` otteneva, ma quello **nascondeva il layer** oltre\n * il 13 : su una mappa che zooma più in là — maplite in Agitec arriva a 30 —\n * la minimappa restava **bianca**, senza che niente lo dicesse.\n *\n * La minimappa raddoppia le richieste di una pagina, perché mostra lo stesso\n * sfondo della mappa grande : è il motivo per cui qui conta più che altrove.\n */\n private layer: any = new L.TileLayer(\n \"https://tile.openstreetmap.org/{z}/{x}/{y}.png\",\n {\n minZoom: 0,\n maxNativeZoom: 13,\n maxZoom: 22,\n attribution:\n '&copy; <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noopener\">OpenStreetMap</a> contributors',\n },\n );\n private _miniMap: any;\n private position: string = \"bottomright\";\n private toogle: boolean = true;\n private autoToogleDisplay: boolean = true;\n private height: number = 150;\n private width: number = 150;\n private collapsedHeight: number = 19;\n private collapsedWidth: number = 19;\n private centerFixed: number[];\n private minimized: boolean = false;\n private strings: { hideText: string; showText: string } = {\n hideText: \"Nascondi\",\n showText: \"Mostra\",\n };\n private zoomAnimation: any;\n private zoomLevelFixed: number;\n private zoomLevelOffset: number = -5;\n private mapOptions: any;\n\n constructor() {\n this.subjectChangeLayer$.subscribe(\n (theLayer: any) => (this.layer = theLayer),\n );\n }\n\n /**\n * @param map\n */\n withMap(map: any): NgxLeafletMinimapPluginService {\n this.map = map;\n return this;\n }\n\n withToogleDisplay(toogle: boolean): NgxLeafletMinimapPluginService {\n this.toogle = toogle;\n return this;\n }\n\n /**\n * @param autoToogleDislay\n */\n withAutoToogleDisplay(\n autoToogleDislay: boolean,\n ): NgxLeafletMinimapPluginService {\n this.autoToogleDisplay = autoToogleDislay;\n return this;\n }\n\n /**\n * @param layer\n */\n withLayer(layer: any): NgxLeafletMinimapPluginService {\n this.layer = layer;\n return this;\n }\n\n /**\n * @param position\n */\n withPosition(\n position: \"topleft\" | \"topright\" | \"bottomleft\" | \"bottomright\",\n ): NgxLeafletMinimapPluginService {\n this.position = position;\n return this;\n }\n\n /**\n * @param height\n */\n withHeight(height: number): NgxLeafletMinimapPluginService {\n this.height = height;\n return this;\n }\n\n /**\n * @param width\n */\n withWidth(width: number): NgxLeafletMinimapPluginService {\n this.width = width;\n return this;\n }\n\n /**\n * @param centerFixed\n */\n withCenterFixed(centerFixed: number[]): NgxLeafletMinimapPluginService {\n this.centerFixed = centerFixed;\n return this;\n }\n\n /**\n * @param collapseHeight\n */\n withCollapseHeight(collapseHeight: number): NgxLeafletMinimapPluginService {\n this.collapsedHeight = collapseHeight;\n return this;\n }\n\n /**\n * @param collapseWidth\n */\n withCollapseWidth(collapseWidth: number): NgxLeafletMinimapPluginService {\n this.collapsedWidth = collapseWidth;\n return this;\n }\n\n /**\n * @param minimized\n */\n withMimimized(minimized: boolean): NgxLeafletMinimapPluginService {\n this.minimized = minimized;\n return this;\n }\n\n withStrings(strings: {\n hideText: string;\n showText: string;\n }): NgxLeafletMinimapPluginService {\n this.strings = strings;\n return this;\n }\n\n /**\n * @param zoomAnimation\n */\n withZoomAnimation(zoomAnimation: any): NgxLeafletMinimapPluginService {\n this.zoomAnimation = zoomAnimation;\n return this;\n }\n\n /**\n * @param zoomLevelFixed\n */\n withZoomLevelFixed(zoomLevelFixed: number): NgxLeafletMinimapPluginService {\n this.zoomLevelFixed = zoomLevelFixed;\n return this;\n }\n\n /**\n * @param zoomLevelOffset\n */\n withZoomLevelOffset(\n zoomLevelOffset: number,\n ): NgxLeafletMinimapPluginService {\n this.zoomLevelOffset = zoomLevelOffset;\n return this;\n }\n\n /**\n * @param theMapOptions\n */\n withMapOptions(theMapOptions: any): NgxLeafletMinimapPluginService {\n this.mapOptions = theMapOptions;\n return this;\n }\n\n /**\n * @param layer\n */\n changeLayer(layer: any): void {\n this.layer = layer;\n this._miniMap?.changeLayer(this.layer);\n }\n\n /**\n *\n */\n get minimap() {\n return this._miniMap;\n }\n\n /**\n */\n applyMiniMapPlugin(): void {\n if (this.map) {\n this._miniMap = new MiniMap(this.layer, {\n position: this.position,\n width: this.width,\n height: this.height,\n collapsedWidth: this.collapsedWidth,\n collapsedHeight: this.collapsedHeight,\n zoomLevelOffset: this.zoomLevelOffset,\n zoomLevelFixed: this.zoomLevelFixed,\n centerFixed: this.centerFixed,\n zoomAnimation: this.zoomAnimation,\n toggleDisplay: this.toogle,\n autoToggleDisplay: this.autoToogleDisplay,\n minimized: this.minimized,\n strings: this.strings,\n //mapOptions: this.mapOptions\n }).addTo(this.map);\n this._miniMap.on(\"minimize\", () => {\n this.subjectMiniMapEvent$.next(false);\n });\n this._miniMap.on(\"restore\", () => {\n this.subjectMiniMapEvent$.next(true);\n });\n }\n }\n}\n"],"mappings":";;;;;AAkHA,IAAa,iCAAb,MAAa,+BAA8B;CA6DvC,cAAA;EA5DA,KAAA,uBAAuB,IAAI,QAAO;EAClC,KAAA,sBAAsB,IAAI,QAAO;EA8BzB,KAAA,QAAa,IAAI,EAAE,UACvB,kDACA;GACI,SAAS;GACT,eAAe;GACf,SAAS;GACT,aACI;EACP,CAAA;EAGG,KAAA,WAAmB;EACnB,KAAA,SAAkB;EAClB,KAAA,oBAA6B;EAC7B,KAAA,SAAiB;EACjB,KAAA,QAAgB;EAChB,KAAA,kBAA0B;EAC1B,KAAA,iBAAyB;EAEzB,KAAA,YAAqB;EACrB,KAAA,UAAkD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KAAK;IACZ,QAAQ,KAAK;IACb,gBAAgB,KAAK;IACrB,iBAAiB,KAAK;IACtB,iBAAiB,KAAK;IACtB,gBAAgB,KAAK;IACrB,aAAa,KAAK;IAClB,eAAe,KAAK;IACpB,eAAe,KAAK;IACpB,mBAAmB,KAAK;IACxB,WAAW,KAAK;IAChB,SAAS,KAAK;GAEjB,CAAA,CAAC,CAAC,MAAM,KAAK,GAAG;GACjB,KAAK,SAAS,GAAG,kBAAiB;IAC9B,KAAK,qBAAqB,KAAK,KAAK;GACxC,CAAC;GACD,KAAK,SAAS,GAAG,iBAAgB;IAC7B,KAAK,qBAAqB,KAAK,IAAI;GACvC,CAAC;EACL;CACJ;CAhPS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA8B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA9B;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA8B,YAF3B;EAAM,CAAA;CAAA;;AAET,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA8B,YAAA,CAAA;EAH1C,MAAA;EAAW,MAAA,CAAA,EACR,YAAY,OACf,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geosdi/ngx-leaflet-minimap-plugin",
3
- "version": "1.1.6",
3
+ "version": "2.0.0",
4
4
  "description": "Service to add minimap for Leaflet Map",
5
5
  "author": "Salvia Vito (vito.salvia@gmail.com)",
6
6
  "keywords": [
@@ -9,18 +9,16 @@
9
9
  "typescript",
10
10
  "leaflet",
11
11
  "map",
12
- "base layer"
12
+ "minimap"
13
13
  ],
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
16
  "tslib": "^2.3.0"
17
17
  },
18
18
  "peerDependencies": {
19
- "@angular/common": ">=20.0.0",
20
- "@angular/core": ">=20.0.0",
21
- "typescript": ">=5.0.0",
19
+ "@angular/core": ">=22.0.0",
22
20
  "leaflet": ">=1.9.3",
23
- "rxjs": " >=7.8.2",
21
+ "rxjs": ">=7.8.2",
24
22
  "leaflet-minimap": ">=3.6.1"
25
23
  },
26
24
  "module": "fesm2022/geosdi-ngx-leaflet-minimap-plugin.mjs",
@@ -1,210 +1,206 @@
1
- import { Subject } from 'rxjs';
2
- import * as i0 from '@angular/core';
3
-
1
+ import { Subject } from "rxjs";
2
+ import * as i0 from "@angular/core";
4
3
  /**
5
4
  * @author Vito Salvia - CNR IMAA geoSDI Group
6
5
  * @email vito.salvia@gmail.com
7
6
  */
8
- interface INgxLeafletMinimapPluginService {
9
- /**
10
- * @param map
11
- */
12
- withMap(map: any): NgxLeafletMinimapPluginService;
13
- /**
14
- * @param layer
15
- */
16
- withLayer(layer: any): NgxLeafletMinimapPluginService;
17
- /**
18
- * @param toogle
19
- */
20
- withToogleDisplay(toogle: boolean): NgxLeafletMinimapPluginService;
21
- /**
22
- * @param autoToogleDislay
23
- */
24
- withAutoToogleDisplay(autoToogleDislay: boolean): NgxLeafletMinimapPluginService;
25
- /**
26
- * @param position
27
- */
28
- withPosition(position: "topleft" | "topright" | "bottomleft" | "bottomright"): NgxLeafletMinimapPluginService;
29
- /**
30
- * @param height
31
- */
32
- withHeight(height: number): NgxLeafletMinimapPluginService;
33
- /**
34
- * @param width
35
- */
36
- withWidth(width: number): NgxLeafletMinimapPluginService;
37
- /**
38
- * @param collapseHeight
39
- */
40
- withCollapseHeight(collapseHeight: number): NgxLeafletMinimapPluginService;
41
- /**
42
- * @param collapseWidth
43
- */
44
- withCollapseWidth(collapseWidth: number): NgxLeafletMinimapPluginService;
45
- /**
46
- * @param zoomLevelOffset
47
- */
48
- withZoomLevelOffset(zoomLevelOffset: number): NgxLeafletMinimapPluginService;
49
- /**
50
- * @param zoomLevelOffset
51
- */
52
- withZoomLevelFixed(zoomLevelFixed: number): NgxLeafletMinimapPluginService;
53
- /**
54
- * @param centerFixed
55
- */
56
- withCenterFixed(centerFixed: number[]): NgxLeafletMinimapPluginService;
57
- /**
58
- * @param zoomAnimation
59
- */
60
- withZoomAnimation(zoomAnimation: any): NgxLeafletMinimapPluginService;
61
- /**
62
- * @param minimized
63
- */
64
- withMimimized(minimized: boolean): NgxLeafletMinimapPluginService;
65
- /**
66
- * @param strings
67
- */
68
- withStrings(strings: {
69
- hideText: string;
70
- showText: string;
71
- }): NgxLeafletMinimapPluginService;
72
- /**
73
- * @param theMapOptions
74
- */
75
- withMapOptions(theMapOptions: any): NgxLeafletMinimapPluginService;
76
- /**
77
- */
78
- applyMiniMapPlugin(): void;
79
- /**
80
- * @param layer
81
- */
82
- changeLayer(layer: any): void;
7
+ export interface INgxLeafletMinimapPluginService {
8
+ /**
9
+ * @param map
10
+ */
11
+ withMap(map: any): NgxLeafletMinimapPluginService;
12
+ /**
13
+ * @param layer
14
+ */
15
+ withLayer(layer: any): NgxLeafletMinimapPluginService;
16
+ /**
17
+ * @param toogle
18
+ */
19
+ withToogleDisplay(toogle: boolean): NgxLeafletMinimapPluginService;
20
+ /**
21
+ * @param autoToogleDislay
22
+ */
23
+ withAutoToogleDisplay(autoToogleDislay: boolean): NgxLeafletMinimapPluginService;
24
+ /**
25
+ * @param position
26
+ */
27
+ withPosition(position: "topleft" | "topright" | "bottomleft" | "bottomright"): NgxLeafletMinimapPluginService;
28
+ /**
29
+ * @param height
30
+ */
31
+ withHeight(height: number): NgxLeafletMinimapPluginService;
32
+ /**
33
+ * @param width
34
+ */
35
+ withWidth(width: number): NgxLeafletMinimapPluginService;
36
+ /**
37
+ * @param collapseHeight
38
+ */
39
+ withCollapseHeight(collapseHeight: number): NgxLeafletMinimapPluginService;
40
+ /**
41
+ * @param collapseWidth
42
+ */
43
+ withCollapseWidth(collapseWidth: number): NgxLeafletMinimapPluginService;
44
+ /**
45
+ * @param zoomLevelOffset
46
+ */
47
+ withZoomLevelOffset(zoomLevelOffset: number): NgxLeafletMinimapPluginService;
48
+ /**
49
+ * @param zoomLevelOffset
50
+ */
51
+ withZoomLevelFixed(zoomLevelFixed: number): NgxLeafletMinimapPluginService;
52
+ /**
53
+ * @param centerFixed
54
+ */
55
+ withCenterFixed(centerFixed: number[]): NgxLeafletMinimapPluginService;
56
+ /**
57
+ * @param zoomAnimation
58
+ */
59
+ withZoomAnimation(zoomAnimation: any): NgxLeafletMinimapPluginService;
60
+ /**
61
+ * @param minimized
62
+ */
63
+ withMimimized(minimized: boolean): NgxLeafletMinimapPluginService;
64
+ /**
65
+ * @param strings
66
+ */
67
+ withStrings(strings: {
68
+ hideText: string;
69
+ showText: string;
70
+ }): NgxLeafletMinimapPluginService;
71
+ /**
72
+ * @param theMapOptions
73
+ */
74
+ withMapOptions(theMapOptions: any): NgxLeafletMinimapPluginService;
75
+ /**
76
+ */
77
+ applyMiniMapPlugin(): void;
78
+ /**
79
+ * @param layer
80
+ */
81
+ changeLayer(layer: any): void;
83
82
  }
84
- declare class NgxLeafletMinimapPluginService implements INgxLeafletMinimapPluginService {
85
- subjectMiniMapEvent$: Subject<boolean>;
86
- subjectChangeLayer$: Subject<any>;
87
- private map;
88
- /**
89
- * Lo sfondo di ripiego, per chi non passa `withLayer`.
90
- *
91
- * Chiede i tile di OSM come la loro
92
- * {@link https://operations.osmfoundation.org/policies/tiles/ usage policy}
93
- * pretende, che è la stessa regola del basemap in
94
- * `ngx-leaflet-layers-plugin` — e chi non la rispetta si vede rispondere
95
- * **403 con il tile «Access blocked»**, che a video non è un errore ma un
96
- * riquadro grigio, quindi si cerca il guasto nel codice che disegna :
97
- *
98
- * - **host singolo**, niente sottodomini `{s}` : quelli servivano a
99
- * moltiplicare le connessioni parallele di HTTP/1.1 verso server tenuti da
100
- * volontari, sono deprecati e oggi sono solo carico in più;
101
- * - **attribuzione cliccabile**, verso `openstreetmap.org/copyright`;
102
- * - **fin dove si vuole chiedere**, che è la coppia qui sotto.
103
- *
104
- * `maxNativeZoom` a 13 **non** è un limite di quanto si può zoomare : è fin
105
- * dove i tile si scaricano, e sopra Leaflet ingrandisce quelli che ha. Tenuto
106
- * basso di proposito — la minimappa è un riquadro da 150px, dove un tile z13
107
- * ingrandito non si distingue da uno z18 nuovo, e ogni livello in più sarebbe
108
- * un'altra griglia di richieste a quei server per niente. È il risparmio che
109
- * il vecchio `maxZoom: 13` otteneva, ma quello **nascondeva il layer** oltre
110
- * il 13 : su una mappa che zooma più in là — maplite in Agitec arriva a 30 —
111
- * la minimappa restava **bianca**, senza che niente lo dicesse.
112
- *
113
- * La minimappa raddoppia le richieste di una pagina, perché mostra lo stesso
114
- * sfondo della mappa grande : è il motivo per cui qui conta più che altrove.
115
- */
116
- private layer;
117
- private _miniMap;
118
- private position;
119
- private toogle;
120
- private autoToogleDisplay;
121
- private height;
122
- private width;
123
- private collapsedHeight;
124
- private collapsedWidth;
125
- private centerFixed;
126
- private minimized;
127
- private strings;
128
- private zoomAnimation;
129
- private zoomLevelFixed;
130
- private zoomLevelOffset;
131
- private mapOptions;
132
- constructor();
133
- /**
134
- * @param map
135
- */
136
- withMap(map: any): NgxLeafletMinimapPluginService;
137
- withToogleDisplay(toogle: boolean): NgxLeafletMinimapPluginService;
138
- /**
139
- * @param autoToogleDislay
140
- */
141
- withAutoToogleDisplay(autoToogleDislay: boolean): NgxLeafletMinimapPluginService;
142
- /**
143
- * @param layer
144
- */
145
- withLayer(layer: any): NgxLeafletMinimapPluginService;
146
- /**
147
- * @param position
148
- */
149
- withPosition(position: "topleft" | "topright" | "bottomleft" | "bottomright"): NgxLeafletMinimapPluginService;
150
- /**
151
- * @param height
152
- */
153
- withHeight(height: number): NgxLeafletMinimapPluginService;
154
- /**
155
- * @param width
156
- */
157
- withWidth(width: number): NgxLeafletMinimapPluginService;
158
- /**
159
- * @param centerFixed
160
- */
161
- withCenterFixed(centerFixed: number[]): NgxLeafletMinimapPluginService;
162
- /**
163
- * @param collapseHeight
164
- */
165
- withCollapseHeight(collapseHeight: number): NgxLeafletMinimapPluginService;
166
- /**
167
- * @param collapseWidth
168
- */
169
- withCollapseWidth(collapseWidth: number): NgxLeafletMinimapPluginService;
170
- /**
171
- * @param minimized
172
- */
173
- withMimimized(minimized: boolean): NgxLeafletMinimapPluginService;
174
- withStrings(strings: {
175
- hideText: string;
176
- showText: string;
177
- }): NgxLeafletMinimapPluginService;
178
- /**
179
- * @param zoomAnimation
180
- */
181
- withZoomAnimation(zoomAnimation: any): NgxLeafletMinimapPluginService;
182
- /**
183
- * @param zoomLevelFixed
184
- */
185
- withZoomLevelFixed(zoomLevelFixed: number): NgxLeafletMinimapPluginService;
186
- /**
187
- * @param zoomLevelOffset
188
- */
189
- withZoomLevelOffset(zoomLevelOffset: number): NgxLeafletMinimapPluginService;
190
- /**
191
- * @param theMapOptions
192
- */
193
- withMapOptions(theMapOptions: any): NgxLeafletMinimapPluginService;
194
- /**
195
- * @param layer
196
- */
197
- changeLayer(layer: any): void;
198
- /**
199
- *
200
- */
201
- get minimap(): any;
202
- /**
203
- */
204
- applyMiniMapPlugin(): void;
205
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxLeafletMinimapPluginService, never>;
206
- static ɵprov: i0.ɵɵInjectableDeclaration<NgxLeafletMinimapPluginService>;
207
- }
208
-
209
- export { NgxLeafletMinimapPluginService };
210
- export type { INgxLeafletMinimapPluginService };
83
+ export declare class NgxLeafletMinimapPluginService implements INgxLeafletMinimapPluginService {
84
+ subjectMiniMapEvent$: Subject<boolean>;
85
+ subjectChangeLayer$: Subject<any>;
86
+ private map;
87
+ /**
88
+ * Lo sfondo di ripiego, per chi non passa `withLayer`.
89
+ *
90
+ * Chiede i tile di OSM come la loro
91
+ * {@link https://operations.osmfoundation.org/policies/tiles/ usage policy}
92
+ * pretende, che è la stessa regola del basemap in
93
+ * `ngx-leaflet-layers-plugin` — e chi non la rispetta si vede rispondere
94
+ * **403 con il tile «Access blocked»**, che a video non è un errore ma un
95
+ * riquadro grigio, quindi si cerca il guasto nel codice che disegna :
96
+ *
97
+ * - **host singolo**, niente sottodomini `{s}` : quelli servivano a
98
+ * moltiplicare le connessioni parallele di HTTP/1.1 verso server tenuti da
99
+ * volontari, sono deprecati e oggi sono solo carico in più;
100
+ * - **attribuzione cliccabile**, verso `openstreetmap.org/copyright`;
101
+ * - **fin dove si vuole chiedere**, che è la coppia qui sotto.
102
+ *
103
+ * `maxNativeZoom` a 13 **non** è un limite di quanto si può zoomare : è fin
104
+ * dove i tile si scaricano, e sopra Leaflet ingrandisce quelli che ha. Tenuto
105
+ * basso di proposito — la minimappa è un riquadro da 150px, dove un tile z13
106
+ * ingrandito non si distingue da uno z18 nuovo, e ogni livello in più sarebbe
107
+ * un'altra griglia di richieste a quei server per niente. È il risparmio che
108
+ * il vecchio `maxZoom: 13` otteneva, ma quello **nascondeva il layer** oltre
109
+ * il 13 : su una mappa che zooma più in là — maplite in Agitec arriva a 30 —
110
+ * la minimappa restava **bianca**, senza che niente lo dicesse.
111
+ *
112
+ * La minimappa raddoppia le richieste di una pagina, perché mostra lo stesso
113
+ * sfondo della mappa grande : è il motivo per cui qui conta più che altrove.
114
+ */
115
+ private layer;
116
+ private _miniMap;
117
+ private position;
118
+ private toogle;
119
+ private autoToogleDisplay;
120
+ private height;
121
+ private width;
122
+ private collapsedHeight;
123
+ private collapsedWidth;
124
+ private centerFixed;
125
+ private minimized;
126
+ private strings;
127
+ private zoomAnimation;
128
+ private zoomLevelFixed;
129
+ private zoomLevelOffset;
130
+ private mapOptions;
131
+ constructor();
132
+ /**
133
+ * @param map
134
+ */
135
+ withMap(map: any): NgxLeafletMinimapPluginService;
136
+ withToogleDisplay(toogle: boolean): NgxLeafletMinimapPluginService;
137
+ /**
138
+ * @param autoToogleDislay
139
+ */
140
+ withAutoToogleDisplay(autoToogleDislay: boolean): NgxLeafletMinimapPluginService;
141
+ /**
142
+ * @param layer
143
+ */
144
+ withLayer(layer: any): NgxLeafletMinimapPluginService;
145
+ /**
146
+ * @param position
147
+ */
148
+ withPosition(position: "topleft" | "topright" | "bottomleft" | "bottomright"): NgxLeafletMinimapPluginService;
149
+ /**
150
+ * @param height
151
+ */
152
+ withHeight(height: number): NgxLeafletMinimapPluginService;
153
+ /**
154
+ * @param width
155
+ */
156
+ withWidth(width: number): NgxLeafletMinimapPluginService;
157
+ /**
158
+ * @param centerFixed
159
+ */
160
+ withCenterFixed(centerFixed: number[]): NgxLeafletMinimapPluginService;
161
+ /**
162
+ * @param collapseHeight
163
+ */
164
+ withCollapseHeight(collapseHeight: number): NgxLeafletMinimapPluginService;
165
+ /**
166
+ * @param collapseWidth
167
+ */
168
+ withCollapseWidth(collapseWidth: number): NgxLeafletMinimapPluginService;
169
+ /**
170
+ * @param minimized
171
+ */
172
+ withMimimized(minimized: boolean): NgxLeafletMinimapPluginService;
173
+ withStrings(strings: {
174
+ hideText: string;
175
+ showText: string;
176
+ }): NgxLeafletMinimapPluginService;
177
+ /**
178
+ * @param zoomAnimation
179
+ */
180
+ withZoomAnimation(zoomAnimation: any): NgxLeafletMinimapPluginService;
181
+ /**
182
+ * @param zoomLevelFixed
183
+ */
184
+ withZoomLevelFixed(zoomLevelFixed: number): NgxLeafletMinimapPluginService;
185
+ /**
186
+ * @param zoomLevelOffset
187
+ */
188
+ withZoomLevelOffset(zoomLevelOffset: number): NgxLeafletMinimapPluginService;
189
+ /**
190
+ * @param theMapOptions
191
+ */
192
+ withMapOptions(theMapOptions: any): NgxLeafletMinimapPluginService;
193
+ /**
194
+ * @param layer
195
+ */
196
+ changeLayer(layer: any): void;
197
+ /**
198
+ *
199
+ */
200
+ get minimap(): any;
201
+ /**
202
+ */
203
+ applyMiniMapPlugin(): void;
204
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxLeafletMinimapPluginService, never>;
205
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
206
+ }