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 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$1;
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
- activeBaseLayer?: string;
9
- changeBaseLayer?: () => void;
10
- removeLayerByName?: (name: string) => void;
11
- getLayerByName?: (name: string) => Layer<Source> | undefined;
12
- changeLayersByNames?: (activeNames: Array<string>, allLayerNames: Array<string>) => void;
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
- zIndex?: number;
17
- visible?: boolean;
18
- minZoom?: number;
19
- maxZoom?: number;
20
- layerName: string;
14
+ zIndex?: number;
15
+ visible?: boolean;
16
+ minZoom?: number;
17
+ maxZoom?: number;
18
+ layerName: string;
21
19
  };
22
20
  type DataItemConfig = {
23
- lng: string | number;
24
- lat: string | number;
25
- img: string | undefined;
26
- activeImg?: string | undefined;
27
- text?: string;
28
- offsetX?: number;
29
- offsetY?: number;
30
- scale?: number;
31
- showText?: boolean;
32
- anchor?: Array<number>;
33
- rawData?: any;
34
- rotation?: number;
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
- id: string;
38
- geom: string;
39
- props: string;
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$1;
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "map-ol-utils",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "description": "Openlayers utils library",
6
6
  "files": [