@geosdi/ngx-leaflet-minimap-plugin 1.0.3 → 1.0.5
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 +1 -1
- package/esm2020/lib/ngx-leaflet-minimap-plugin.module.mjs +4 -4
- package/esm2020/lib/ngx-leaflet-minimap-plugin.service.mjs +28 -19
- package/fesm2015/geosdi-ngx-leaflet-minimap-plugin.mjs +28 -19
- package/fesm2015/geosdi-ngx-leaflet-minimap-plugin.mjs.map +1 -1
- package/fesm2020/geosdi-ngx-leaflet-minimap-plugin.mjs +28 -19
- package/fesm2020/geosdi-ngx-leaflet-minimap-plugin.mjs.map +1 -1
- package/lib/ngx-leaflet-minimap-plugin.service.d.ts +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,10 +6,10 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
*/
|
|
7
7
|
export class NgxLeafletMinimapPluginModule {
|
|
8
8
|
}
|
|
9
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
|
10
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.
|
|
11
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
|
9
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule });
|
|
11
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule, imports: [[]] });
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule, decorators: [{
|
|
13
13
|
type: NgModule,
|
|
14
14
|
args: [{
|
|
15
15
|
declarations: [],
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import * as L from "leaflet";
|
|
2
|
+
import { Injectable } from "@angular/core";
|
|
3
|
+
import MiniMap from "leaflet-minimap";
|
|
4
|
+
import { Subject } from "rxjs";
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export class NgxLeafletMinimapPluginService {
|
|
7
7
|
constructor() {
|
|
8
|
-
this.layer = new L.TileLayer(
|
|
8
|
+
this.layer = new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { minZoom: 0, maxZoom: 13 });
|
|
9
9
|
this.subjectMiniMapEvent$ = new Subject();
|
|
10
10
|
this.subjectChangeLayer$ = new Subject();
|
|
11
|
-
this.position =
|
|
11
|
+
this.position = "bottomright";
|
|
12
12
|
this.toogle = true;
|
|
13
13
|
this.autoToogleDisplay = true;
|
|
14
14
|
this.height = 150;
|
|
@@ -16,9 +16,12 @@ export class NgxLeafletMinimapPluginService {
|
|
|
16
16
|
this.collapsedHeight = 19;
|
|
17
17
|
this.collapsedWidth = 19;
|
|
18
18
|
this.minimized = false;
|
|
19
|
-
this.strings = {
|
|
19
|
+
this.strings = {
|
|
20
|
+
hideText: "Nascondi",
|
|
21
|
+
showText: "Mostra",
|
|
22
|
+
};
|
|
20
23
|
this.zoomLevelOffset = -5;
|
|
21
|
-
this.subjectChangeLayer$.subscribe((theLayer) => this.layer = theLayer);
|
|
24
|
+
this.subjectChangeLayer$.subscribe((theLayer) => (this.layer = theLayer));
|
|
22
25
|
}
|
|
23
26
|
/**
|
|
24
27
|
* @param map
|
|
@@ -131,16 +134,22 @@ export class NgxLeafletMinimapPluginService {
|
|
|
131
134
|
*/
|
|
132
135
|
changeLayer(layer) {
|
|
133
136
|
this.layer = layer;
|
|
134
|
-
this.
|
|
137
|
+
this._miniMap?.changeLayer(this.layer);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
*/
|
|
142
|
+
get minimap() {
|
|
143
|
+
return this._miniMap;
|
|
135
144
|
}
|
|
136
145
|
/**
|
|
137
146
|
*/
|
|
138
147
|
applyMiniMapPlugin() {
|
|
139
148
|
if (!this.map) {
|
|
140
|
-
alert(
|
|
149
|
+
alert("Impossibile aggiungere il plugin mouse cursor");
|
|
141
150
|
}
|
|
142
151
|
else {
|
|
143
|
-
this.
|
|
152
|
+
this._miniMap = new MiniMap(this.layer, {
|
|
144
153
|
position: this.position,
|
|
145
154
|
width: this.width,
|
|
146
155
|
height: this.height,
|
|
@@ -154,23 +163,23 @@ export class NgxLeafletMinimapPluginService {
|
|
|
154
163
|
autoToggleDisplay: this.autoToogleDisplay,
|
|
155
164
|
minimized: this.minimized,
|
|
156
165
|
strings: this.strings,
|
|
157
|
-
mapOptions: this.mapOptions
|
|
166
|
+
//mapOptions: this.mapOptions
|
|
158
167
|
}).addTo(this.map);
|
|
159
|
-
this.
|
|
168
|
+
this._miniMap.on("minimize", () => {
|
|
160
169
|
this.subjectMiniMapEvent$.next(false);
|
|
161
170
|
});
|
|
162
|
-
this.
|
|
171
|
+
this._miniMap.on("restore", () => {
|
|
163
172
|
this.subjectMiniMapEvent$.next(true);
|
|
164
173
|
});
|
|
165
174
|
}
|
|
166
175
|
}
|
|
167
176
|
}
|
|
168
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
|
169
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.
|
|
170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
|
177
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
178
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginService, providedIn: "root" });
|
|
179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginService, decorators: [{
|
|
171
180
|
type: Injectable,
|
|
172
181
|
args: [{
|
|
173
|
-
providedIn:
|
|
182
|
+
providedIn: "root",
|
|
174
183
|
}]
|
|
175
184
|
}], ctorParameters: function () { return []; } });
|
|
176
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWxlYWZsZXQtbWluaW1hcC1wbHVnaW4uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2dlb3NkaS9uZ3gtbGVhZmxldC1taW5pbWFwLXBsdWdpbi9zcmMvbGliL25neC1sZWFmbGV0LW1pbmltYXAtcGx1Z2luLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTy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cE9wdGlvbnM6IHRoaXMubWFwT3B0aW9uc1xuICAgICAgfSkuYWRkVG8odGhpcy5tYXApO1xuICAgICAgdGhpcy5fbWluaU1hcC5vbihcIm1pbmltaXplXCIsICgpID0+IHtcbiAgICAgICAgdGhpcy5zdWJqZWN0TWluaU1hcEV2ZW50JC5uZXh0KGZhbHNlKTtcbiAgICAgIH0pO1xuICAgICAgdGhpcy5fbWluaU1hcC5vbihcInJlc3RvcmVcIiwgKCkgPT4ge1xuICAgICAgICB0aGlzLnN1YmplY3RNaW5pTWFwRXZlbnQkLm5leHQodHJ1ZSk7XG4gICAgICB9KTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import * as L from 'leaflet';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
3
|
import { Injectable, NgModule } from '@angular/core';
|
|
3
4
|
import MiniMap from 'leaflet-minimap';
|
|
4
5
|
import { Subject } from 'rxjs';
|
|
5
|
-
import * as L from 'leaflet';
|
|
6
6
|
|
|
7
7
|
class NgxLeafletMinimapPluginService {
|
|
8
8
|
constructor() {
|
|
9
|
-
this.layer = new L.TileLayer(
|
|
9
|
+
this.layer = new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { minZoom: 0, maxZoom: 13 });
|
|
10
10
|
this.subjectMiniMapEvent$ = new Subject();
|
|
11
11
|
this.subjectChangeLayer$ = new Subject();
|
|
12
|
-
this.position =
|
|
12
|
+
this.position = "bottomright";
|
|
13
13
|
this.toogle = true;
|
|
14
14
|
this.autoToogleDisplay = true;
|
|
15
15
|
this.height = 150;
|
|
@@ -17,9 +17,12 @@ class NgxLeafletMinimapPluginService {
|
|
|
17
17
|
this.collapsedHeight = 19;
|
|
18
18
|
this.collapsedWidth = 19;
|
|
19
19
|
this.minimized = false;
|
|
20
|
-
this.strings = {
|
|
20
|
+
this.strings = {
|
|
21
|
+
hideText: "Nascondi",
|
|
22
|
+
showText: "Mostra",
|
|
23
|
+
};
|
|
21
24
|
this.zoomLevelOffset = -5;
|
|
22
|
-
this.subjectChangeLayer$.subscribe((theLayer) => this.layer = theLayer);
|
|
25
|
+
this.subjectChangeLayer$.subscribe((theLayer) => (this.layer = theLayer));
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
* @param map
|
|
@@ -133,16 +136,22 @@ class NgxLeafletMinimapPluginService {
|
|
|
133
136
|
changeLayer(layer) {
|
|
134
137
|
var _a;
|
|
135
138
|
this.layer = layer;
|
|
136
|
-
(_a = this.
|
|
139
|
+
(_a = this._miniMap) === null || _a === void 0 ? void 0 : _a.changeLayer(this.layer);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
*/
|
|
144
|
+
get minimap() {
|
|
145
|
+
return this._miniMap;
|
|
137
146
|
}
|
|
138
147
|
/**
|
|
139
148
|
*/
|
|
140
149
|
applyMiniMapPlugin() {
|
|
141
150
|
if (!this.map) {
|
|
142
|
-
alert(
|
|
151
|
+
alert("Impossibile aggiungere il plugin mouse cursor");
|
|
143
152
|
}
|
|
144
153
|
else {
|
|
145
|
-
this.
|
|
154
|
+
this._miniMap = new MiniMap(this.layer, {
|
|
146
155
|
position: this.position,
|
|
147
156
|
width: this.width,
|
|
148
157
|
height: this.height,
|
|
@@ -156,23 +165,23 @@ class NgxLeafletMinimapPluginService {
|
|
|
156
165
|
autoToggleDisplay: this.autoToogleDisplay,
|
|
157
166
|
minimized: this.minimized,
|
|
158
167
|
strings: this.strings,
|
|
159
|
-
mapOptions: this.mapOptions
|
|
168
|
+
//mapOptions: this.mapOptions
|
|
160
169
|
}).addTo(this.map);
|
|
161
|
-
this.
|
|
170
|
+
this._miniMap.on("minimize", () => {
|
|
162
171
|
this.subjectMiniMapEvent$.next(false);
|
|
163
172
|
});
|
|
164
|
-
this.
|
|
173
|
+
this._miniMap.on("restore", () => {
|
|
165
174
|
this.subjectMiniMapEvent$.next(true);
|
|
166
175
|
});
|
|
167
176
|
}
|
|
168
177
|
}
|
|
169
178
|
}
|
|
170
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
|
171
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
|
179
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
180
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginService, providedIn: "root" });
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginService, decorators: [{
|
|
173
182
|
type: Injectable,
|
|
174
183
|
args: [{
|
|
175
|
-
providedIn:
|
|
184
|
+
providedIn: "root",
|
|
176
185
|
}]
|
|
177
186
|
}], ctorParameters: function () { return []; } });
|
|
178
187
|
|
|
@@ -182,10 +191,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImpor
|
|
|
182
191
|
*/
|
|
183
192
|
class NgxLeafletMinimapPluginModule {
|
|
184
193
|
}
|
|
185
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
|
186
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.
|
|
187
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
|
194
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
195
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule });
|
|
196
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule, imports: [[]] });
|
|
197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule, decorators: [{
|
|
189
198
|
type: NgModule,
|
|
190
199
|
args: [{
|
|
191
200
|
declarations: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geosdi-ngx-leaflet-minimap-plugin.mjs","sources":["../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/lib/ngx-leaflet-minimap-plugin.service.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/lib/ngx-leaflet-minimap-plugin.module.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/public-api.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/geosdi-ngx-leaflet-minimap-plugin.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport MiniMap from 'leaflet-minimap';\nimport {Subject} from 'rxjs';\nimport * as L from 'leaflet';\n\n/**\n * @author Vito Salvia - CNR IMAA geoSDI Group\n * @email vito.salvia@gmail.com\n */\nexport interface INgxLeafletMinimapPluginService {\n\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(autoToogleDislay: boolean): NgxLeafletMinimapPluginService;\n\n /**\n * @param position\n */\n withPosition(position: 'topleft' | 'topright' | 'bottomleft' | 'bottomright'): 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(zoomLevelOffset: number): 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: {hideText: string, showText: string}): 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\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxLeafletMinimapPluginService implements INgxLeafletMinimapPluginService{\n\n private map: any;\n private layer: any = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {minZoom: 0, maxZoom: 13});\n subjectMiniMapEvent$ = new Subject<boolean>();\n subjectChangeLayer$ = new Subject<any>();\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 } = {hideText: 'Nascondi', showText: 'Mostra'};\n private zoomAnimation: any;\n private zoomLevelFixed: number;\n private zoomLevelOffset: number = -5;\n private mapOptions: any;\n\n constructor() {\n this.subjectChangeLayer$.subscribe((theLayer: any) => this.layer = theLayer);\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(autoToogleDislay: boolean): 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(position: 'topleft' | 'topright' | 'bottomleft' | 'bottomright'): 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: { hideText: string; showText: string }): 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(zoomLevelOffset: number): 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 applyMiniMapPlugin(): void {\n if (!this.map) {\n alert('Impossibile aggiungere il plugin mouse cursor');\n } else {\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","import { NgModule } from '@angular/core';\n\n/**\n * @author Vito Salvia - CNR IMAA geoSDI Group\n * @email vito.salvia@gmail.com\n */\n@NgModule({\n declarations: [\n ],\n imports: [\n ],\n exports: [\n ]\n})\nexport class NgxLeafletMinimapPluginModule { }\n","/*\n * Public API Surface of ngx-leaflet-minimap-plugin\n */\n\nexport * from './lib/ngx-leaflet-minimap-plugin.service';\nexport * from './lib/ngx-leaflet-minimap-plugin.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAyGa,8BAA8B;IAsBzC;QAnBQ,UAAK,GAAQ,IAAI,CAAC,CAAC,SAAS,CAAC,oDAAoD,EAAE,EAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAC,CAAC,CAAC;QACtH,yBAAoB,GAAG,IAAI,OAAO,EAAW,CAAC;QAC9C,wBAAmB,GAAG,IAAI,OAAO,EAAO,CAAC;QAEjC,aAAQ,GAAW,aAAa,CAAC;QACjC,WAAM,GAAY,IAAI,CAAC;QACvB,sBAAiB,GAAY,IAAI,CAAC;QAClC,WAAM,GAAW,GAAG,CAAC;QACrB,UAAK,GAAW,GAAG,CAAC;QACpB,oBAAe,GAAW,EAAE,CAAC;QAC7B,mBAAc,GAAW,EAAE,CAAC;QAE5B,cAAS,GAAY,KAAK,CAAC;QAC3B,YAAO,GAA2C,EAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAC,CAAC;QAG7F,oBAAe,GAAW,CAAC,CAAC,CAAC;QAInC,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,QAAa,KAAK,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC;KAC9E;;;;IAKD,OAAO,CAAC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C5B,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACnB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE;gBAC1B,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACvC,CAAC,CAAC;YACH,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE;gBACzB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACtC,CAAC,CAAC;SACJ;KACF;;iKAzLU,8BAA8B;qKAA9B,8BAA8B,cAF7B,MAAM;2FAEP,8BAA8B;kBAH1C,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;ACtGD;;;;MAYa,6BAA6B;;gKAA7B,6BAA6B;iKAA7B,6BAA6B;iKAA7B,6BAA6B,YAL/B,EACR;2FAIU,6BAA6B;kBARzC,QAAQ;mBAAC;oBACR,YAAY,EAAE,EACb;oBACD,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,EACR;iBACF;;;ACbD;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"geosdi-ngx-leaflet-minimap-plugin.mjs","sources":["../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/lib/ngx-leaflet-minimap-plugin.service.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/lib/ngx-leaflet-minimap-plugin.module.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/public-api.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/geosdi-ngx-leaflet-minimap-plugin.ts"],"sourcesContent":["import * as L from \"leaflet\";\n\nimport { Injectable } from \"@angular/core\";\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(zoomLevelOffset: number): 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\n implements INgxLeafletMinimapPluginService\n{\n private map: any;\n private layer: any = new L.TileLayer(\n \"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\",\n { minZoom: 0, maxZoom: 13 }\n );\n subjectMiniMapEvent$ = new Subject<boolean>();\n subjectChangeLayer$ = new Subject<any>();\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(zoomLevelOffset: number): 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 alert(\"Impossibile aggiungere il plugin mouse cursor\");\n } else {\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","import { NgModule } from '@angular/core';\n\n/**\n * @author Vito Salvia - CNR IMAA geoSDI Group\n * @email vito.salvia@gmail.com\n */\n@NgModule({\n declarations: [\n ],\n imports: [\n ],\n exports: [\n ]\n})\nexport class NgxLeafletMinimapPluginModule { }\n","/*\n * Public API Surface of ngx-leaflet-minimap-plugin\n */\n\nexport * from './lib/ngx-leaflet-minimap-plugin.service';\nexport * from './lib/ngx-leaflet-minimap-plugin.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MA+Ga,8BAA8B,CAAA;AA6BzC,IAAA,WAAA,GAAA;QAzBQ,IAAA,CAAA,KAAK,GAAQ,IAAI,CAAC,CAAC,SAAS,CAClC,oDAAoD,EACpD,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAC5B,CAAC;AACF,QAAA,IAAA,CAAA,oBAAoB,GAAG,IAAI,OAAO,EAAW,CAAC;AAC9C,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,OAAO,EAAO,CAAC;AAEjC,QAAA,IAAQ,CAAA,QAAA,GAAW,aAAa,CAAC;AACjC,QAAA,IAAM,CAAA,MAAA,GAAY,IAAI,CAAC;AACvB,QAAA,IAAiB,CAAA,iBAAA,GAAY,IAAI,CAAC;AAClC,QAAA,IAAM,CAAA,MAAA,GAAW,GAAG,CAAC;AACrB,QAAA,IAAK,CAAA,KAAA,GAAW,GAAG,CAAC;AACpB,QAAA,IAAe,CAAA,eAAA,GAAW,EAAE,CAAC;AAC7B,QAAA,IAAc,CAAA,cAAA,GAAW,EAAE,CAAC;AAE5B,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK,CAAC;QAC3B,IAAA,CAAA,OAAO,GAA2C;AACxD,YAAA,QAAQ,EAAE,UAAU;A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
4
|
import MiniMap from 'leaflet-minimap';
|
|
4
5
|
import { Subject } from 'rxjs';
|
|
5
|
-
import * as L from 'leaflet';
|
|
6
6
|
|
|
7
7
|
class NgxLeafletMinimapPluginService {
|
|
8
8
|
constructor() {
|
|
9
|
-
this.layer = new L.TileLayer(
|
|
9
|
+
this.layer = new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { minZoom: 0, maxZoom: 13 });
|
|
10
10
|
this.subjectMiniMapEvent$ = new Subject();
|
|
11
11
|
this.subjectChangeLayer$ = new Subject();
|
|
12
|
-
this.position =
|
|
12
|
+
this.position = "bottomright";
|
|
13
13
|
this.toogle = true;
|
|
14
14
|
this.autoToogleDisplay = true;
|
|
15
15
|
this.height = 150;
|
|
@@ -17,9 +17,12 @@ class NgxLeafletMinimapPluginService {
|
|
|
17
17
|
this.collapsedHeight = 19;
|
|
18
18
|
this.collapsedWidth = 19;
|
|
19
19
|
this.minimized = false;
|
|
20
|
-
this.strings = {
|
|
20
|
+
this.strings = {
|
|
21
|
+
hideText: "Nascondi",
|
|
22
|
+
showText: "Mostra",
|
|
23
|
+
};
|
|
21
24
|
this.zoomLevelOffset = -5;
|
|
22
|
-
this.subjectChangeLayer$.subscribe((theLayer) => this.layer = theLayer);
|
|
25
|
+
this.subjectChangeLayer$.subscribe((theLayer) => (this.layer = theLayer));
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
* @param map
|
|
@@ -132,16 +135,22 @@ class NgxLeafletMinimapPluginService {
|
|
|
132
135
|
*/
|
|
133
136
|
changeLayer(layer) {
|
|
134
137
|
this.layer = layer;
|
|
135
|
-
this.
|
|
138
|
+
this._miniMap?.changeLayer(this.layer);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
*
|
|
142
|
+
*/
|
|
143
|
+
get minimap() {
|
|
144
|
+
return this._miniMap;
|
|
136
145
|
}
|
|
137
146
|
/**
|
|
138
147
|
*/
|
|
139
148
|
applyMiniMapPlugin() {
|
|
140
149
|
if (!this.map) {
|
|
141
|
-
alert(
|
|
150
|
+
alert("Impossibile aggiungere il plugin mouse cursor");
|
|
142
151
|
}
|
|
143
152
|
else {
|
|
144
|
-
this.
|
|
153
|
+
this._miniMap = new MiniMap(this.layer, {
|
|
145
154
|
position: this.position,
|
|
146
155
|
width: this.width,
|
|
147
156
|
height: this.height,
|
|
@@ -155,23 +164,23 @@ class NgxLeafletMinimapPluginService {
|
|
|
155
164
|
autoToggleDisplay: this.autoToogleDisplay,
|
|
156
165
|
minimized: this.minimized,
|
|
157
166
|
strings: this.strings,
|
|
158
|
-
mapOptions: this.mapOptions
|
|
167
|
+
//mapOptions: this.mapOptions
|
|
159
168
|
}).addTo(this.map);
|
|
160
|
-
this.
|
|
169
|
+
this._miniMap.on("minimize", () => {
|
|
161
170
|
this.subjectMiniMapEvent$.next(false);
|
|
162
171
|
});
|
|
163
|
-
this.
|
|
172
|
+
this._miniMap.on("restore", () => {
|
|
164
173
|
this.subjectMiniMapEvent$.next(true);
|
|
165
174
|
});
|
|
166
175
|
}
|
|
167
176
|
}
|
|
168
177
|
}
|
|
169
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
|
170
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.
|
|
171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
|
178
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
179
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginService, providedIn: "root" });
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginService, decorators: [{
|
|
172
181
|
type: Injectable,
|
|
173
182
|
args: [{
|
|
174
|
-
providedIn:
|
|
183
|
+
providedIn: "root",
|
|
175
184
|
}]
|
|
176
185
|
}], ctorParameters: function () { return []; } });
|
|
177
186
|
|
|
@@ -181,10 +190,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImpor
|
|
|
181
190
|
*/
|
|
182
191
|
class NgxLeafletMinimapPluginModule {
|
|
183
192
|
}
|
|
184
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.
|
|
185
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.
|
|
186
|
-
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.
|
|
187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.
|
|
193
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
194
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule });
|
|
195
|
+
/** @nocollapse */ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule, imports: [[]] });
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NgxLeafletMinimapPluginModule, decorators: [{
|
|
188
197
|
type: NgModule,
|
|
189
198
|
args: [{
|
|
190
199
|
declarations: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geosdi-ngx-leaflet-minimap-plugin.mjs","sources":["../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/lib/ngx-leaflet-minimap-plugin.service.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/lib/ngx-leaflet-minimap-plugin.module.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/public-api.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/geosdi-ngx-leaflet-minimap-plugin.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport MiniMap from 'leaflet-minimap';\nimport {Subject} from 'rxjs';\nimport * as L from 'leaflet';\n\n/**\n * @author Vito Salvia - CNR IMAA geoSDI Group\n * @email vito.salvia@gmail.com\n */\nexport interface INgxLeafletMinimapPluginService {\n\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(autoToogleDislay: boolean): NgxLeafletMinimapPluginService;\n\n /**\n * @param position\n */\n withPosition(position: 'topleft' | 'topright' | 'bottomleft' | 'bottomright'): 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(zoomLevelOffset: number): 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: {hideText: string, showText: string}): 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\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxLeafletMinimapPluginService implements INgxLeafletMinimapPluginService{\n\n private map: any;\n private layer: any = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {minZoom: 0, maxZoom: 13});\n subjectMiniMapEvent$ = new Subject<boolean>();\n subjectChangeLayer$ = new Subject<any>();\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 } = {hideText: 'Nascondi', showText: 'Mostra'};\n private zoomAnimation: any;\n private zoomLevelFixed: number;\n private zoomLevelOffset: number = -5;\n private mapOptions: any;\n\n constructor() {\n this.subjectChangeLayer$.subscribe((theLayer: any) => this.layer = theLayer);\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(autoToogleDislay: boolean): 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(position: 'topleft' | 'topright' | 'bottomleft' | 'bottomright'): 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: { hideText: string; showText: string }): 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(zoomLevelOffset: number): 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 applyMiniMapPlugin(): void {\n if (!this.map) {\n alert('Impossibile aggiungere il plugin mouse cursor');\n } else {\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","import { NgModule } from '@angular/core';\n\n/**\n * @author Vito Salvia - CNR IMAA geoSDI Group\n * @email vito.salvia@gmail.com\n */\n@NgModule({\n declarations: [\n ],\n imports: [\n ],\n exports: [\n ]\n})\nexport class NgxLeafletMinimapPluginModule { }\n","/*\n * Public API Surface of ngx-leaflet-minimap-plugin\n */\n\nexport * from './lib/ngx-leaflet-minimap-plugin.service';\nexport * from './lib/ngx-leaflet-minimap-plugin.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAyGa,8BAA8B;IAsBzC;QAnBQ,UAAK,GAAQ,IAAI,CAAC,CAAC,SAAS,CAAC,oDAAoD,EAAE,EAAC,OAAO,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ACR,YAAY,EAAE,EACb;oBACD,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,EACR;iBACF;;;ACbD;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"geosdi-ngx-leaflet-minimap-plugin.mjs","sources":["../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/lib/ngx-leaflet-minimap-plugin.service.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/lib/ngx-leaflet-minimap-plugin.module.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/public-api.ts","../../../../projects/geosdi/ngx-leaflet-minimap-plugin/src/geosdi-ngx-leaflet-minimap-plugin.ts"],"sourcesContent":["import * as L from \"leaflet\";\n\nimport { Injectable } from \"@angular/core\";\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(zoomLevelOffset: number): 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\n implements INgxLeafletMinimapPluginService\n{\n private map: any;\n private layer: any = new L.TileLayer(\n \"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\",\n { minZoom: 0, maxZoom: 13 }\n );\n subjectMiniMapEvent$ = new Subject<boolean>();\n subjectChangeLayer$ = new Subject<any>();\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(zoomLevelOffset: number): 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 alert(\"Impossibile aggiungere il plugin mouse cursor\");\n } else {\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","import { NgModule } from '@angular/core';\n\n/**\n * @author Vito Salvia - CNR IMAA geoSDI Group\n * @email vito.salvia@gmail.com\n */\n@NgModule({\n declarations: [\n ],\n imports: [\n ],\n exports: [\n ]\n})\nexport class NgxLeafletMinimapPluginModule { }\n","/*\n * Public API Surface of ngx-leaflet-minimap-plugin\n */\n\nexport * from './lib/ngx-leaflet-minimap-plugin.service';\nexport * from './lib/ngx-leaflet-minimap-plugin.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MA+Ga,8BAA8B,CAAA;AA6BzC,IAAA,WAAA,GAAA;AAzBQ,QAAA,IAAA,CAAA,KAAK,GAAQ,IAAI,CAAC,CAAC,SAAS,CAClC,oDAAoD,EACpD,E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,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,YAL/B,EACR,CAAA,EAAA,CAAA,CAAA;2FAIU,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBARzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EACb;AACD,oBAAA,OAAO,EAAE,EACR;AACD,oBAAA,OAAO,EAAE,EACR;AACF,iBAAA,CAAA;;;ACbD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Subject } from
|
|
1
|
+
import { Subject } from "rxjs";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* @author Vito Salvia - CNR IMAA geoSDI Group
|
|
@@ -24,7 +24,7 @@ export interface INgxLeafletMinimapPluginService {
|
|
|
24
24
|
/**
|
|
25
25
|
* @param position
|
|
26
26
|
*/
|
|
27
|
-
withPosition(position:
|
|
27
|
+
withPosition(position: "topleft" | "topright" | "bottomleft" | "bottomright"): NgxLeafletMinimapPluginService;
|
|
28
28
|
/**
|
|
29
29
|
* @param height
|
|
30
30
|
*/
|
|
@@ -85,7 +85,7 @@ export declare class NgxLeafletMinimapPluginService implements INgxLeafletMinima
|
|
|
85
85
|
private layer;
|
|
86
86
|
subjectMiniMapEvent$: Subject<boolean>;
|
|
87
87
|
subjectChangeLayer$: Subject<any>;
|
|
88
|
-
private
|
|
88
|
+
private _miniMap;
|
|
89
89
|
private position;
|
|
90
90
|
private toogle;
|
|
91
91
|
private autoToogleDisplay;
|
|
@@ -117,7 +117,7 @@ export declare class NgxLeafletMinimapPluginService implements INgxLeafletMinima
|
|
|
117
117
|
/**
|
|
118
118
|
* @param position
|
|
119
119
|
*/
|
|
120
|
-
withPosition(position:
|
|
120
|
+
withPosition(position: "topleft" | "topright" | "bottomleft" | "bottomright"): NgxLeafletMinimapPluginService;
|
|
121
121
|
/**
|
|
122
122
|
* @param height
|
|
123
123
|
*/
|
|
@@ -166,6 +166,10 @@ export declare class NgxLeafletMinimapPluginService implements INgxLeafletMinima
|
|
|
166
166
|
* @param layer
|
|
167
167
|
*/
|
|
168
168
|
changeLayer(layer: any): void;
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
*/
|
|
172
|
+
get minimap(): any;
|
|
169
173
|
/**
|
|
170
174
|
*/
|
|
171
175
|
applyMiniMapPlugin(): void;
|