@nextgis/leaflet-map-adapter 1.19.5 → 2.0.0-alpha.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 +1 -1
- package/lib/index.d.ts +68 -88
- package/lib/leaflet-map-adapter.esm-browser.js +1990 -1772
- package/lib/leaflet-map-adapter.esm-browser.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-browser.prod.js +1 -11
- package/lib/leaflet-map-adapter.esm-browser.prod.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.js +1836 -1601
- package/lib/leaflet-map-adapter.esm-bundler.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.prod.js +1 -7
- package/lib/leaflet-map-adapter.esm-bundler.prod.js.map +1 -1
- package/lib/leaflet-map-adapter.global.js +16332 -16225
- package/lib/leaflet-map-adapter.global.js.map +1 -1
- package/lib/leaflet-map-adapter.global.prod.js +1 -11
- package/lib/leaflet-map-adapter.global.prod.js.map +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -33,4 +33,4 @@ webMap.create(options).then(() => {
|
|
|
33
33
|
|
|
34
34
|
Need to fix a bug or add a feature to `@nextgis/leaflet-map-adapter`? We provide custom development and support for this software. [Contact us](http://nextgis.com/contact/) to discuss options!
|
|
35
35
|
|
|
36
|
-
[](http://nextgis.com)
|
package/lib/index.d.ts
CHANGED
|
@@ -1,88 +1,68 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
removeControl(control: Control): void;
|
|
70
|
-
removeLayer(layer: Layer): void;
|
|
71
|
-
showLayer(layer: Layer): void;
|
|
72
|
-
hideLayer(layer: Layer): void;
|
|
73
|
-
setLayerOpacity(layer: GridLayer | Layer, value: number): void;
|
|
74
|
-
setLayerOrder(layer: Layer, order: number, layers: {
|
|
75
|
-
[x: string]: LayerAdapter;
|
|
76
|
-
}): void;
|
|
77
|
-
onMapClick(evt: LeafletMouseEvent): void;
|
|
78
|
-
locate(opt: LocateOptions, events?: LocationEvents): Locate;
|
|
79
|
-
private _addUnselectCb;
|
|
80
|
-
private _watchSizeChangeToUpdateMinZoom;
|
|
81
|
-
private _stopWatchSizeChangeToUpdateMinZoom;
|
|
82
|
-
private _addMapListeners;
|
|
83
|
-
}
|
|
84
|
-
export default LeafletMapAdapter;
|
|
85
|
-
|
|
86
|
-
declare type Type<T> = new (...args: any[]) => T;
|
|
87
|
-
|
|
88
|
-
export { }
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
import { Control, ControlOptions, Map, Layer, GridLayer, LeafletMouseEvent } from 'leaflet';
|
|
4
|
+
import { AttributionControlOptions, MapAdapter, LayerAdapter, MapOptions, ViewOptions, FitOptions, MapControl, CreateControlOptions, ButtonControlOptions, LocateOptions, LocationEvents, Locate } from '@nextgis/webmap';
|
|
5
|
+
import { LngLatArray, LngLatBoundsArray } from '@nextgis/utils';
|
|
6
|
+
|
|
7
|
+
declare class AttributionControl extends Control.Attribution {
|
|
8
|
+
constructor(options: AttributionControlOptions & ControlOptions);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type Type<T> = new (...args: any[]) => T;
|
|
12
|
+
declare class LeafletMapAdapter implements MapAdapter<Map, any, Control> {
|
|
13
|
+
static layerAdapters: {
|
|
14
|
+
[name: string]: Type<LayerAdapter<Map, any, any>>;
|
|
15
|
+
};
|
|
16
|
+
static controlAdapters: {
|
|
17
|
+
ZOOM: typeof Control.Zoom;
|
|
18
|
+
ATTRIBUTION: typeof AttributionControl;
|
|
19
|
+
};
|
|
20
|
+
static Map: typeof Map;
|
|
21
|
+
options: MapOptions<Map>;
|
|
22
|
+
layerAdapters: {
|
|
23
|
+
[name: string]: Type<LayerAdapter<Map, any, any>>;
|
|
24
|
+
};
|
|
25
|
+
controlAdapters: {
|
|
26
|
+
ZOOM: typeof Control.Zoom;
|
|
27
|
+
ATTRIBUTION: typeof AttributionControl;
|
|
28
|
+
};
|
|
29
|
+
emitter: EventEmitter<[never]>;
|
|
30
|
+
map?: Map;
|
|
31
|
+
private _resizeObserver?;
|
|
32
|
+
private _unselectCb;
|
|
33
|
+
private _universalEvents;
|
|
34
|
+
private _positionEvents;
|
|
35
|
+
create(options: MapOptions<Map>): void;
|
|
36
|
+
destroy(): void;
|
|
37
|
+
getContainer(): HTMLElement | undefined;
|
|
38
|
+
getControlContainer(): HTMLElement;
|
|
39
|
+
setCursor(cursor: string): void;
|
|
40
|
+
setView(lngLat: LngLatArray, zoom?: number): void;
|
|
41
|
+
setView(options: ViewOptions): void;
|
|
42
|
+
setCenter(lngLat: LngLatArray): void;
|
|
43
|
+
getCenter(): LngLatArray | undefined;
|
|
44
|
+
setZoom(zoom: number): void;
|
|
45
|
+
getZoom(): number | undefined;
|
|
46
|
+
getBounds(): LngLatBoundsArray | undefined;
|
|
47
|
+
fitBounds(bounds: LngLatBoundsArray, options?: FitOptions): void;
|
|
48
|
+
getLayerAdapter(name: string): Type<LayerAdapter<Map, any, any>>;
|
|
49
|
+
createControl(control: MapControl, options: CreateControlOptions): Control;
|
|
50
|
+
createButtonControl(options: ButtonControlOptions): Control;
|
|
51
|
+
addControl(control: Control, position: string): Control | undefined;
|
|
52
|
+
removeControl(control: Control): void;
|
|
53
|
+
removeLayer(layer: Layer): void;
|
|
54
|
+
showLayer(layer: Layer): void;
|
|
55
|
+
hideLayer(layer: Layer): void;
|
|
56
|
+
setLayerOpacity(layer: GridLayer | Layer, value: number): void;
|
|
57
|
+
setLayerOrder(layer: Layer, order: number, layers: {
|
|
58
|
+
[x: string]: LayerAdapter;
|
|
59
|
+
}): void;
|
|
60
|
+
onMapClick(evt: LeafletMouseEvent): void;
|
|
61
|
+
locate(opt: LocateOptions, events?: LocationEvents): Locate;
|
|
62
|
+
private _addUnselectCb;
|
|
63
|
+
private _watchSizeChangeToUpdateMinZoom;
|
|
64
|
+
private _stopWatchSizeChangeToUpdateMinZoom;
|
|
65
|
+
private _addMapListeners;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { LeafletMapAdapter as default };
|