vue-baidu-map-3x
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -10,6 +10,16 @@ /** | ||
export default { | ||
import { getConfig } from './util'; | ||
const config = getConfig(); | ||
const methods = { | ||
'API': { | ||
setMapStyle: 'setMapStyle', | ||
NavigationControl: 'NavigationControl' | ||
'2.0': { | ||
setMapStyle: 'setMapStyle', | ||
NavigationControl: 'NavigationControl' | ||
}, | ||
'3.0': { | ||
setMapStyle: 'setMapStyleV2', | ||
NavigationControl: 'NavigationControl' | ||
} | ||
}, | ||
@@ -21,1 +31,12 @@ 'WebGL': { | ||
} | ||
const getMapMethod = (method) => { | ||
const config = getConfig(); | ||
if (config.type == 'WebGL') { | ||
return methods[config.type][method]; | ||
} else { | ||
return methods[config.type][config.v][method]; | ||
} | ||
} | ||
export default getMapMethod; |
@@ -37,3 +37,3 @@ import BaiduMap from './map/Map.vue' | ||
import { setConfig } from './base/util'; | ||
import { setConfig, getConfig } from './base/util'; | ||
import { getAddressByPoints, getPointByAddress, getPointsTransfer } from './utils'; | ||
@@ -104,3 +104,4 @@ | ||
getPointByAddress, | ||
getPointsTransfer | ||
getPointsTransfer, | ||
getConfig | ||
} |
@@ -5,3 +5,3 @@ { | ||
"private": false, | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"description": "vue-baidu-map的vue3版本(支持v2.0、v3.0和webGl api)。Baidu Map Component for Vue 3.0 (support v2.0 、 v3.0 and webGl api)", | ||
@@ -69,3 +69,2 @@ "scripts": { | ||
"@vitejs/plugin-vue": "^2.2.0", | ||
"bmapgllib.distancetool": "^1.0.0", | ||
"clipboard": "^2.0.10", | ||
@@ -75,3 +74,4 @@ "sass": "^1.51.0", | ||
"vite": "^2.8.0", | ||
"vitepress": "^0.22.3" | ||
"vitepress": "^0.22.3", | ||
"vue-baidu-map-3x": "file:components" | ||
}, | ||
@@ -78,0 +78,0 @@ "typings": "types/index.d.ts", |
@@ -95,2 +95,2 @@ # VUE BAIDU MAP | ||
## updated logs | ||
[updated logs](https://github.com/YangJianFei/vue-baidu-map-3x/blob/main/changelogs.md) | ||
[updated logs](https://github.com/YangJianFei/vue-baidu-map-3x/blob/main/docs/changelogs.md) |
@@ -96,2 +96,2 @@ # VUE3 BAIDU MAP | ||
## 更新日志 | ||
[更新日志](https://github.com/YangJianFei/vue-baidu-map-3x/blob/main/changelogs.md) | ||
[更新日志](https://github.com/YangJianFei/vue-baidu-map-3x/blob/main/docs/changelogs.md) |
@@ -35,2 +35,3 @@ import BaiduMap from './map/Map.vue'; | ||
import BmlCurveLine from './extra/CurveLine.vue'; | ||
import { getConfig } from './base/util'; | ||
import { getAddressByPoints, getPointByAddress, getPointsTransfer } from './utils'; | ||
@@ -43,2 +44,2 @@ declare const _default: { | ||
export { BmlMarkerClusterer, BmlLushu, BmlHeatmap, BmlCurveLine }; | ||
export { getAddressByPoints, getPointByAddress, getPointsTransfer }; | ||
export { getAddressByPoints, getPointByAddress, getPointsTransfer, getConfig }; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
432874
69
7294