Skip to content

VSymbolLayer

VSymbolLayer 组件用于渲染图标和文本注记图层。

动态过滤符号

API

symbolLayerProps

属性名说明类型默认值
visible图层可见性booleantrue
opacity图层透明度number1
order图层顺序number-
minzoom图层最小缩放级别number0
maxzoom图层最大缩放级别number22
sourceLayer矢量切片源使用的图层string-
filter图层过滤器array-
layout图层布局属性object-
paint图层绘制属性object-
slot图层槽位string-
metadata图层任意属性object-
cursor图层移入时鼠标样式stringpointer
defaultOptions图层配置选项(覆盖同名属性object-

symbolLayerEmits

事件名说明回调参数
load图层加载完成时触发Function
mousedown鼠标按下时触发Function
mouseup鼠标抬起时触发Function
mouseover鼠标悬停时触发Function
mousemove鼠标移动时触发Function
preclick鼠标单击前触发Function
click鼠标单击时触发Function
dblclick鼠标双击时触发Function
mouseenter鼠标进入时触发Function
mouseleave鼠标离开时触发Function
mouseout鼠标移出时触发Function

类型定义

SymbolLayerLoadEvent

layers/SymbolLayer/SymbolLayer.ts
typescript
export interface SymbolLayerLoadEvent {
  layer: SymbolLayerSpecification
  source: GeoJSONSource | VectorTileSource
  map: Map
}

基于 MIT 许可发布