diff --git a/docs/zh/base/index.md b/docs/zh/base/index.md index 464e436e..a67dd2c9 100644 --- a/docs/zh/base/index.md +++ b/docs/zh/base/index.md @@ -20,7 +20,8 @@ import { Map } from 'vue3-baidu-map-gl' enableDoubleClickZoom: false, enableKeyboard: true, enablePinchToZoom: true, - enableAutoResize: true + enableAutoResize: true, + enableTraffic: true }) @@ -53,6 +54,10 @@ import { Map } from 'vue3-baidu-map-gl' 双击平滑缩放效果 + + 显示路况 + + 地图类型: 常规地图 BMAP_NORMAL_MAP @@ -79,6 +84,7 @@ import { Map } from 'vue3-baidu-map-gl' :enableDoubleClickZoom="mapSetting.enableDoubleClickZoom" :enableKeyboard="mapSetting.enableKeyboard" :enablePinchToZoom="mapSetting.enablePinchToZoom" + :enableTraffic="mapSetting.enableTraffic" /> @@ -86,63 +92,85 @@ import { Map } from 'vue3-baidu-map-gl' ```html - 鼠标缩放 - - 拖拽 - - 惯性拖拽 - - 双指缩放地图 - - 键盘操作 - - - 双击缩放,左键双击放大、右键双击缩小 - - - - 双击平滑缩放效果 - - - - 地图类型: - BMAP_NORMAL_MAP - BMAP_EARTH_MAP - - - - + + + 鼠标缩放 + + + + + 拖拽 + + + + + 惯性拖拽 + + + + + 双指缩放地图 + + + + + 键盘操作 + + + + + 双击缩放,左键双击放大、右键双击缩小 + + + + + 双击平滑缩放效果 + + + + + 显示路况 + + + + 地图类型: + + BMAP_NORMAL_MAP + BMAP_EARTH_MAP + + + + ``` @@ -171,6 +199,7 @@ import { Map } from 'vue3-baidu-map-gl' | zoom | 地图缩放级别 | `number` | `14` | | mapStyleId | 个性化地图样式 ID [详见](./custom) | `string` | | | mapStyleJson | 个性化地图样式 Json [详见](./custom) | `{featureType: string...}[]` | | +| enableTraffic | 是否启用路况图层 | `boolean` | `false` | | enableDragging | 启用地图拖拽 | `boolean` | `true` | | enableInertialDragging | 启用地图惯性拖拽 | `boolean` | `true` | | enableScrollWheelZoom | 允许地图可被鼠标滚轮缩放 | `boolean` | `false` | @@ -237,63 +266,63 @@ import { Map } from 'vue3-baidu-map-gl' ```html - - - - - - + + + + + + ``` diff --git a/packages/components/map/index.vue b/packages/components/map/index.vue index 417f7a67..a48c0603 100644 --- a/packages/components/map/index.vue +++ b/packages/components/map/index.vue @@ -1,452 +1,466 @@ - - - - {{ !initd ? 'map loading...' : '' }} - - - + + + + {{ !initd ? 'map loading...' : '' }} + + + - +