@spuermomonga/vue3-bmapgl 0.0.5 → 0.0.6
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.js +356 -26
- package/dist/index.prod.js +1 -1
- package/es/_mixins/index.d.ts +1 -0
- package/es/_mixins/index.mjs +1 -0
- package/es/_mixins/index.mjs.map +1 -1
- package/es/_mixins/use-config.mjs +19 -8
- package/es/_mixins/use-config.mjs.map +1 -1
- package/es/_mixins/use-map-instance.d.ts +1 -0
- package/es/_mixins/use-map-instance.mjs +10 -0
- package/es/_mixins/use-map-instance.mjs.map +1 -0
- package/es/_utils/call.d.ts +7 -0
- package/es/_utils/call.mjs +10 -0
- package/es/_utils/call.mjs.map +1 -0
- package/es/_utils/index.d.ts +1 -0
- package/es/_utils/index.mjs +2 -1
- package/es/_utils/index.mjs.map +1 -1
- package/es/_utils/map.d.ts +1 -0
- package/es/_utils/map.mjs +14 -1
- package/es/_utils/map.mjs.map +1 -1
- package/es/components.d.ts +4 -0
- package/es/components.mjs +7 -0
- package/es/components.mjs.map +1 -1
- package/es/config-provider/src/config-provider-props.d.ts +10 -1
- package/es/config-provider/src/config-provider-props.mjs.map +1 -1
- package/es/index.mjs +7 -0
- package/es/index.mjs.map +1 -1
- package/es/layer/tile/index.d.ts +1 -0
- package/es/layer/tile/index.mjs +1 -1
- package/es/layer/tile/src/tile.mjs +1 -1
- package/es/layer/tile/src/tile.mjs.map +1 -1
- package/es/layer/xyz/index.d.ts +3 -0
- package/es/layer/xyz/index.mjs +2 -1
- package/es/layer/xyz/index.mjs.map +1 -1
- package/es/layer/xyz/src/xyz-props.d.ts +16 -0
- package/es/layer/xyz/src/xyz-props.mjs +13 -0
- package/es/layer/xyz/src/xyz-props.mjs.map +1 -0
- package/es/layer/xyz/src/xyz.d.ts +22 -1
- package/es/layer/xyz/src/xyz.mjs +62 -4
- package/es/layer/xyz/src/xyz.mjs.map +1 -1
- package/es/map/index.d.ts +1 -0
- package/es/map/index.mjs +1 -0
- package/es/map/index.mjs.map +1 -1
- package/es/map/src/constants.d.ts +3 -0
- package/es/map/src/constants.mjs +4 -0
- package/es/map/src/constants.mjs.map +1 -0
- package/es/map/src/interface.d.ts +6 -0
- package/es/map/src/interface.mjs +2 -0
- package/es/map/src/interface.mjs.map +1 -0
- package/es/map/src/map-props.d.ts +42 -0
- package/es/map/src/map-props.mjs +42 -1
- package/es/map/src/map-props.mjs.map +1 -1
- package/es/map/src/map.d.ts +91 -0
- package/es/map/src/map.mjs +76 -17
- package/es/map/src/map.mjs.map +1 -1
- package/es/map/src/style/map.module.css.mjs +2 -2
- package/es/node_modules/.pnpm/@rollup_plugin-typescript@1_b93953ac7ab797e62adf5212a782f0d9/node_modules/tslib/tslib.es6.mjs +36 -0
- package/es/node_modules/.pnpm/@rollup_plugin-typescript@1_b93953ac7ab797e62adf5212a782f0d9/node_modules/tslib/tslib.es6.mjs.map +1 -0
- package/es/overlay/polygon/index.d.ts +3 -0
- package/es/overlay/polygon/index.mjs +2 -1
- package/es/overlay/polygon/index.mjs.map +1 -1
- package/es/overlay/polygon/src/polygon-props.d.ts +51 -0
- package/es/overlay/polygon/src/polygon-props.mjs +51 -0
- package/es/overlay/polygon/src/polygon-props.mjs.map +1 -0
- package/es/overlay/polygon/src/polygon.d.ts +108 -0
- package/es/overlay/polygon/src/polygon.mjs +63 -0
- package/es/overlay/polygon/src/polygon.mjs.map +1 -0
- package/es/overlay/sector/index.d.ts +1 -0
- package/es/overlay/sector/index.mjs +2 -0
- package/es/overlay/sector/index.mjs.map +1 -0
- package/es/overlay/sector/src/sector-props.mjs +2 -0
- package/es/overlay/sector/src/sector-props.mjs.map +1 -0
- package/es/overlay/sector/src/sector.d.ts +2 -0
- package/es/overlay/sector/src/sector.mjs +11 -0
- package/es/overlay/sector/src/sector.mjs.map +1 -0
- package/lib/_mixins/index.d.ts +1 -0
- package/lib/_mixins/index.js +2 -0
- package/lib/_mixins/index.js.map +1 -1
- package/lib/_mixins/use-config.js +19 -8
- package/lib/_mixins/use-config.js.map +1 -1
- package/lib/_mixins/use-map-instance.d.ts +1 -0
- package/lib/_mixins/use-map-instance.js +12 -0
- package/lib/_mixins/use-map-instance.js.map +1 -0
- package/lib/_utils/call.d.ts +7 -0
- package/lib/_utils/call.js +12 -0
- package/lib/_utils/call.js.map +1 -0
- package/lib/_utils/index.d.ts +1 -0
- package/lib/_utils/index.js +3 -0
- package/lib/_utils/index.js.map +1 -1
- package/lib/_utils/map.d.ts +1 -0
- package/lib/_utils/map.js +14 -0
- package/lib/_utils/map.js.map +1 -1
- package/lib/components.d.ts +4 -0
- package/lib/components.js +14 -0
- package/lib/components.js.map +1 -1
- package/lib/config-provider/src/config-provider-props.d.ts +10 -1
- package/lib/config-provider/src/config-provider-props.js.map +1 -1
- package/lib/index.js +14 -0
- package/lib/index.js.map +1 -1
- package/lib/layer/tile/index.d.ts +1 -0
- package/lib/layer/tile/index.js +5 -0
- package/lib/layer/tile/index.js.map +1 -1
- package/lib/layer/tile/src/tile.js +1 -1
- package/lib/layer/tile/src/tile.js.map +1 -1
- package/lib/layer/xyz/index.d.ts +3 -0
- package/lib/layer/xyz/index.js +7 -0
- package/lib/layer/xyz/index.js.map +1 -1
- package/lib/layer/xyz/src/xyz-props.d.ts +16 -0
- package/lib/layer/xyz/src/xyz-props.js +15 -0
- package/lib/layer/xyz/src/xyz-props.js.map +1 -0
- package/lib/layer/xyz/src/xyz.d.ts +22 -1
- package/lib/layer/xyz/src/xyz.js +61 -3
- package/lib/layer/xyz/src/xyz.js.map +1 -1
- package/lib/map/index.d.ts +1 -0
- package/lib/map/index.js +2 -0
- package/lib/map/index.js.map +1 -1
- package/lib/map/src/constants.d.ts +3 -0
- package/lib/map/src/constants.js +6 -0
- package/lib/map/src/constants.js.map +1 -0
- package/lib/map/src/interface.d.ts +6 -0
- package/lib/map/src/interface.js +3 -0
- package/lib/map/src/interface.js.map +1 -0
- package/lib/map/src/map-props.d.ts +42 -0
- package/lib/map/src/map-props.js +42 -1
- package/lib/map/src/map-props.js.map +1 -1
- package/lib/map/src/map.d.ts +91 -0
- package/lib/map/src/map.js +75 -16
- package/lib/map/src/map.js.map +1 -1
- package/lib/map/src/style/map.module.css.js +2 -2
- package/lib/node_modules/.pnpm/@rollup_plugin-typescript@1_b93953ac7ab797e62adf5212a782f0d9/node_modules/tslib/tslib.es6.js +38 -0
- package/lib/node_modules/.pnpm/@rollup_plugin-typescript@1_b93953ac7ab797e62adf5212a782f0d9/node_modules/tslib/tslib.es6.js.map +1 -0
- package/lib/overlay/polygon/index.d.ts +3 -0
- package/lib/overlay/polygon/index.js +7 -0
- package/lib/overlay/polygon/index.js.map +1 -1
- package/lib/overlay/polygon/src/polygon-props.d.ts +51 -0
- package/lib/overlay/polygon/src/polygon-props.js +53 -0
- package/lib/overlay/polygon/src/polygon-props.js.map +1 -0
- package/lib/overlay/polygon/src/polygon.d.ts +108 -0
- package/lib/overlay/polygon/src/polygon.js +65 -0
- package/lib/overlay/polygon/src/polygon.js.map +1 -0
- package/lib/overlay/sector/index.d.ts +1 -0
- package/lib/overlay/sector/index.js +8 -0
- package/lib/overlay/sector/index.js.map +1 -0
- package/lib/overlay/sector/src/sector-props.js +3 -0
- package/lib/overlay/sector/src/sector-props.js.map +1 -0
- package/lib/overlay/sector/src/sector.d.ts +2 -0
- package/lib/overlay/sector/src/sector.js +13 -0
- package/lib/overlay/sector/src/sector.js.map +1 -0
- package/package.json +2 -2
- package/es/overlay/polygon/src/Polygon.vue.mjs +0 -11
- package/es/overlay/polygon/src/Polygon.vue.mjs.map +0 -1
- package/lib/overlay/polygon/src/Polygon.vue.js +0 -13
- package/lib/overlay/polygon/src/Polygon.vue.js.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const polygonProps = {
|
|
4
|
+
visible: {
|
|
5
|
+
type: Boolean,
|
|
6
|
+
default: true
|
|
7
|
+
},
|
|
8
|
+
points: {
|
|
9
|
+
type: Array
|
|
10
|
+
},
|
|
11
|
+
strokeColor: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "#000"
|
|
14
|
+
},
|
|
15
|
+
fillColor: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "#fff"
|
|
18
|
+
},
|
|
19
|
+
strokeWeight: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 2
|
|
22
|
+
},
|
|
23
|
+
strokeOpacity: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 1
|
|
26
|
+
},
|
|
27
|
+
fillOpacity: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 0.3
|
|
30
|
+
},
|
|
31
|
+
strokeStyle: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "solid"
|
|
34
|
+
},
|
|
35
|
+
enableMassClear: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: true
|
|
38
|
+
},
|
|
39
|
+
enableEditing: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
isBoundary: {
|
|
44
|
+
type: Boolean
|
|
45
|
+
},
|
|
46
|
+
enableClicking: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: true
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.polygonProps = polygonProps;
|
|
53
|
+
//# sourceMappingURL=polygon-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polygon-props.js","sources":["../../../../src/overlay/polygon/src/file:/D:/workspaces/personal-project/vue3-bmapgl/packages/vue3-bmapgl/src/overlay/polygon/src/polygon-props.ts"],"sourcesContent":["import type { PropType } from 'vue'\r\nimport type { ExtractPublicPropTypes } from '../../../_utils'\r\n\r\nexport const polygonProps = {\r\n visible: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n points: {\r\n type: Array as PropType<string[] | BMapGL.Point[] | number[][]>,\r\n },\r\n strokeColor: {\r\n type: String,\r\n default: '#000',\r\n },\r\n fillColor: {\r\n type: String,\r\n default: '#fff',\r\n },\r\n strokeWeight: {\r\n type: Number,\r\n default: 2,\r\n },\r\n strokeOpacity: {\r\n type: Number,\r\n default: 1,\r\n },\r\n fillOpacity: {\r\n type: Number,\r\n default: 0.3,\r\n },\r\n strokeStyle: {\r\n type: String as PropType<'solid' | 'dashed'>,\r\n default: 'solid',\r\n },\r\n enableMassClear: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n enableEditing: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n isBoundary: {\r\n type: Boolean,\r\n },\r\n enableClicking: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n} as const\r\n\r\nexport type PolygonProps = ExtractPublicPropTypes<typeof polygonProps>\r\n"],"names":[],"mappings":";;AAGO,MAAM,YAAA,GAAe;AAAA,EAC1B,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACP;AAAA,EACD,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,YAAA,EAAc;AAAA,IACZ,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,aAAA,EAAe;AAAA,IACb,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,aAAA,EAAe;AAAA,IACb,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACV;AAAA,EACD,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACP;AAAA,EACD,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA;;;;;"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
readonly visible: {
|
|
3
|
+
readonly type: BooleanConstructor;
|
|
4
|
+
readonly default: true;
|
|
5
|
+
};
|
|
6
|
+
readonly points: {
|
|
7
|
+
readonly type: import("vue").PropType<string[] | BMapGL.Point[] | number[][]>;
|
|
8
|
+
};
|
|
9
|
+
readonly strokeColor: {
|
|
10
|
+
readonly type: StringConstructor;
|
|
11
|
+
readonly default: "#000";
|
|
12
|
+
};
|
|
13
|
+
readonly fillColor: {
|
|
14
|
+
readonly type: StringConstructor;
|
|
15
|
+
readonly default: "#fff";
|
|
16
|
+
};
|
|
17
|
+
readonly strokeWeight: {
|
|
18
|
+
readonly type: NumberConstructor;
|
|
19
|
+
readonly default: 2;
|
|
20
|
+
};
|
|
21
|
+
readonly strokeOpacity: {
|
|
22
|
+
readonly type: NumberConstructor;
|
|
23
|
+
readonly default: 1;
|
|
24
|
+
};
|
|
25
|
+
readonly fillOpacity: {
|
|
26
|
+
readonly type: NumberConstructor;
|
|
27
|
+
readonly default: 0.3;
|
|
28
|
+
};
|
|
29
|
+
readonly strokeStyle: {
|
|
30
|
+
readonly type: import("vue").PropType<"solid" | "dashed">;
|
|
31
|
+
readonly default: "solid";
|
|
32
|
+
};
|
|
33
|
+
readonly enableMassClear: {
|
|
34
|
+
readonly type: BooleanConstructor;
|
|
35
|
+
readonly default: true;
|
|
36
|
+
};
|
|
37
|
+
readonly enableEditing: {
|
|
38
|
+
readonly type: BooleanConstructor;
|
|
39
|
+
readonly default: false;
|
|
40
|
+
};
|
|
41
|
+
readonly isBoundary: {
|
|
42
|
+
readonly type: BooleanConstructor;
|
|
43
|
+
};
|
|
44
|
+
readonly enableClicking: {
|
|
45
|
+
readonly type: BooleanConstructor;
|
|
46
|
+
readonly default: true;
|
|
47
|
+
};
|
|
48
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
|
+
readonly visible: {
|
|
50
|
+
readonly type: BooleanConstructor;
|
|
51
|
+
readonly default: true;
|
|
52
|
+
};
|
|
53
|
+
readonly points: {
|
|
54
|
+
readonly type: import("vue").PropType<string[] | BMapGL.Point[] | number[][]>;
|
|
55
|
+
};
|
|
56
|
+
readonly strokeColor: {
|
|
57
|
+
readonly type: StringConstructor;
|
|
58
|
+
readonly default: "#000";
|
|
59
|
+
};
|
|
60
|
+
readonly fillColor: {
|
|
61
|
+
readonly type: StringConstructor;
|
|
62
|
+
readonly default: "#fff";
|
|
63
|
+
};
|
|
64
|
+
readonly strokeWeight: {
|
|
65
|
+
readonly type: NumberConstructor;
|
|
66
|
+
readonly default: 2;
|
|
67
|
+
};
|
|
68
|
+
readonly strokeOpacity: {
|
|
69
|
+
readonly type: NumberConstructor;
|
|
70
|
+
readonly default: 1;
|
|
71
|
+
};
|
|
72
|
+
readonly fillOpacity: {
|
|
73
|
+
readonly type: NumberConstructor;
|
|
74
|
+
readonly default: 0.3;
|
|
75
|
+
};
|
|
76
|
+
readonly strokeStyle: {
|
|
77
|
+
readonly type: import("vue").PropType<"solid" | "dashed">;
|
|
78
|
+
readonly default: "solid";
|
|
79
|
+
};
|
|
80
|
+
readonly enableMassClear: {
|
|
81
|
+
readonly type: BooleanConstructor;
|
|
82
|
+
readonly default: true;
|
|
83
|
+
};
|
|
84
|
+
readonly enableEditing: {
|
|
85
|
+
readonly type: BooleanConstructor;
|
|
86
|
+
readonly default: false;
|
|
87
|
+
};
|
|
88
|
+
readonly isBoundary: {
|
|
89
|
+
readonly type: BooleanConstructor;
|
|
90
|
+
};
|
|
91
|
+
readonly enableClicking: {
|
|
92
|
+
readonly type: BooleanConstructor;
|
|
93
|
+
readonly default: true;
|
|
94
|
+
};
|
|
95
|
+
}>> & Readonly<{}>, {
|
|
96
|
+
readonly visible: boolean;
|
|
97
|
+
readonly strokeColor: string;
|
|
98
|
+
readonly fillColor: string;
|
|
99
|
+
readonly strokeWeight: number;
|
|
100
|
+
readonly strokeOpacity: number;
|
|
101
|
+
readonly fillOpacity: number;
|
|
102
|
+
readonly strokeStyle: "solid" | "dashed";
|
|
103
|
+
readonly enableMassClear: boolean;
|
|
104
|
+
readonly enableEditing: boolean;
|
|
105
|
+
readonly isBoundary: boolean;
|
|
106
|
+
readonly enableClicking: boolean;
|
|
107
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
108
|
+
export default _default;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var polygonProps = require('./polygon-props.js');
|
|
5
|
+
var useMapInstance = require('../../../_mixins/use-map-instance.js');
|
|
6
|
+
var map = require('../../../_utils/map.js');
|
|
7
|
+
|
|
8
|
+
var polygon = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
name: "Polygon",
|
|
10
|
+
props: polygonProps.polygonProps,
|
|
11
|
+
setup: (props) => {
|
|
12
|
+
const mapInstance = useMapInstance();
|
|
13
|
+
let overlay = null;
|
|
14
|
+
const setStrokeColor = (color) => {
|
|
15
|
+
overlay && overlay.setStrokeColor(color);
|
|
16
|
+
};
|
|
17
|
+
const startWatchProps = () => {
|
|
18
|
+
vue.watch(() => props.strokeColor, setStrokeColor);
|
|
19
|
+
vue.watch(() => props.visible, (n) => {
|
|
20
|
+
mapInstance()[n ? "addOverlay" : "removeOverlay"](overlay);
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const init = () => {
|
|
24
|
+
const {
|
|
25
|
+
points,
|
|
26
|
+
visible,
|
|
27
|
+
strokeColor,
|
|
28
|
+
fillColor,
|
|
29
|
+
strokeWeight,
|
|
30
|
+
strokeOpacity,
|
|
31
|
+
fillOpacity,
|
|
32
|
+
strokeStyle,
|
|
33
|
+
enableMassClear,
|
|
34
|
+
enableEditing,
|
|
35
|
+
enableClicking
|
|
36
|
+
} = props;
|
|
37
|
+
if (!points || !points.length) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
overlay = new BMapGL.Polygon(map.listToMapPoints(points), {
|
|
41
|
+
strokeColor,
|
|
42
|
+
fillColor,
|
|
43
|
+
strokeWeight,
|
|
44
|
+
strokeOpacity,
|
|
45
|
+
fillOpacity,
|
|
46
|
+
strokeStyle,
|
|
47
|
+
enableMassClear,
|
|
48
|
+
enableEditing,
|
|
49
|
+
enableClicking
|
|
50
|
+
});
|
|
51
|
+
visible && mapInstance().addOverlay(overlay);
|
|
52
|
+
startWatchProps();
|
|
53
|
+
};
|
|
54
|
+
init();
|
|
55
|
+
vue.onUnmounted(() => {
|
|
56
|
+
if (overlay) {
|
|
57
|
+
mapInstance().removeOverlay(overlay);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
return () => vue.createVNode(vue.Fragment, null, null);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
module.exports = polygon;
|
|
65
|
+
//# sourceMappingURL=polygon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polygon.js","sources":["../../../../src/overlay/polygon/src/file:/D:/workspaces/personal-project/vue3-bmapgl/packages/vue3-bmapgl/src/overlay/polygon/src/polygon.tsx"],"sourcesContent":["import { defineComponent, onUnmounted, watch } from 'vue'\r\nimport { useMapInstance } from '../../../_mixins'\r\nimport { listToMapPoints } from '../../../_utils'\r\nimport { polygonProps } from './polygon-props'\r\n\r\nexport default defineComponent({\r\n name: 'Polygon',\r\n props: polygonProps,\r\n setup: (props) => {\r\n const mapInstance = useMapInstance()\r\n\r\n let overlay: BMapGL.Polygon | null = null\r\n\r\n const setStrokeColor = (color: string) => {\r\n overlay && overlay.setStrokeColor(color)\r\n }\r\n\r\n const startWatchProps = () => {\r\n watch(() => props.strokeColor, setStrokeColor)\r\n watch(() => props.visible, (n) => {\r\n mapInstance()[n ? 'addOverlay' : 'removeOverlay'](overlay!)\r\n })\r\n }\r\n\r\n const init = () => {\r\n const { points, visible, strokeColor, fillColor, strokeWeight, strokeOpacity, fillOpacity, strokeStyle, enableMassClear, enableEditing, enableClicking } = props\r\n if (!points || !points.length) {\r\n return\r\n }\r\n overlay = new BMapGL.Polygon(listToMapPoints(points), {\r\n strokeColor,\r\n fillColor,\r\n strokeWeight,\r\n strokeOpacity,\r\n fillOpacity,\r\n strokeStyle,\r\n enableMassClear,\r\n enableEditing,\r\n enableClicking,\r\n })\r\n visible && mapInstance().addOverlay(overlay)\r\n startWatchProps()\r\n }\r\n\r\n init()\r\n\r\n onUnmounted(() => {\r\n if (overlay) {\r\n mapInstance().removeOverlay(overlay)\r\n }\r\n })\r\n\r\n return () => <></>\r\n },\r\n})\r\n"],"names":["name","props","polygonProps","setup","mapInstance","useMapInstance","overlay","setStrokeColor","color","startWatchProps","watch","strokeColor","visible","n","init","points","fillColor","strokeWeight","strokeOpacity","fillOpacity","strokeStyle","enableMassClear","enableEditing","enableClicking","length","BMapGL","Polygon","listToMapPoints","addOverlay","onUnmounted","removeOverlay","_createVNode","_Fragment"],"mappings":";;;;;;;AAKA,kDAA+B;AAAA,EAC7BA,IAAAA,EAAM,SAAA;AAAA,EACNC,KAAAA,EAAOC,yBAAAA;AAAAA,EACPC,OAAQF,CAAAA,KAAAA,KAAS;AACf,IAAA,MAAMG,cAAcC,cAAAA,EAAc;AAElC,IAAA,IAAIC,OAAAA,GAAiC,IAAA;AAErC,IAAA,MAAMC,iBAAkBC,CAAAA,KAAAA,KAAiB;AACvCF,MAAAA,OAAAA,IAAWA,OAAAA,CAAQC,eAAeC,KAAK,CAAA;AAAA,IACzC,CAAA;AAEA,IAAA,MAAMC,kBAAkBA,MAAK;AAC3BC,MAAAA,SAAAA,CAAM,MAAMT,KAAAA,CAAMU,WAAAA,EAAaJ,cAAc,CAAA;AAC7CG,MAAAA,SAAAA,CAAM,MAAMT,KAAAA,CAAMW,OAAAA,EAAUC,CAAAA,CAAAA,KAAK;AAC/BT,QAAAA,WAAAA,EAAW,CAAGS,CAAAA,GAAI,YAAA,GAAe,eAAe,EAAEP,OAAQ,CAAA;AAAA,MAC5D,CAAC,CAAA;AAAA,IACH,CAAA;AAEA,IAAA,MAAMQ,OAAOA,MAAK;AAChB,MAAA,MAAM;AAAA,QAAEC,MAAAA;AAAAA,QAAQH,OAAAA;AAAAA,QAASD,WAAAA;AAAAA,QAAaK,SAAAA;AAAAA,QAAWC,YAAAA;AAAAA,QAAcC,aAAAA;AAAAA,QAAeC,WAAAA;AAAAA,QAAaC,WAAAA;AAAAA,QAAaC,eAAAA;AAAAA,QAAiBC,aAAAA;AAAAA,QAAeC;AAAAA,OAAc,GAAKtB,KAAAA;AAC3J,MAAA,IAAI,CAACc,MAAAA,IAAU,CAACA,MAAAA,CAAOS,MAAAA,EAAQ;AAC7B,QAAA;AAAA,MACF;AACAlB,MAAAA,OAAAA,GAAU,IAAImB,MAAAA,CAAOC,OAAAA,CAAQC,mBAAAA,CAAgBZ,MAAM,CAAA,EAAG;AAAA,QACpDJ,WAAAA;AAAAA,QACAK,SAAAA;AAAAA,QACAC,YAAAA;AAAAA,QACAC,aAAAA;AAAAA,QACAC,WAAAA;AAAAA,QACAC,WAAAA;AAAAA,QACAC,eAAAA;AAAAA,QACAC,aAAAA;AAAAA,QACAC;AAAAA,OACD,CAAA;AACDX,MAAAA,OAAAA,IAAWR,WAAAA,EAAW,CAAGwB,UAAAA,CAAWtB,OAAO,CAAA;AAC3CG,MAAAA,eAAAA;IACF,CAAA;AAEAK,IAAAA,IAAAA;AAEAe,IAAAA,eAAAA,CAAY,MAAK;AACf,MAAA,IAAIvB,OAAAA,EAAS;AACXF,QAAAA,WAAAA,GAAc0B,cAAcxB,OAAO,CAAA;AAAA,MACrC;AAAA,IACF,CAAC,CAAA;AAED,IAAA,OAAO,MAAAyB,eAAAA,CAAAC,YAAAA,EAAA,IAAA,EAAA,IAAA,CAAA;AAAA,EACT;AACD,CAAA,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BSector } from './src/sector';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sector-props.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
|
|
5
|
+
var sector = /* @__PURE__ */ vue.defineComponent({
|
|
6
|
+
name: "Sector",
|
|
7
|
+
setup: () => {
|
|
8
|
+
return () => vue.createVNode(vue.Fragment, null, null);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
module.exports = sector;
|
|
13
|
+
//# sourceMappingURL=sector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sector.js","sources":["../../../../src/overlay/sector/src/file:/D:/workspaces/personal-project/vue3-bmapgl/packages/vue3-bmapgl/src/overlay/sector/src/sector.tsx"],"sourcesContent":["import { defineComponent } from 'vue'\r\n\r\nexport default defineComponent({\r\n name: 'Sector',\r\n setup: () => {\r\n return () => <></>\r\n },\r\n})\r\n"],"names":["name","setup","_createVNode","_Fragment"],"mappings":";;;;AAEA,iDAA+B;AAAA,EAC7BA,IAAAA,EAAM,QAAA;AAAA,EACNC,OAAOA,MAAK;AACV,IAAA,OAAO,MAAAC,eAAAA,CAAAC,YAAAA,EAAA,IAAA,EAAA,IAAA,CAAA;AAAA,EACT;AACD,CAAA,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spuermomonga/vue3-bmapgl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Baidu Map GL encapsulation for Vue 3",
|
|
5
5
|
"author": "SpuerMomonga <spuermomonga@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"vue": "^3.0.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@spuermomonga/bmapgl-types": "0.0.
|
|
31
|
+
"@spuermomonga/bmapgl-types": "0.0.4"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createElementBlock, openBlock } from 'vue';
|
|
2
|
-
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
3
|
-
|
|
4
|
-
const _sfc_main = {};
|
|
5
|
-
function _sfc_render(_ctx, _cache) {
|
|
6
|
-
return openBlock(), createElementBlock("div");
|
|
7
|
-
}
|
|
8
|
-
var Polygon = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
9
|
-
|
|
10
|
-
export { Polygon as default };
|
|
11
|
-
//# sourceMappingURL=Polygon.vue.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Polygon.vue.mjs","sources":["../../../../src/overlay/polygon/src/Polygon.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\n\r\n</script>\r\n\r\n<template>\r\n <div />\r\n</template>\r\n\r\n<style scoped>\r\n\r\n</style>\r\n"],"names":["_createElementBlock"],"mappings":";;;;;sBAKEA,kBAAA,CAAO,KAAA,CAAA;;;;;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var vue = require('vue');
|
|
4
|
-
var _pluginVue_exportHelper = require('../../../_virtual/_plugin-vue_export-helper.js');
|
|
5
|
-
|
|
6
|
-
const _sfc_main = {};
|
|
7
|
-
function _sfc_render(_ctx, _cache) {
|
|
8
|
-
return vue.openBlock(), vue.createElementBlock("div");
|
|
9
|
-
}
|
|
10
|
-
var Polygon = /* @__PURE__ */ _pluginVue_exportHelper(_sfc_main, [["render", _sfc_render]]);
|
|
11
|
-
|
|
12
|
-
module.exports = Polygon;
|
|
13
|
-
//# sourceMappingURL=Polygon.vue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Polygon.vue.js","sources":["../../../../src/overlay/polygon/src/Polygon.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\n\r\n</script>\r\n\r\n<template>\r\n <div />\r\n</template>\r\n\r\n<style scoped>\r\n\r\n</style>\r\n"],"names":["_createElementBlock"],"mappings":";;;;;;;0BAKEA,sBAAA,CAAO,KAAA,CAAA;;;;;;"}
|