Skip to content

BDistrictLayer 行政区图层 ^1.1.2

在地图上显示行政区划分

ts
import { BDistrictLayer } from 'vue3-baidu-map-gl'

组件示例

静态组件 Props

属性说明类型可选值默认值
name行政区名字string-required
kind行政区类型DistrictType-DistrictType['AREA']
fillColor填充颜色string-#fdfd27
fillOpacity填充透明度number-1
strokeColor线条颜色string-#231cf8
viewport自动聚焦地图中心boolean-false

动态组件 Props

属性说明类型可选值默认值版本
visible是否显示boolean-true^2.2.0

DistrictType

说明
PROVINCE省级
CITY市级
AREA县/区级

组件事件

事件名说明类型
initd组件初始化后,调用的方法,返回一个地图实例{ map, BmapGL, instance }
unload组件卸载时会调用此方法-
mouseover鼠标移入行政区域时触发此事件{type, target}
mouseout鼠标移出行政区域时触发此事件{type, target}

Released under the MIT License.