FeatureGroup

概述

处理图层,扩展自layerGroup,有鼠标事件并且共用bindPopup方法,实现ILayer接口

创建(Creation)

创建:

创建 描述
FMap.featureGroup( <ILayer[]> layers? ) 创建一个图层组,任选初始化的图层

方法(Methods)

方法:

方法 参数 返回值 描述
bindPopup() <String> htmlContent,<Popup options> options? this 在有bindPopup方法的图层组中的任何一个图层绑定一个拥有特定HTML内容的popup
getBounds() LatLngBounds 返回功能组的经纬度边界
setStyle() <Path options> style this 设置给定的path options到拥有setStyle方法的FeatureGroup中的每一个图层
bringToFront() this 移动图层组到所有其他图层的顶部
bringToBack() this 移动图层组到所有其他图层的底部

事件(Events)使用地图核心类中Event提供的方法与属性

事件:

事件 类型 描述
click MouseEvent 用户点击或切换到group的时候触发
dblclick MouseEvent 用户双击的时候触发
mouseover MouseEvent 鼠标进入group的时候触发
mouseout MouseEvent 鼠标离开group的时候触发
mousemove MouseEvent 鼠标在group所在图层上划过的时候触发
contextmenu MouseEvent 用户在其中一个图层右键点击的时候触发
layeradd LayerEvent 当一个图层添加到group的时候触发
layerremove LayerEvent 当一个图层从group中移除的时候触发

results matching ""

    No results matching ""