@geosdi/ngx-leaflet-minimap-plugin 1.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 ADDED
@@ -0,0 +1,24 @@
1
+ # NgxLeafletMinimapPlugin
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project ngx-leaflet-minimap-plugin` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-leaflet-minimap-plugin`.
8
+ > Note: Don't forget to add `--project ngx-leaflet-minimap-plugin` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build ngx-leaflet-minimap-plugin` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build ngx-leaflet-minimap-plugin`, go to the dist folder `cd dist/ngx-leaflet-minimap-plugin` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test ngx-leaflet-minimap-plugin` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
@@ -0,0 +1,134 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('leaflet-minimap'), require('rxjs'), require('leaflet')) :
3
+ typeof define === 'function' && define.amd ? define('@geosdi/ngx-leaflet-minimap-plugin', ['exports', '@angular/core', 'leaflet-minimap', 'rxjs', 'leaflet'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.geosdi = global.geosdi || {}, global.geosdi["ngx-leaflet-minimap-plugin"] = {}), global.ng.core, global.MiniMap, global.rxjs, global.L));
5
+ })(this, (function (exports, i0, MiniMap, rxjs, L) { 'use strict';
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n["default"] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
+ var MiniMap__default = /*#__PURE__*/_interopDefaultLegacy(MiniMap);
29
+ var L__namespace = /*#__PURE__*/_interopNamespace(L);
30
+
31
+ var NgxLeafletMinimapPluginService = /** @class */ (function () {
32
+ function NgxLeafletMinimapPluginService() {
33
+ var _this = this;
34
+ this.minZoom = 0;
35
+ this.maxZoom = 13;
36
+ this.layer = new L__namespace.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { minZoom: this.minZoom, maxZoom: this.maxZoom });
37
+ this.toogle = true;
38
+ this.subjectMiniMapEvent$ = new rxjs.Subject();
39
+ this.subjectChangeLayer$ = new rxjs.Subject();
40
+ this.subjectChangeLayer$.subscribe(function (theLayer) { return _this.layer = theLayer; });
41
+ }
42
+ /**
43
+ * @param map
44
+ */
45
+ NgxLeafletMinimapPluginService.prototype.withMap = function (map) {
46
+ this.map = map;
47
+ return this;
48
+ };
49
+ NgxLeafletMinimapPluginService.prototype.withToogleDisplay = function (toogle) {
50
+ this.toogle = toogle;
51
+ return this;
52
+ };
53
+ /**
54
+ *
55
+ * @param layer
56
+ */
57
+ NgxLeafletMinimapPluginService.prototype.withLayer = function (layer) {
58
+ this.layer = layer;
59
+ return this;
60
+ };
61
+ /**
62
+ * @param maxZoom
63
+ */
64
+ NgxLeafletMinimapPluginService.prototype.withMaxZoom = function (maxZoom) {
65
+ this.maxZoom = maxZoom;
66
+ return this;
67
+ };
68
+ /**
69
+ * @param minZoom
70
+ */
71
+ NgxLeafletMinimapPluginService.prototype.withMinZoom = function (minZoom) {
72
+ this.minZoom = minZoom;
73
+ return this;
74
+ };
75
+ /**
76
+ */
77
+ NgxLeafletMinimapPluginService.prototype.applyMiniMapPlugin = function () {
78
+ var _this = this;
79
+ if (!this.map) {
80
+ alert('Impossibile aggiungere il plugin mouse cursor');
81
+ }
82
+ else {
83
+ var miniMap = new MiniMap__default["default"](this.layer, { toggleDisplay: this.toogle }).addTo(this.map);
84
+ miniMap.on('minimize', function () {
85
+ _this.subjectMiniMapEvent$.next(false);
86
+ });
87
+ miniMap.on('restore', function () {
88
+ _this.subjectMiniMapEvent$.next(true);
89
+ });
90
+ }
91
+ };
92
+ return NgxLeafletMinimapPluginService;
93
+ }());
94
+ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: NgxLeafletMinimapPluginService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
95
+ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: NgxLeafletMinimapPluginService, providedIn: 'root' });
96
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: NgxLeafletMinimapPluginService, decorators: [{
97
+ type: i0.Injectable,
98
+ args: [{
99
+ providedIn: 'root'
100
+ }]
101
+ }], ctorParameters: function () { return []; } });
102
+
103
+ var NgxLeafletMinimapPluginModule = /** @class */ (function () {
104
+ function NgxLeafletMinimapPluginModule() {
105
+ }
106
+ return NgxLeafletMinimapPluginModule;
107
+ }());
108
+ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: NgxLeafletMinimapPluginModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
109
+ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: NgxLeafletMinimapPluginModule });
110
+ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: NgxLeafletMinimapPluginModule, imports: [[]] });
111
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: NgxLeafletMinimapPluginModule, decorators: [{
112
+ type: i0.NgModule,
113
+ args: [{
114
+ declarations: [],
115
+ imports: [],
116
+ exports: []
117
+ }]
118
+ }] });
119
+
120
+ /*
121
+ * Public API Surface of ngx-leaflet-minimap-plugin
122
+ */
123
+
124
+ /**
125
+ * Generated bundle index. Do not edit.
126
+ */
127
+
128
+ exports.NgxLeafletMinimapPluginModule = NgxLeafletMinimapPluginModule;
129
+ exports.NgxLeafletMinimapPluginService = NgxLeafletMinimapPluginService;
130
+
131
+ Object.defineProperty(exports, '__esModule', { value: true });
132
+
133
+ }));
134
+ //# sourceMappingURL=geosdi-ngx-leaflet-minimap-plugin.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geosdi-ngx-leaflet-minimap-plugin.umd.js","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 minZoom\n */\n withMinZoom(minZoom: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param maxZoom\n */\n withMaxZoom(maxZoom: number): NgxLeafletMinimapPluginService;\n\n /**\n */\n applyMiniMapPlugin(): void;\n\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxLeafletMinimapPluginService implements INgxLeafletMinimapPluginService{\n\n private map: any;\n private minZoom: number = 0;\n private maxZoom: number = 13;\n private layer: any = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {minZoom: this.minZoom, maxZoom: this.maxZoom});\n private toogle: boolean = true;\n subjectMiniMapEvent$ = new Subject<boolean>();\n subjectChangeLayer$ = new Subject<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 *\n * @param layer\n */\n withLayer(layer: any): NgxLeafletMinimapPluginService {\n this.layer = layer;\n return this;\n }\n\n /**\n * @param maxZoom\n */\n withMaxZoom(maxZoom: number): NgxLeafletMinimapPluginService {\n this.maxZoom = maxZoom;\n return this;\n }\n\n /**\n * @param minZoom\n */\n withMinZoom(minZoom: number): NgxLeafletMinimapPluginService {\n this.minZoom = minZoom;\n return this;\n }\n\n /**\n */\n applyMiniMapPlugin(): void {\n if (!this.map) {\n alert('Impossibile aggiungere il plugin mouse cursor');\n } else {\n const miniMap = new MiniMap(this.layer, {toggleDisplay: this.toogle}).addTo(this.map);\n miniMap.on('minimize', () => {\n this.subjectMiniMapEvent$.next(false);\n });\n miniMap.on('restore', () => {\n this.subjectMiniMapEvent$.next(true);\n });\n }\n }\n}\n","import { NgModule } from '@angular/core';\n\n\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":["L","Subject","MiniMap","Injectable","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAuDE;YAAA,iBAEC;YATO,YAAO,GAAW,CAAC,CAAC;YACpB,YAAO,GAAW,EAAE,CAAC;YACrB,UAAK,GAAQ,IAAIA,YAAC,CAAC,SAAS,CAAC,oDAAoD,EAAE,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAC,CAAC,CAAC;YACnI,WAAM,GAAY,IAAI,CAAC;YAC/B,yBAAoB,GAAG,IAAIC,YAAO,EAAW,CAAC;YAC9C,wBAAmB,GAAG,IAAIA,YAAO,EAAO,CAAC;YAGvC,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,UAAC,QAAa,IAAK,OAAA,KAAI,CAAC,KAAK,GAAG,QAAQ,GAAA,CAAC,CAAC;SAC9E;;;;QAKD,gDAAO,GAAP,UAAQ,GAAQ;YACd,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;YACd,OAAO,IAAI,CAAC;SACb;QAED,0DAAiB,GAAjB,UAAkB,MAAe;YAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;YACpB,OAAO,IAAI,CAA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,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2Vvc2RpLW5neC1sZWFmbGV0LW1pbmltYXAtcGx1Z2luLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvZ2Vvc2RpL25neC1sZWFmbGV0LW1pbmltYXAtcGx1Z2luL3NyYy9nZW9zZGktbmd4LWxlYWZsZXQtbWluaW1hcC1wbHVnaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
@@ -0,0 +1,16 @@
1
+ import { NgModule } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class NgxLeafletMinimapPluginModule {
4
+ }
5
+ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6
+ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginModule });
7
+ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginModule, imports: [[]] });
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginModule, decorators: [{
9
+ type: NgModule,
10
+ args: [{
11
+ declarations: [],
12
+ imports: [],
13
+ exports: []
14
+ }]
15
+ }] });
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWxlYWZsZXQtbWluaW1hcC1wbHVnaW4ubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZ2Vvc2RpL25neC1sZWFmbGV0LW1pbmltYXAtcGx1Z2luL3NyYy9saWIvbmd4LWxlYWZsZXQtbWluaW1hcC1wbHVnaW4ubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBWXpDLE1BQU0sT0FBTyw2QkFBNkI7OzhJQUE3Qiw2QkFBNkI7K0lBQTdCLDZCQUE2QjsrSUFBN0IsNkJBQTZCLFlBTC9CLEVBQ1I7NEZBSVUsNkJBQTZCO2tCQVJ6QyxRQUFRO21CQUFDO29CQUNSLFlBQVksRUFBRSxFQUNiO29CQUNELE9BQU8sRUFBRSxFQUNSO29CQUNELE9BQU8sRUFBRSxFQUNSO2lCQUNGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuXG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogW1xuICBdLFxuICBpbXBvcnRzOiBbXG4gIF0sXG4gIGV4cG9ydHM6IFtcbiAgXVxufSlcbmV4cG9ydCBjbGFzcyBOZ3hMZWFmbGV0TWluaW1hcFBsdWdpbk1vZHVsZSB7IH1cbiJdfQ==
@@ -0,0 +1,74 @@
1
+ import { Injectable } from '@angular/core';
2
+ import MiniMap from 'leaflet-minimap';
3
+ import { Subject } from 'rxjs';
4
+ import * as L from 'leaflet';
5
+ import * as i0 from "@angular/core";
6
+ export class NgxLeafletMinimapPluginService {
7
+ constructor() {
8
+ this.minZoom = 0;
9
+ this.maxZoom = 13;
10
+ this.layer = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { minZoom: this.minZoom, maxZoom: this.maxZoom });
11
+ this.toogle = true;
12
+ this.subjectMiniMapEvent$ = new Subject();
13
+ this.subjectChangeLayer$ = new Subject();
14
+ this.subjectChangeLayer$.subscribe((theLayer) => this.layer = theLayer);
15
+ }
16
+ /**
17
+ * @param map
18
+ */
19
+ withMap(map) {
20
+ this.map = map;
21
+ return this;
22
+ }
23
+ withToogleDisplay(toogle) {
24
+ this.toogle = toogle;
25
+ return this;
26
+ }
27
+ /**
28
+ *
29
+ * @param layer
30
+ */
31
+ withLayer(layer) {
32
+ this.layer = layer;
33
+ return this;
34
+ }
35
+ /**
36
+ * @param maxZoom
37
+ */
38
+ withMaxZoom(maxZoom) {
39
+ this.maxZoom = maxZoom;
40
+ return this;
41
+ }
42
+ /**
43
+ * @param minZoom
44
+ */
45
+ withMinZoom(minZoom) {
46
+ this.minZoom = minZoom;
47
+ return this;
48
+ }
49
+ /**
50
+ */
51
+ applyMiniMapPlugin() {
52
+ if (!this.map) {
53
+ alert('Impossibile aggiungere il plugin mouse cursor');
54
+ }
55
+ else {
56
+ const miniMap = new MiniMap(this.layer, { toggleDisplay: this.toogle }).addTo(this.map);
57
+ miniMap.on('minimize', () => {
58
+ this.subjectMiniMapEvent$.next(false);
59
+ });
60
+ miniMap.on('restore', () => {
61
+ this.subjectMiniMapEvent$.next(true);
62
+ });
63
+ }
64
+ }
65
+ }
66
+ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
67
+ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginService, providedIn: 'root' });
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginService, decorators: [{
69
+ type: Injectable,
70
+ args: [{
71
+ providedIn: 'root'
72
+ }]
73
+ }], ctorParameters: function () { return []; } });
74
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWxlYWZsZXQtbWluaW1hcC1wbHVnaW4uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2dlb3NkaS9uZ3gtbGVhZmxldC1taW5pbWFwLXBsdWdpbi9zcmMvbGliL25neC1sZWFmbGV0LW1pbmltYXAtcGx1Z2luLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLE9BQU8sTUFBTSxpQkFBaUIsQ0FBQztBQUN0QyxPQUFPLEVBQUMsT0FBTyxFQUFDLE1BQU0sTUFBTSxDQUFDO0FBQzdCLE9BQU8sS0FBSyxDQUFDLE1BQU0sU0FBUyxDQUFDOztBQTBDN0IsTUFBTSxPQUFPLDhCQUE4QjtJQVV6QztRQVBRLFlBQU8sR0FBVyxDQUFDLENBQUM7UUFDcEIsWUFBTyxHQUFXLEVBQUUsQ0FBQztRQUNyQixVQUFLLEdBQVEsSUFBSSxDQUFDLENBQUMsU0FBUyxDQUFDLG9EQUFvRCxFQUFFLEVBQUMsT0FBTyxFQUFFLElBQUksQ0FBQyxPQUFPLEVBQUUsT0FBTyxFQUFFLElBQUksQ0FBQyxPQUFPLEVBQUMsQ0FBQyxDQUFDO1FBQ25JLFdBQU0sR0FBWSxJQUFJLENBQUM7UUFDL0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cbiAgfVxuXG4gIC8qKlxuICAgKiBAcGFyYW0gbWluWm9vbVxuICAgKi9cbiAgd2l0aE1pblpvb20obWluWm9vbTogbnVtYmVyKTogTmd4TGVhZmxldE1pbmltYXBQbHVnaW5TZXJ2aWNlIHtcbiAgICB0aGlzLm1pblpvb20gPSBtaW5ab29tO1xuICAgIHJldHVybiB0aGlzO1xuICB9XG5cbiAgLyoqXG4gICAqL1xuICBhcHBseU1pbmlNYXBQbHVnaW4oKTogdm9pZCB7XG4gICAgaWYgKCF0aGlzLm1hcCkge1xuICAgICAgYWxlcnQoJ0ltcG9zc2liaWxlIGFnZ2l1bmdlcmUgaWwgcGx1Z2luIG1vdXNlIGN1cnNvcicpO1xuICAgIH0gZWxzZSB7XG4gICAgICBjb25zdCBtaW5pTWFwID0gbmV3IE1pbmlNYXAodGhpcy5sYXllciwge3RvZ2dsZURpc3BsYXk6IHRoaXMudG9vZ2xlfSkuYWRkVG8odGhpcy5tYXApO1xuICAgICAgbWluaU1hcC5vbignbWluaW1pemUnLCAoKSA9PiB7XG4gICAgICAgIHRoaXMuc3ViamVjdE1pbmlNYXBFdmVudCQubmV4dChmYWxzZSk7XG4gICAgICB9KTtcbiAgICAgIG1pbmlNYXAub24oJ3Jlc3RvcmUnLCAoKSA9PiB7XG4gICAgICAgIHRoaXMuc3ViamVjdE1pbmlNYXBFdmVudCQubmV4dCh0cnVlKTtcbiAgICAgIH0pO1xuICAgIH1cbiAgfVxufVxuIl19
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Public API Surface of ngx-leaflet-minimap-plugin
3
+ */
4
+ export * from './lib/ngx-leaflet-minimap-plugin.service';
5
+ export * from './lib/ngx-leaflet-minimap-plugin.module';
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2dlb3NkaS9uZ3gtbGVhZmxldC1taW5pbWFwLXBsdWdpbi9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsMENBQTBDLENBQUM7QUFDekQsY0FBYyx5Q0FBeUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygbmd4LWxlYWZsZXQtbWluaW1hcC1wbHVnaW5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZ3gtbGVhZmxldC1taW5pbWFwLXBsdWdpbi5zZXJ2aWNlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL25neC1sZWFmbGV0LW1pbmltYXAtcGx1Z2luLm1vZHVsZSc7XG4iXX0=
@@ -0,0 +1,99 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, NgModule } from '@angular/core';
3
+ import MiniMap from 'leaflet-minimap';
4
+ import { Subject } from 'rxjs';
5
+ import * as L from 'leaflet';
6
+
7
+ class NgxLeafletMinimapPluginService {
8
+ constructor() {
9
+ this.minZoom = 0;
10
+ this.maxZoom = 13;
11
+ this.layer = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { minZoom: this.minZoom, maxZoom: this.maxZoom });
12
+ this.toogle = true;
13
+ this.subjectMiniMapEvent$ = new Subject();
14
+ this.subjectChangeLayer$ = new Subject();
15
+ this.subjectChangeLayer$.subscribe((theLayer) => this.layer = theLayer);
16
+ }
17
+ /**
18
+ * @param map
19
+ */
20
+ withMap(map) {
21
+ this.map = map;
22
+ return this;
23
+ }
24
+ withToogleDisplay(toogle) {
25
+ this.toogle = toogle;
26
+ return this;
27
+ }
28
+ /**
29
+ *
30
+ * @param layer
31
+ */
32
+ withLayer(layer) {
33
+ this.layer = layer;
34
+ return this;
35
+ }
36
+ /**
37
+ * @param maxZoom
38
+ */
39
+ withMaxZoom(maxZoom) {
40
+ this.maxZoom = maxZoom;
41
+ return this;
42
+ }
43
+ /**
44
+ * @param minZoom
45
+ */
46
+ withMinZoom(minZoom) {
47
+ this.minZoom = minZoom;
48
+ return this;
49
+ }
50
+ /**
51
+ */
52
+ applyMiniMapPlugin() {
53
+ if (!this.map) {
54
+ alert('Impossibile aggiungere il plugin mouse cursor');
55
+ }
56
+ else {
57
+ const miniMap = new MiniMap(this.layer, { toggleDisplay: this.toogle }).addTo(this.map);
58
+ miniMap.on('minimize', () => {
59
+ this.subjectMiniMapEvent$.next(false);
60
+ });
61
+ miniMap.on('restore', () => {
62
+ this.subjectMiniMapEvent$.next(true);
63
+ });
64
+ }
65
+ }
66
+ }
67
+ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
68
+ /** @nocollapse */ NgxLeafletMinimapPluginService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginService, providedIn: 'root' });
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginService, decorators: [{
70
+ type: Injectable,
71
+ args: [{
72
+ providedIn: 'root'
73
+ }]
74
+ }], ctorParameters: function () { return []; } });
75
+
76
+ class NgxLeafletMinimapPluginModule {
77
+ }
78
+ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
79
+ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginModule });
80
+ /** @nocollapse */ NgxLeafletMinimapPluginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginModule, imports: [[]] });
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: NgxLeafletMinimapPluginModule, decorators: [{
82
+ type: NgModule,
83
+ args: [{
84
+ declarations: [],
85
+ imports: [],
86
+ exports: []
87
+ }]
88
+ }] });
89
+
90
+ /*
91
+ * Public API Surface of ngx-leaflet-minimap-plugin
92
+ */
93
+
94
+ /**
95
+ * Generated bundle index. Do not edit.
96
+ */
97
+
98
+ export { NgxLeafletMinimapPluginModule, NgxLeafletMinimapPluginService };
99
+ //# sourceMappingURL=geosdi-ngx-leaflet-minimap-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geosdi-ngx-leaflet-minimap-plugin.js","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 minZoom\n */\n withMinZoom(minZoom: number): NgxLeafletMinimapPluginService;\n\n /**\n * @param maxZoom\n */\n withMaxZoom(maxZoom: number): NgxLeafletMinimapPluginService;\n\n /**\n */\n applyMiniMapPlugin(): void;\n\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxLeafletMinimapPluginService implements INgxLeafletMinimapPluginService{\n\n private map: any;\n private minZoom: number = 0;\n private maxZoom: number = 13;\n private layer: any = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {minZoom: this.minZoom, maxZoom: this.maxZoom});\n private toogle: boolean = true;\n subjectMiniMapEvent$ = new Subject<boolean>();\n subjectChangeLayer$ = new Subject<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 *\n * @param layer\n */\n withLayer(layer: any): NgxLeafletMinimapPluginService {\n this.layer = layer;\n return this;\n }\n\n /**\n * @param maxZoom\n */\n withMaxZoom(maxZoom: number): NgxLeafletMinimapPluginService {\n this.maxZoom = maxZoom;\n return this;\n }\n\n /**\n * @param minZoom\n */\n withMinZoom(minZoom: number): NgxLeafletMinimapPluginService {\n this.minZoom = minZoom;\n return this;\n }\n\n /**\n */\n applyMiniMapPlugin(): void {\n if (!this.map) {\n alert('Impossibile aggiungere il plugin mouse cursor');\n } else {\n const miniMap = new MiniMap(this.layer, {toggleDisplay: this.toogle}).addTo(this.map);\n miniMap.on('minimize', () => {\n this.subjectMiniMapEvent$.next(false);\n });\n miniMap.on('restore', () => {\n this.subjectMiniMapEvent$.next(true);\n });\n }\n }\n}\n","import { NgModule } from '@angular/core';\n\n\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":";;;;;;MA6Ca,8BAA8B;IAUzC;QAPQ,YAAO,GAAW,CAAC,CAAC;QACpB,YAAO,GAAW,EAAE,CAAC;QACrB,UAAK,GAAQ,IAAI,CAAC,CAAC,SAAS,CAAC,oDAAoD,EAAE,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAC,CAAC,CAAC;QACnI,WAAM,GAAY,IAAI,CAAC;QAC/B,yBAAoB,GAAG,IAAI,OAAO,EAAW,CAAC;QAC9C,wBAAmB,GAAG,IAAI,OAAO,EAAO,CAAC;QAGvC,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,QAAa,KAAK,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC;KAC9E;;;;IAKD,OAAO,CAAC,GAAQ;QACd,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,OAAO,IAAI,CAAC;KACb;IAED,iBAAiB,CAAC,MAAe;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,OAAO,IAAI,CAAC;KACb;;;;;IAMD,SAAS,CAAC,KAAU;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,OAAO,IAAI,CAAC;KACb;;;;IAKD,WAAW,CAAC,OAAe;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;KACb;;;;IAKD,WAAW,CAAC,OAAe;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;KACb;;;IAID,kBAAkB;QAChB,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YACb,KAAK,CAAC,+CAA+C,CAAC,CAAC;SACxD;aAAM;YACL,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,EAAC,aAAa,EAAE,IAAI,CAAC,MAAM,EAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACtF,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE;gBACrB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACvC,CAAC,CAAC;YACH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE;gBACpB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACtC,CAAC,CAAC;SACJ;KACF;;+IAlEU,8BAA8B;mJAA9B,8BAA8B,cAF7B,MAAM;4FAEP,8BAA8B;kBAH1C,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;MChCY,6BAA6B;;8IAA7B,6BAA6B;+IAA7B,6BAA6B;+IAA7B,6BAA6B,YAL/B,EACR;4FAIU,6BAA6B;kBARzC,QAAQ;mBAAC;oBACR,YAAY,EAAE,EACb;oBACD,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,EACR;iBACF;;;ACXD;;;;ACAA;;;;;;"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@geosdi/ngx-leaflet-minimap-plugin" />
5
+ export * from './public-api';
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class NgxLeafletMinimapPluginModule {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxLeafletMinimapPluginModule, never>;
4
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxLeafletMinimapPluginModule, never, never, never>;
5
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxLeafletMinimapPluginModule>;
6
+ }
@@ -0,0 +1,64 @@
1
+ import { Subject } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * @author Vito Salvia - CNR IMAA geoSDI Group
5
+ * @email vito.salvia@gmail.com
6
+ */
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 minZoom
22
+ */
23
+ withMinZoom(minZoom: number): NgxLeafletMinimapPluginService;
24
+ /**
25
+ * @param maxZoom
26
+ */
27
+ withMaxZoom(maxZoom: number): NgxLeafletMinimapPluginService;
28
+ /**
29
+ */
30
+ applyMiniMapPlugin(): void;
31
+ }
32
+ export declare class NgxLeafletMinimapPluginService implements INgxLeafletMinimapPluginService {
33
+ private map;
34
+ private minZoom;
35
+ private maxZoom;
36
+ private layer;
37
+ private toogle;
38
+ subjectMiniMapEvent$: Subject<boolean>;
39
+ subjectChangeLayer$: Subject<any>;
40
+ constructor();
41
+ /**
42
+ * @param map
43
+ */
44
+ withMap(map: any): NgxLeafletMinimapPluginService;
45
+ withToogleDisplay(toogle: boolean): NgxLeafletMinimapPluginService;
46
+ /**
47
+ *
48
+ * @param layer
49
+ */
50
+ withLayer(layer: any): NgxLeafletMinimapPluginService;
51
+ /**
52
+ * @param maxZoom
53
+ */
54
+ withMaxZoom(maxZoom: number): NgxLeafletMinimapPluginService;
55
+ /**
56
+ * @param minZoom
57
+ */
58
+ withMinZoom(minZoom: number): NgxLeafletMinimapPluginService;
59
+ /**
60
+ */
61
+ applyMiniMapPlugin(): void;
62
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxLeafletMinimapPluginService, never>;
63
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgxLeafletMinimapPluginService>;
64
+ }
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@geosdi/ngx-leaflet-minimap-plugin",
3
+ "version": "1.0.0",
4
+ "description": "Service to add minimap for Leaflet Map",
5
+ "author": "Salvia Vito (vito.salvia@gmail.com)",
6
+ "keywords": [
7
+ "angular",
8
+ "javascript",
9
+ "typescript",
10
+ "leaflet",
11
+ "map",
12
+ "base layer"
13
+ ],
14
+ "license": "MIT",
15
+ "dependencies": {
16
+ "tslib": "^2.2.0"
17
+ },
18
+ "peerDependencies": {
19
+ "@angular/common": ">=12.0.0",
20
+ "@angular/core": ">=12.0.0",
21
+ "typescript": ">=4.0.0",
22
+ "leaflet": ">=1.7.1",
23
+ "rxjs": "^7.4.0",
24
+ "leaflet-minimap": "^3.6.1"
25
+ },
26
+ "main": "bundles/geosdi-ngx-leaflet-minimap-plugin.umd.js",
27
+ "module": "fesm2015/geosdi-ngx-leaflet-minimap-plugin.js",
28
+ "es2015": "fesm2015/geosdi-ngx-leaflet-minimap-plugin.js",
29
+ "esm2015": "esm2015/geosdi-ngx-leaflet-minimap-plugin.js",
30
+ "fesm2015": "fesm2015/geosdi-ngx-leaflet-minimap-plugin.js",
31
+ "typings": "geosdi-ngx-leaflet-minimap-plugin.d.ts",
32
+ "sideEffects": false
33
+ }
@@ -0,0 +1,2 @@
1
+ export * from './lib/ngx-leaflet-minimap-plugin.service';
2
+ export * from './lib/ngx-leaflet-minimap-plugin.module';