@spuermomonga/vue3-bmapgl 0.0.6 → 0.0.8

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.
Files changed (33) hide show
  1. package/dist/index.js +153 -118
  2. package/dist/index.prod.js +1 -1
  3. package/es/_mixins/use-config.mjs +16 -16
  4. package/es/_mixins/use-config.mjs.map +1 -1
  5. package/es/layer/xyz/index.d.ts +1 -1
  6. package/es/layer/xyz/src/xyz-props.d.ts +52 -6
  7. package/es/layer/xyz/src/xyz-props.mjs +48 -3
  8. package/es/layer/xyz/src/xyz-props.mjs.map +1 -1
  9. package/es/layer/xyz/src/xyz.d.ts +103 -7
  10. package/es/layer/xyz/src/xyz.mjs +78 -44
  11. package/es/layer/xyz/src/xyz.mjs.map +1 -1
  12. package/es/map/src/map-props.d.ts +15 -59
  13. package/es/map/src/map-props.mjs +15 -59
  14. package/es/map/src/map-props.mjs.map +1 -1
  15. package/es/map/src/map.d.ts +30 -125
  16. package/lib/_mixins/use-config.js +16 -16
  17. package/lib/_mixins/use-config.js.map +1 -1
  18. package/lib/layer/xyz/index.d.ts +1 -1
  19. package/lib/layer/xyz/src/xyz-props.d.ts +52 -6
  20. package/lib/layer/xyz/src/xyz-props.js +48 -3
  21. package/lib/layer/xyz/src/xyz-props.js.map +1 -1
  22. package/lib/layer/xyz/src/xyz.d.ts +103 -7
  23. package/lib/layer/xyz/src/xyz.js +77 -43
  24. package/lib/layer/xyz/src/xyz.js.map +1 -1
  25. package/lib/map/src/map-props.d.ts +15 -59
  26. package/lib/map/src/map-props.js +15 -59
  27. package/lib/map/src/map-props.js.map +1 -1
  28. package/lib/map/src/map.d.ts +30 -125
  29. package/package.json +2 -2
  30. package/es/node_modules/.pnpm/@rollup_plugin-typescript@1_b93953ac7ab797e62adf5212a782f0d9/node_modules/tslib/tslib.es6.mjs +0 -36
  31. package/es/node_modules/.pnpm/@rollup_plugin-typescript@1_b93953ac7ab797e62adf5212a782f0d9/node_modules/tslib/tslib.es6.mjs.map +0 -1
  32. package/lib/node_modules/.pnpm/@rollup_plugin-typescript@1_b93953ac7ab797e62adf5212a782f0d9/node_modules/tslib/tslib.es6.js +0 -38
  33. package/lib/node_modules/.pnpm/@rollup_plugin-typescript@1_b93953ac7ab797e62adf5212a782f0d9/node_modules/tslib/tslib.es6.js.map +0 -1
@@ -3,21 +3,117 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
3
3
  readonly type: BooleanConstructor;
4
4
  readonly default: true;
5
5
  };
6
- readonly options: {
7
- readonly type: import("vue").PropType<import("./xyz-props").XyzLayerOptions>;
8
- readonly default: {};
6
+ readonly getTile: {
7
+ readonly type: import("vue").PropType<(info: any, cb: (image: string | HTMLImageElement | HTMLCanvasElement) => void) => void>;
8
+ };
9
+ readonly useThumbData: {
10
+ readonly type: BooleanConstructor;
11
+ readonly default: false;
12
+ };
13
+ readonly xTemplate: {
14
+ readonly type: import("vue").PropType<(x: number, y: number, z: number) => number>;
15
+ };
16
+ readonly yTemplate: {
17
+ readonly type: import("vue").PropType<(x: number, y: number, z: number) => number>;
18
+ };
19
+ readonly zTemplate: {
20
+ readonly type: import("vue").PropType<(x: number, y: number, z: number) => number>;
21
+ };
22
+ readonly bTemplate: {
23
+ readonly type: import("vue").PropType<(x: number, y: number, z: number) => string>;
24
+ };
25
+ readonly minZoom: {
26
+ readonly type: NumberConstructor;
27
+ readonly default: 3;
28
+ };
29
+ readonly maxZoom: {
30
+ readonly type: NumberConstructor;
31
+ readonly default: 23;
32
+ };
33
+ readonly extent: {
34
+ readonly type: import("vue").PropType<number[]>;
35
+ };
36
+ readonly extentCRSIsWGS84: {
37
+ readonly type: BooleanConstructor;
38
+ readonly default: false;
39
+ };
40
+ readonly boundary: {
41
+ readonly type: import("vue").PropType<string[]>;
42
+ };
43
+ readonly zIndex: {
44
+ readonly type: NumberConstructor;
45
+ readonly default: 1;
46
+ };
47
+ readonly zIndexTop: {
48
+ readonly type: BooleanConstructor;
49
+ readonly default: false;
50
+ };
51
+ readonly tms: {
52
+ readonly type: BooleanConstructor;
53
+ readonly default: false;
9
54
  };
10
55
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
11
56
  readonly visible: {
12
57
  readonly type: BooleanConstructor;
13
58
  readonly default: true;
14
59
  };
15
- readonly options: {
16
- readonly type: import("vue").PropType<import("./xyz-props").XyzLayerOptions>;
17
- readonly default: {};
60
+ readonly getTile: {
61
+ readonly type: import("vue").PropType<(info: any, cb: (image: string | HTMLImageElement | HTMLCanvasElement) => void) => void>;
62
+ };
63
+ readonly useThumbData: {
64
+ readonly type: BooleanConstructor;
65
+ readonly default: false;
66
+ };
67
+ readonly xTemplate: {
68
+ readonly type: import("vue").PropType<(x: number, y: number, z: number) => number>;
69
+ };
70
+ readonly yTemplate: {
71
+ readonly type: import("vue").PropType<(x: number, y: number, z: number) => number>;
72
+ };
73
+ readonly zTemplate: {
74
+ readonly type: import("vue").PropType<(x: number, y: number, z: number) => number>;
75
+ };
76
+ readonly bTemplate: {
77
+ readonly type: import("vue").PropType<(x: number, y: number, z: number) => string>;
78
+ };
79
+ readonly minZoom: {
80
+ readonly type: NumberConstructor;
81
+ readonly default: 3;
82
+ };
83
+ readonly maxZoom: {
84
+ readonly type: NumberConstructor;
85
+ readonly default: 23;
86
+ };
87
+ readonly extent: {
88
+ readonly type: import("vue").PropType<number[]>;
89
+ };
90
+ readonly extentCRSIsWGS84: {
91
+ readonly type: BooleanConstructor;
92
+ readonly default: false;
93
+ };
94
+ readonly boundary: {
95
+ readonly type: import("vue").PropType<string[]>;
96
+ };
97
+ readonly zIndex: {
98
+ readonly type: NumberConstructor;
99
+ readonly default: 1;
100
+ };
101
+ readonly zIndexTop: {
102
+ readonly type: BooleanConstructor;
103
+ readonly default: false;
104
+ };
105
+ readonly tms: {
106
+ readonly type: BooleanConstructor;
107
+ readonly default: false;
18
108
  };
19
109
  }>> & Readonly<{}>, {
110
+ readonly minZoom: number;
111
+ readonly maxZoom: number;
20
112
  readonly visible: boolean;
21
- readonly options: import("./xyz-props").XyzLayerOptions;
113
+ readonly useThumbData: boolean;
114
+ readonly extentCRSIsWGS84: boolean;
115
+ readonly zIndex: number;
116
+ readonly zIndexTop: boolean;
117
+ readonly tms: boolean;
22
118
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
23
119
  export default _default;
@@ -1,5 +1,4 @@
1
- import { defineComponent, watch, onUnmounted, createVNode, Fragment } from 'vue';
2
- import { __rest } from '../../../node_modules/.pnpm/@rollup_plugin-typescript@1_b93953ac7ab797e62adf5212a782f0d9/node_modules/tslib/tslib.es6.mjs';
1
+ import { defineComponent, onUnmounted, createVNode, Fragment, watch } from 'vue';
3
2
  import { xyzLayerProps } from './xyz-props.mjs';
4
3
  import useMapInstance from '../../../_mixins/use-map-instance.mjs';
5
4
 
@@ -9,53 +8,88 @@ var xyz = /* @__PURE__ */ defineComponent({
9
8
  setup(props) {
10
9
  const mapInstance = useMapInstance();
11
10
  let layer = null;
12
- const addTileLayer = (layer2) => {
11
+ const setZIndex = (zIndex) => {
12
+ layer === null || layer === void 0 ? void 0 : layer.setZIndex(zIndex);
13
+ };
14
+ const setBoundary = (boundary) => {
15
+ boundary && !boundary.length ? layer === null || layer === void 0 ? void 0 : layer.addBoundary(boundary) : layer === null || layer === void 0 ? void 0 : layer.clearBoundary();
16
+ };
17
+ const setZIndexTop = (zIndexTop) => {
18
+ zIndexTop && (layer === null || layer === void 0 ? void 0 : layer.setZIndexTop());
19
+ };
20
+ const initLayerOptions = () => {
13
21
  const {
14
- getTile
15
- } = props.options;
16
- if (getTile) {
17
- mapInstance().addTileLayer(layer2);
18
- layer2.loadRasterTileData = function(tileInfo, callback) {
19
- const key = this.getTileKey(tileInfo);
20
- const handleImageLoad = (image) => {
21
- image.tileInfo = tileInfo;
22
- callback && callback(image, key);
23
- };
24
- const handleError = () => callback && callback(null, key);
25
- getTile(tileInfo, (img) => {
26
- if (typeof img === "string" || img instanceof HTMLCanvasElement) {
27
- const image = new Image();
28
- image.crossOrigin = "anonymous";
29
- image.onload = () => handleImageLoad(image);
30
- image.onerror = handleError;
31
- image.src = typeof img === "string" ? img : img.toDataURL();
32
- } else if (img instanceof HTMLImageElement) {
33
- handleImageLoad(img);
34
- } else {
35
- handleError();
36
- }
37
- });
38
- };
39
- } else {
40
- mapInstance().addTileLayer(layer2);
41
- }
22
+ zIndex,
23
+ zIndexTop
24
+ } = props;
25
+ setZIndex(zIndex);
26
+ setZIndexTop(zIndexTop);
42
27
  };
43
- const removeTileLayer = (layer2) => {
44
- mapInstance().removeTileLayer(layer2);
28
+ const startWatchProps = () => {
29
+ watch(() => props.zIndex, setZIndex);
30
+ watch(() => props.boundary, setBoundary);
45
31
  };
46
- const createLayer = () => {
47
- if (layer) {
48
- removeTileLayer(layer);
32
+ const init = () => {
33
+ const {
34
+ visible,
35
+ getTile,
36
+ xTemplate,
37
+ yTemplate,
38
+ zTemplate,
39
+ bTemplate,
40
+ minZoom,
41
+ maxZoom,
42
+ extent,
43
+ extentCRSIsWGS84,
44
+ boundary,
45
+ useThumbData,
46
+ tms
47
+ } = props;
48
+ layer = new BMapGL.XYZLayer({
49
+ xTemplate,
50
+ yTemplate,
51
+ zTemplate,
52
+ bTemplate,
53
+ minZoom,
54
+ maxZoom,
55
+ extent,
56
+ extentCRSIsWGS84,
57
+ boundary,
58
+ useThumbData,
59
+ tms
60
+ });
61
+ initLayerOptions();
62
+ if (visible) {
63
+ if (getTile) {
64
+ mapInstance().addTileLayer(layer);
65
+ layer.loadRasterTileData = function(tileInfo, callback) {
66
+ const key = this.getTileKey(tileInfo);
67
+ const handleImageLoad = (image) => {
68
+ image.tileInfo = tileInfo;
69
+ callback && callback(image, key);
70
+ };
71
+ const handleError = () => callback && callback(null, key);
72
+ getTile(tileInfo, (img) => {
73
+ if (typeof img === "string" || img instanceof HTMLCanvasElement) {
74
+ const image = new Image();
75
+ image.crossOrigin = "anonymous";
76
+ image.onload = () => handleImageLoad(image);
77
+ image.onerror = handleError;
78
+ image.src = typeof img === "string" ? img : img.toDataURL();
79
+ } else if (img instanceof HTMLImageElement) {
80
+ handleImageLoad(img);
81
+ } else {
82
+ handleError();
83
+ }
84
+ });
85
+ };
86
+ } else {
87
+ mapInstance().addTileLayer(layer);
88
+ }
49
89
  }
50
- const _a = props.options, {
51
- getTile
52
- } = _a, retProps = __rest(_a, ["getTile"]);
53
- layer = new BMapGL.XYZLayer(retProps);
54
- addTileLayer(layer);
90
+ startWatchProps();
55
91
  };
56
- props.visible && createLayer();
57
- watch(() => props.visible, (n) => layer && (n ? addTileLayer(layer) : removeTileLayer(layer)));
58
- watch(() => props.options, () => createLayer());
92
+ init();
59
93
  onUnmounted(() => {
60
94
  if (layer) {
61
95
  mapInstance().removeTileLayer(layer);
@@ -1 +1 @@
1
- {"version":3,"file":"xyz.mjs","sources":["../../../../src/layer/xyz/src/file:/D:/workspaces/personal-project/vue3-bmapgl/packages/vue3-bmapgl/src/layer/xyz/src/xyz.tsx"],"sourcesContent":["import { defineComponent, onUnmounted, watch } from 'vue'\r\nimport { useMapInstance } from '../../../_mixins'\r\nimport { xyzLayerProps } from './xyz-props'\r\n\r\nexport default defineComponent({\r\n name: 'XyzLayer',\r\n props: xyzLayerProps,\r\n setup(props) {\r\n const mapInstance = useMapInstance()\r\n\r\n let layer: BMapGL.XYZLayer | null = null\r\n\r\n const addTileLayer = (layer: BMapGL.XYZLayer) => {\r\n const { getTile } = props.options\r\n if (getTile) {\r\n mapInstance().addTileLayer(layer)\r\n ;(layer as any).loadRasterTileData = function (tileInfo: any, callback: any) {\r\n const key = this.getTileKey(tileInfo)\r\n\r\n const handleImageLoad = (image: HTMLImageElement) => {\r\n (image as any).tileInfo = tileInfo\r\n callback && callback(image, key)\r\n }\r\n\r\n const handleError = () => callback && callback(null, key)\r\n\r\n getTile(tileInfo, (img) => {\r\n if (typeof img === 'string' || img instanceof HTMLCanvasElement) {\r\n const image = new Image()\r\n image.crossOrigin = 'anonymous'\r\n\r\n image.onload = () => handleImageLoad(image)\r\n image.onerror = handleError\r\n\r\n image.src = typeof img === 'string' ? img : img.toDataURL()\r\n } else if (img instanceof HTMLImageElement) {\r\n handleImageLoad(img)\r\n } else {\r\n handleError()\r\n }\r\n })\r\n }\r\n } else {\r\n mapInstance().addTileLayer(layer)\r\n }\r\n }\r\n\r\n const removeTileLayer = (layer: BMapGL.XYZLayer) => {\r\n mapInstance().removeTileLayer(layer)\r\n }\r\n\r\n const createLayer = () => {\r\n if (layer) {\r\n removeTileLayer(layer)\r\n }\r\n const { getTile, ...retProps } = props.options\r\n layer = new BMapGL.XYZLayer(retProps)\r\n addTileLayer(layer)\r\n }\r\n\r\n props.visible && createLayer()\r\n\r\n watch(() => props.visible, n => layer && (n ? addTileLayer(layer) : removeTileLayer(layer)))\r\n watch(() => props.options, () => createLayer())\r\n\r\n onUnmounted(() => {\r\n if (layer) {\r\n mapInstance().removeTileLayer(layer)\r\n }\r\n })\r\n\r\n return () => <></>\r\n },\r\n})\r\n"],"names":["name","props","xyzLayerProps","setup","mapInstance","useMapInstance","layer","addTileLayer","getTile","options","loadRasterTileData","tileInfo","callback","key","getTileKey","handleImageLoad","image","handleError","img","HTMLCanvasElement","Image","crossOrigin","onload","onerror","src","toDataURL","HTMLImageElement","removeTileLayer","createLayer","_a","retProps","__rest","BMapGL","XYZLayer","visible","watch","n","onUnmounted","_createVNode","_Fragment"],"mappings":";;;;;AAIA,0CAA+B;AAAA,EAC7BA,IAAAA,EAAM,UAAA;AAAA,EACNC,KAAAA,EAAOC,aAAAA;AAAAA,EACPC,MAAMF,KAAAA,EAAK;AACT,IAAA,MAAMG,cAAcC,cAAAA,EAAc;AAElC,IAAA,IAAIC,KAAAA,GAAgC,IAAA;AAEpC,IAAA,MAAMC,YAAAA,GAAgBD,CAAAA,MAAAA,KAA0B;AAC9C,MAAA,MAAM;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file":"xyz.mjs","sources":["../../../../src/layer/xyz/src/file:/D:/workspaces/personal-project/vue3-bmapgl/packages/vue3-bmapgl/src/layer/xyz/src/xyz.tsx"],"sourcesContent":["import { defineComponent, onUnmounted, watch } from 'vue'\r\nimport { useMapInstance } from '../../../_mixins'\r\nimport { xyzLayerProps } from './xyz-props'\r\n\r\nexport default defineComponent({\r\n name: 'XyzLayer',\r\n props: xyzLayerProps,\r\n setup(props) {\r\n const mapInstance = useMapInstance()\r\n\r\n let layer: BMapGL.XYZLayer | null = null\r\n\r\n const setZIndex = (zIndex: number) => {\r\n layer?.setZIndex(zIndex)\r\n }\r\n\r\n const setBoundary = (boundary?: string[]) => {\r\n boundary && !boundary.length ? layer?.addBoundary(boundary) : layer?.clearBoundary()\r\n }\r\n\r\n const setZIndexTop = (zIndexTop?: boolean) => {\r\n zIndexTop && layer?.setZIndexTop()\r\n }\r\n\r\n const initLayerOptions = () => {\r\n const { zIndex, zIndexTop } = props\r\n setZIndex(zIndex)\r\n setZIndexTop(zIndexTop)\r\n }\r\n\r\n const startWatchProps = () => {\r\n watch(() => props.zIndex, setZIndex)\r\n watch(() => props.boundary, setBoundary)\r\n }\r\n\r\n const init = () => {\r\n const { visible, getTile, xTemplate, yTemplate, zTemplate, bTemplate, minZoom, maxZoom, extent, extentCRSIsWGS84, boundary, useThumbData, tms } = props\r\n layer = new BMapGL.XYZLayer({\r\n xTemplate,\r\n yTemplate,\r\n zTemplate,\r\n bTemplate,\r\n minZoom,\r\n maxZoom,\r\n extent: extent as any,\r\n extentCRSIsWGS84,\r\n boundary,\r\n useThumbData,\r\n tms,\r\n })\r\n initLayerOptions()\r\n if (visible) {\r\n if (getTile) {\r\n mapInstance().addTileLayer(layer)\r\n ;(layer as any).loadRasterTileData = function (tileInfo: any, callback: any) {\r\n const key = this.getTileKey(tileInfo)\r\n\r\n const handleImageLoad = (image: HTMLImageElement) => {\r\n (image as any).tileInfo = tileInfo\r\n callback && callback(image, key)\r\n }\r\n\r\n const handleError = () => callback && callback(null, key)\r\n\r\n getTile(tileInfo, (img) => {\r\n if (typeof img === 'string' || img instanceof HTMLCanvasElement) {\r\n const image = new Image()\r\n image.crossOrigin = 'anonymous'\r\n\r\n image.onload = () => handleImageLoad(image)\r\n image.onerror = handleError\r\n\r\n image.src = typeof img === 'string' ? img : img.toDataURL()\r\n } else if (img instanceof HTMLImageElement) {\r\n handleImageLoad(img)\r\n } else {\r\n handleError()\r\n }\r\n })\r\n }\r\n } else {\r\n mapInstance().addTileLayer(layer)\r\n }\r\n }\r\n startWatchProps()\r\n }\r\n\r\n init()\r\n\r\n // const addTileLayer = (layer: BMapGL.XYZLayer) => {\r\n // const { getTile } = props.options\r\n // if (getTile) {\r\n // mapInstance().addTileLayer(layer)\r\n // ;(layer as any).loadRasterTileData = function (tileInfo: any, callback: any) {\r\n // const key = this.getTileKey(tileInfo)\r\n\r\n // const handleImageLoad = (image: HTMLImageElement) => {\r\n // (image as any).tileInfo = tileInfo\r\n // callback && callback(image, key)\r\n // }\r\n\r\n // const handleError = () => callback && callback(null, key)\r\n\r\n // getTile(tileInfo, (img) => {\r\n // if (typeof img === 'string' || img instanceof HTMLCanvasElement) {\r\n // const image = new Image()\r\n // image.crossOrigin = 'anonymous'\r\n\r\n // image.onload = () => handleImageLoad(image)\r\n // image.onerror = handleError\r\n\r\n // image.src = typeof img === 'string' ? img : img.toDataURL()\r\n // } else if (img instanceof HTMLImageElement) {\r\n // handleImageLoad(img)\r\n // } else {\r\n // handleError()\r\n // }\r\n // })\r\n // }\r\n // } else {\r\n // mapInstance().addTileLayer(layer)\r\n // }\r\n // }\r\n\r\n // const removeTileLayer = (layer: BMapGL.XYZLayer) => {\r\n // mapInstance().removeTileLayer(layer)\r\n // }\r\n\r\n // const createLayer = () => {\r\n // if (layer) {\r\n // removeTileLayer(layer)\r\n // }\r\n // const { getTile, ...retProps } = props\r\n // layer = new BMapGL.XYZLayer(retProps)\r\n // addTileLayer(layer)\r\n // }\r\n\r\n // props.visible && createLayer()\r\n\r\n // watch(() => props.visible, n => layer && (n ? addTileLayer(layer) : removeTileLayer(layer)))\r\n // watch(() => props.options, () => createLayer())\r\n\r\n onUnmounted(() => {\r\n if (layer) {\r\n mapInstance().removeTileLayer(layer)\r\n }\r\n })\r\n\r\n return () => <></>\r\n },\r\n})\r\n"],"names":["name","props","xyzLayerProps","setup","mapInstance","useMapInstance","layer","setZIndex","zIndex","setBoundary","boundary","length","addBoundary","clearBoundary","setZIndexTop","zIndexTop","initLayerOptions","startWatchProps","watch","init","visible","getTile","xTemplate","yTemplate","zTemplate","bTemplate","minZoom","maxZoom","extent","extentCRSIsWGS84","useThumbData","tms","BMapGL","XYZLayer","addTileLayer","loadRasterTileData","tileInfo","callback","key","getTileKey","handleImageLoad","image","handleError","img","HTMLCanvasElement","Image","crossOrigin","onload","onerror","src","toDataURL","HTMLImageElement","onUnmounted","removeTileLayer","_createVNode","_Fragment"],"mappings":";;;;AAIA,0CAA+B;AAAA,EAC7BA,IAAAA,EAAM,UAAA;AAAA,EACNC,KAAAA,EAAOC,aAAAA;AAAAA,EACPC,MAAMF,KAAAA,EAAK;AACT,IAAA,MAAMG,cAAcC,cAAAA,EAAc;AAElC,IAAA,IAAIC,KAAAA,GAAgC,IAAA;AAEpC,IAAA,MAAMC,YAAaC,CAAAA,MAAAA,KAAkB;AACnCF,MAAAA,KAAAA,KAAK,QAALA,KAAAA,KAAK,MAAA,GAAA,MAAA,GAALA,KAAAA,CAAOC,UAAUC,MAAM,CAAA;AAAA,IACzB,CAAA;AAEA,IAAA,MAAMC,cAAeC,CAAAA,QAAAA,KAAuB;AAC1CA,MAAAA,QAAAA,IAAY,CAACA,QAAAA,CAASC,MAAAA,GAASL,UAAK,IAAA,IAALA,KAAAA,KAAK,SAAA,MAAA,GAALA,KAAAA,CAAOM,WAAAA,CAAYF,QAAQ,IAAIJ,KAAAA,KAAK,IAAA,IAALA,UAAK,MAAA,GAAA,MAAA,GAALA,MAAOO,aAAAA;IACvE,CAAA;AA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AA;AAAA,QACF,CAAA,MAAO;AACLtC,UAAAA,WAAAA,GAAc8B,aAAa5B,KAAK,CAAA;AAAA,QAClC;AAAA,MACF;AACAW,MAAAA,eAAAA;IACF,CAAA;AAEAE,IAAAA,IAAAA;AAuDAiC,IAAAA,WAAAA,CAAY,MAAK;AACf,MAAA,IAAI9C,KAAAA,EAAO;AACTF,QAAAA,WAAAA,GAAciD,gBAAgB/C,KAAK,CAAA;AAAA,MACrC;AAAA,IACF,CAAC,CAAA;AAED,IAAA,OAAO,MAAAgD,WAAAA,CAAAC,QAAAA,EAAA,IAAA,EAAA,IAAA,CAAA;AAAA,EACT;AACD,CAAA,CAAA;;;;"}
@@ -2,67 +2,23 @@ import type { PropType } from 'vue';
2
2
  import type { ExtractPublicPropTypes } from '../../_utils';
3
3
  import type { onInitd } from './interface';
4
4
  export declare const mapProps: {
5
- readonly maxZoom: {
6
- readonly type: NumberConstructor;
7
- readonly default: 21;
8
- };
9
- readonly minZoom: {
10
- readonly type: NumberConstructor;
11
- readonly default: 0;
12
- };
13
- readonly heading: {
14
- readonly type: NumberConstructor;
15
- readonly default: 0;
16
- };
17
- readonly center: {
18
- readonly type: PropType<BMapGL.Point | string | [number, number]>;
19
- readonly default: readonly [116.403901, 39.915185];
20
- };
21
- readonly zoom: {
22
- readonly type: NumberConstructor;
23
- readonly default: 14;
24
- };
5
+ readonly maxZoom: NumberConstructor;
6
+ readonly minZoom: NumberConstructor;
7
+ readonly heading: NumberConstructor;
8
+ readonly center: PropType<BMapGL.Point | string | [number, number]>;
9
+ readonly zoom: NumberConstructor;
25
10
  readonly class: StringConstructor;
26
11
  readonly contentClass: StringConstructor;
27
- readonly enableScrollWheelZoom: {
28
- readonly type: BooleanConstructor;
29
- readonly default: false;
30
- };
31
- readonly enableDragging: {
32
- readonly type: BooleanConstructor;
33
- readonly default: true;
34
- };
35
- readonly tilt: {
36
- readonly type: NumberConstructor;
37
- readonly default: 0;
38
- };
39
- readonly enableTilt: {
40
- readonly type: BooleanConstructor;
41
- readonly default: false;
42
- };
43
- readonly mapType: {
44
- readonly type: PropType<BMapGL.MapTypeId>;
45
- readonly default: "BMAP_NORMAL_MAP";
46
- };
47
- readonly enableAutoResize: {
48
- readonly type: BooleanConstructor;
49
- readonly default: true;
50
- };
51
- readonly enableTiltGestures: {
52
- readonly type: BooleanConstructor;
53
- readonly default: false;
54
- };
55
- readonly enableRotate: {
56
- readonly type: BooleanConstructor;
57
- readonly default: false;
58
- };
59
- readonly enableRotateGestures: {
60
- readonly type: BooleanConstructor;
61
- readonly default: false;
62
- };
63
- readonly displayOptions: {
64
- readonly type: PropType<BMapGL.displayOptions>;
65
- };
12
+ readonly enableScrollWheelZoom: BooleanConstructor;
13
+ readonly enableDragging: BooleanConstructor;
14
+ readonly tilt: NumberConstructor;
15
+ readonly enableTilt: BooleanConstructor;
16
+ readonly mapType: PropType<BMapGL.MapTypeId>;
17
+ readonly enableAutoResize: BooleanConstructor;
18
+ readonly enableTiltGestures: BooleanConstructor;
19
+ readonly enableRotate: BooleanConstructor;
20
+ readonly enableRotateGestures: BooleanConstructor;
21
+ readonly displayOptions: PropType<BMapGL.displayOptions>;
66
22
  readonly onInitd: PropType<onInitd>;
67
23
  };
68
24
  export type MapProps = ExtractPublicPropTypes<typeof mapProps>;
@@ -1,65 +1,21 @@
1
1
  const mapProps = {
2
- maxZoom: {
3
- type: Number,
4
- default: 21
5
- },
6
- minZoom: {
7
- type: Number,
8
- default: 0
9
- },
10
- heading: {
11
- type: Number,
12
- default: 0
13
- },
14
- center: {
15
- type: Object,
16
- default: [116.403901, 39.915185]
17
- },
18
- zoom: {
19
- type: Number,
20
- default: 14
21
- },
2
+ maxZoom: Number,
3
+ minZoom: Number,
4
+ heading: Number,
5
+ center: Object,
6
+ zoom: Number,
22
7
  class: String,
23
8
  contentClass: String,
24
- enableScrollWheelZoom: {
25
- type: Boolean,
26
- default: false
27
- },
28
- enableDragging: {
29
- type: Boolean,
30
- default: true
31
- },
32
- tilt: {
33
- type: Number,
34
- default: 0
35
- },
36
- enableTilt: {
37
- type: Boolean,
38
- default: false
39
- },
40
- mapType: {
41
- type: String,
42
- default: "BMAP_NORMAL_MAP"
43
- },
44
- enableAutoResize: {
45
- type: Boolean,
46
- default: true
47
- },
48
- enableTiltGestures: {
49
- type: Boolean,
50
- default: false
51
- },
52
- enableRotate: {
53
- type: Boolean,
54
- default: false
55
- },
56
- enableRotateGestures: {
57
- type: Boolean,
58
- default: false
59
- },
60
- displayOptions: {
61
- type: Object
62
- },
9
+ enableScrollWheelZoom: Boolean,
10
+ enableDragging: Boolean,
11
+ tilt: Number,
12
+ enableTilt: Boolean,
13
+ mapType: String,
14
+ enableAutoResize: Boolean,
15
+ enableTiltGestures: Boolean,
16
+ enableRotate: Boolean,
17
+ enableRotateGestures: Boolean,
18
+ displayOptions: Object,
63
19
  onInitd: Function
64
20
  };
65
21
 
@@ -1 +1 @@
1
- {"version":3,"file":"map-props.mjs","sources":["../../../src/map/src/file:/D:/workspaces/personal-project/vue3-bmapgl/packages/vue3-bmapgl/src/map/src/map-props.ts"],"sourcesContent":["import type { PropType } from 'vue'\r\nimport type { ExtractPublicPropTypes } from '../../_utils'\r\nimport type { onInitd } from './interface'\r\n\r\nexport const mapProps = {\r\n maxZoom: {\r\n type: Number,\r\n default: 21,\r\n },\r\n minZoom: {\r\n type: Number,\r\n default: 0,\r\n },\r\n heading: {\r\n type: Number,\r\n default: 0,\r\n },\r\n center: {\r\n type: Object as PropType<BMapGL.Point | string | [number, number]>,\r\n default: [116.403901, 39.915185],\r\n },\r\n zoom: {\r\n type: Number,\r\n default: 14,\r\n },\r\n class: String,\r\n contentClass: String,\r\n enableScrollWheelZoom: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n enableDragging: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n tilt: {\r\n type: Number,\r\n default: 0,\r\n },\r\n enableTilt: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n mapType: {\r\n type: String as PropType<BMapGL.MapTypeId>,\r\n default: 'BMAP_NORMAL_MAP',\r\n },\r\n enableAutoResize: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n enableTiltGestures: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n enableRotate: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n enableRotateGestures: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n displayOptions: {\r\n type: Object as PropType<BMapGL.displayOptions>,\r\n },\r\n onInitd: Function as PropType<onInitd>,\r\n} as const\r\n\r\nexport type MapProps = ExtractPublicPropTypes<typeof mapProps>\r\n"],"names":[],"mappings":"AAIO,MAAM,QAAA,GAAW;AAAA,EACtB,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS,CAAC,UAAA,EAAY,SAAS;AAAA,GAChC;AAAA,EACD,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,KAAA,EAAO,MAAA;AAAA,EACP,YAAA,EAAc,MAAA;AAAA,EACd,qBAAA,EAAuB;AAAA,IACrB,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,gBAAA,EAAkB;AAAA,IAChB,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,kBAAA,EAAoB;AAAA,IAClB,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,oBAAA,EAAsB;AAAA,IACpB,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM;AAAA,GACP;AAAA,EACD,OAAA,EAAS;;;;;"}
1
+ {"version":3,"file":"map-props.mjs","sources":["../../../src/map/src/file:/D:/workspaces/personal-project/vue3-bmapgl/packages/vue3-bmapgl/src/map/src/map-props.ts"],"sourcesContent":["import type { PropType } from 'vue'\r\nimport type { ExtractPublicPropTypes } from '../../_utils'\r\nimport type { onInitd } from './interface'\r\n\r\nexport const mapProps = {\r\n maxZoom: Number,\r\n minZoom: Number,\r\n heading: Number,\r\n center: Object as PropType<BMapGL.Point | string | [number, number]>,\r\n zoom: Number,\r\n class: String,\r\n contentClass: String,\r\n enableScrollWheelZoom: Boolean,\r\n enableDragging: Boolean,\r\n tilt: Number,\r\n enableTilt: Boolean,\r\n mapType: String as PropType<BMapGL.MapTypeId>,\r\n enableAutoResize: Boolean,\r\n enableTiltGestures: Boolean,\r\n enableRotate: Boolean,\r\n enableRotateGestures: Boolean,\r\n displayOptions: Object as PropType<BMapGL.displayOptions>,\r\n onInitd: Function as PropType<onInitd>,\r\n} as const\r\n\r\nexport type MapProps = ExtractPublicPropTypes<typeof mapProps>\r\n"],"names":[],"mappings":"AAIO,MAAM,QAAA,GAAW;AAAA,EACtB,OAAA,EAAS,MAAA;AAAA,EACT,OAAA,EAAS,MAAA;AAAA,EACT,OAAA,EAAS,MAAA;AAAA,EACT,MAAA,EAAQ,MAAA;AAAA,EACR,IAAA,EAAM,MAAA;AAAA,EACN,KAAA,EAAO,MAAA;AAAA,EACP,YAAA,EAAc,MAAA;AAAA,EACd,qBAAA,EAAuB,OAAA;AAAA,EACvB,cAAA,EAAgB,OAAA;AAAA,EAChB,IAAA,EAAM,MAAA;AAAA,EACN,UAAA,EAAY,OAAA;AAAA,EACZ,OAAA,EAAS,MAAA;AAAA,EACT,gBAAA,EAAkB,OAAA;AAAA,EAClB,kBAAA,EAAoB,OAAA;AAAA,EACpB,YAAA,EAAc,OAAA;AAAA,EACd,oBAAA,EAAsB,OAAA;AAAA,EACtB,cAAA,EAAgB,MAAA;AAAA,EAChB,OAAA,EAAS;;;;;"}
@@ -5,142 +5,47 @@ export interface MapSlots {
5
5
  failed?: () => VNode[];
6
6
  }
7
7
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
- readonly maxZoom: {
9
- readonly type: NumberConstructor;
10
- readonly default: 21;
11
- };
12
- readonly minZoom: {
13
- readonly type: NumberConstructor;
14
- readonly default: 0;
15
- };
16
- readonly heading: {
17
- readonly type: NumberConstructor;
18
- readonly default: 0;
19
- };
20
- readonly center: {
21
- readonly type: import("vue").PropType<BMapGL.Point | string | [number, number]>;
22
- readonly default: readonly [116.403901, 39.915185];
23
- };
24
- readonly zoom: {
25
- readonly type: NumberConstructor;
26
- readonly default: 14;
27
- };
8
+ readonly maxZoom: NumberConstructor;
9
+ readonly minZoom: NumberConstructor;
10
+ readonly heading: NumberConstructor;
11
+ readonly center: import("vue").PropType<BMapGL.Point | string | [number, number]>;
12
+ readonly zoom: NumberConstructor;
28
13
  readonly class: StringConstructor;
29
14
  readonly contentClass: StringConstructor;
30
- readonly enableScrollWheelZoom: {
31
- readonly type: BooleanConstructor;
32
- readonly default: false;
33
- };
34
- readonly enableDragging: {
35
- readonly type: BooleanConstructor;
36
- readonly default: true;
37
- };
38
- readonly tilt: {
39
- readonly type: NumberConstructor;
40
- readonly default: 0;
41
- };
42
- readonly enableTilt: {
43
- readonly type: BooleanConstructor;
44
- readonly default: false;
45
- };
46
- readonly mapType: {
47
- readonly type: import("vue").PropType<BMapGL.MapTypeId>;
48
- readonly default: "BMAP_NORMAL_MAP";
49
- };
50
- readonly enableAutoResize: {
51
- readonly type: BooleanConstructor;
52
- readonly default: true;
53
- };
54
- readonly enableTiltGestures: {
55
- readonly type: BooleanConstructor;
56
- readonly default: false;
57
- };
58
- readonly enableRotate: {
59
- readonly type: BooleanConstructor;
60
- readonly default: false;
61
- };
62
- readonly enableRotateGestures: {
63
- readonly type: BooleanConstructor;
64
- readonly default: false;
65
- };
66
- readonly displayOptions: {
67
- readonly type: import("vue").PropType<BMapGL.displayOptions>;
68
- };
15
+ readonly enableScrollWheelZoom: BooleanConstructor;
16
+ readonly enableDragging: BooleanConstructor;
17
+ readonly tilt: NumberConstructor;
18
+ readonly enableTilt: BooleanConstructor;
19
+ readonly mapType: import("vue").PropType<BMapGL.MapTypeId>;
20
+ readonly enableAutoResize: BooleanConstructor;
21
+ readonly enableTiltGestures: BooleanConstructor;
22
+ readonly enableRotate: BooleanConstructor;
23
+ readonly enableRotateGestures: BooleanConstructor;
24
+ readonly displayOptions: import("vue").PropType<BMapGL.displayOptions>;
69
25
  readonly onInitd: import("vue").PropType<import("./interface").onInitd>;
70
26
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
71
- readonly maxZoom: {
72
- readonly type: NumberConstructor;
73
- readonly default: 21;
74
- };
75
- readonly minZoom: {
76
- readonly type: NumberConstructor;
77
- readonly default: 0;
78
- };
79
- readonly heading: {
80
- readonly type: NumberConstructor;
81
- readonly default: 0;
82
- };
83
- readonly center: {
84
- readonly type: import("vue").PropType<BMapGL.Point | string | [number, number]>;
85
- readonly default: readonly [116.403901, 39.915185];
86
- };
87
- readonly zoom: {
88
- readonly type: NumberConstructor;
89
- readonly default: 14;
90
- };
27
+ readonly maxZoom: NumberConstructor;
28
+ readonly minZoom: NumberConstructor;
29
+ readonly heading: NumberConstructor;
30
+ readonly center: import("vue").PropType<BMapGL.Point | string | [number, number]>;
31
+ readonly zoom: NumberConstructor;
91
32
  readonly class: StringConstructor;
92
33
  readonly contentClass: StringConstructor;
93
- readonly enableScrollWheelZoom: {
94
- readonly type: BooleanConstructor;
95
- readonly default: false;
96
- };
97
- readonly enableDragging: {
98
- readonly type: BooleanConstructor;
99
- readonly default: true;
100
- };
101
- readonly tilt: {
102
- readonly type: NumberConstructor;
103
- readonly default: 0;
104
- };
105
- readonly enableTilt: {
106
- readonly type: BooleanConstructor;
107
- readonly default: false;
108
- };
109
- readonly mapType: {
110
- readonly type: import("vue").PropType<BMapGL.MapTypeId>;
111
- readonly default: "BMAP_NORMAL_MAP";
112
- };
113
- readonly enableAutoResize: {
114
- readonly type: BooleanConstructor;
115
- readonly default: true;
116
- };
117
- readonly enableTiltGestures: {
118
- readonly type: BooleanConstructor;
119
- readonly default: false;
120
- };
121
- readonly enableRotate: {
122
- readonly type: BooleanConstructor;
123
- readonly default: false;
124
- };
125
- readonly enableRotateGestures: {
126
- readonly type: BooleanConstructor;
127
- readonly default: false;
128
- };
129
- readonly displayOptions: {
130
- readonly type: import("vue").PropType<BMapGL.displayOptions>;
131
- };
34
+ readonly enableScrollWheelZoom: BooleanConstructor;
35
+ readonly enableDragging: BooleanConstructor;
36
+ readonly tilt: NumberConstructor;
37
+ readonly enableTilt: BooleanConstructor;
38
+ readonly mapType: import("vue").PropType<BMapGL.MapTypeId>;
39
+ readonly enableAutoResize: BooleanConstructor;
40
+ readonly enableTiltGestures: BooleanConstructor;
41
+ readonly enableRotate: BooleanConstructor;
42
+ readonly enableRotateGestures: BooleanConstructor;
43
+ readonly displayOptions: import("vue").PropType<BMapGL.displayOptions>;
132
44
  readonly onInitd: import("vue").PropType<import("./interface").onInitd>;
133
45
  }>> & Readonly<{}>, {
134
- readonly zoom: number;
135
- readonly center: string | BMapGL.Point | [number, number];
136
- readonly heading: number;
137
- readonly minZoom: number;
138
- readonly maxZoom: number;
139
46
  readonly enableScrollWheelZoom: boolean;
140
47
  readonly enableDragging: boolean;
141
- readonly tilt: number;
142
48
  readonly enableTilt: boolean;
143
- readonly mapType: string;
144
49
  readonly enableAutoResize: boolean;
145
50
  readonly enableTiltGestures: boolean;
146
51
  readonly enableRotate: boolean;