map-ol-utils 0.0.1 → 0.0.2
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/dist/index.d.cts +1 -2
- package/dist/index.d.ts +31 -44
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,6 @@ import { Map } from 'ol';
|
|
|
2
2
|
import { Layer, Tile } from 'ol/layer';
|
|
3
3
|
import { Source, XYZ } from 'ol/source';
|
|
4
4
|
import { Emitter, EventType } from 'mitt';
|
|
5
|
-
import { CustomMap as CustomMap$1 } from 'map-venus/src';
|
|
6
5
|
|
|
7
6
|
interface CustomMap extends Map {
|
|
8
7
|
activeBaseLayer?: string;
|
|
@@ -42,7 +41,7 @@ declare const emitter: Emitter<Record<EventType, any>>;
|
|
|
42
41
|
|
|
43
42
|
declare const createBaseLayer: (isDark?: boolean) => Tile<XYZ>;
|
|
44
43
|
|
|
45
|
-
declare const createMapInstance: (config?: {}) => CustomMap
|
|
44
|
+
declare const createMapInstance: (config?: {}) => CustomMap;
|
|
46
45
|
declare const getMapInstance: () => void;
|
|
47
46
|
declare const resetMap: () => void;
|
|
48
47
|
declare const disposeMap: () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,62 +1,49 @@
|
|
|
1
|
-
import {Map} from 'ol';
|
|
2
|
-
import {Layer, Tile} from 'ol/layer';
|
|
3
|
-
import {Source, XYZ} from 'ol/source';
|
|
4
|
-
import {Emitter, EventType} from 'mitt';
|
|
5
|
-
import {CustomMap as CustomMap$1} from 'map-venus/src';
|
|
1
|
+
import { Map } from 'ol';
|
|
2
|
+
import { Layer, Tile } from 'ol/layer';
|
|
3
|
+
import { Source, XYZ } from 'ol/source';
|
|
4
|
+
import { Emitter, EventType } from 'mitt';
|
|
6
5
|
|
|
7
6
|
interface CustomMap extends Map {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
activeBaseLayer?: string;
|
|
8
|
+
changeBaseLayer?: () => void;
|
|
9
|
+
removeLayerByName?: (name: string) => void;
|
|
10
|
+
getLayerByName?: (name: string) => Layer<Source> | undefined;
|
|
11
|
+
changeLayersByNames?: (activeNames: Array<string>, allLayerNames: Array<string>) => void;
|
|
13
12
|
}
|
|
14
|
-
|
|
15
13
|
type LayerConfig = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
zIndex?: number;
|
|
15
|
+
visible?: boolean;
|
|
16
|
+
minZoom?: number;
|
|
17
|
+
maxZoom?: number;
|
|
18
|
+
layerName: string;
|
|
21
19
|
};
|
|
22
20
|
type DataItemConfig = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
lng: string | number;
|
|
22
|
+
lat: string | number;
|
|
23
|
+
img: string | undefined;
|
|
24
|
+
activeImg?: string | undefined;
|
|
25
|
+
text?: string;
|
|
26
|
+
offsetX?: number;
|
|
27
|
+
offsetY?: number;
|
|
28
|
+
scale?: number;
|
|
29
|
+
showText?: boolean;
|
|
30
|
+
anchor?: Array<number>;
|
|
31
|
+
rawData?: any;
|
|
32
|
+
rotation?: number;
|
|
35
33
|
};
|
|
36
34
|
type GeoData = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
id: string;
|
|
36
|
+
geom: string;
|
|
37
|
+
props: string;
|
|
40
38
|
};
|
|
41
39
|
|
|
42
40
|
declare const emitter: Emitter<Record<EventType, any>>;
|
|
43
41
|
|
|
44
42
|
declare const createBaseLayer: (isDark?: boolean) => Tile<XYZ>;
|
|
45
43
|
|
|
46
|
-
declare const createMapInstance: (config?: {}) => CustomMap
|
|
44
|
+
declare const createMapInstance: (config?: {}) => CustomMap;
|
|
47
45
|
declare const getMapInstance: () => void;
|
|
48
46
|
declare const resetMap: () => void;
|
|
49
47
|
declare const disposeMap: () => void;
|
|
50
48
|
|
|
51
|
-
export {
|
|
52
|
-
type CustomMap,
|
|
53
|
-
type DataItemConfig,
|
|
54
|
-
type GeoData,
|
|
55
|
-
type LayerConfig,
|
|
56
|
-
createBaseLayer,
|
|
57
|
-
createMapInstance,
|
|
58
|
-
disposeMap,
|
|
59
|
-
emitter,
|
|
60
|
-
getMapInstance,
|
|
61
|
-
resetMap
|
|
62
|
-
};
|
|
49
|
+
export { type CustomMap, type DataItemConfig, type GeoData, type LayerConfig, createBaseLayer, createMapInstance, disposeMap, emitter, getMapInstance, resetMap };
|