出自百度地图API

跳转到: 导航 , 搜索
核心类 基础类 控件类 覆盖物类 地图类型类 地图图层类 服务类

Overlay Marker MarkerOptions Icon
Polyline PolylineOptions InfoWindow

此类表示地图上一个图像标注。

构造函数

构造函数描述
Marker(point:Point[, opts:MarkerOptions])创建一个图像标注实例。point参数指定了图像标注所在的地理位置。

方法

方法返回值描述
setIcon(icon:Icon) none 设置标注所用的图标对象。
getIcon() Icon 返回标注所用的图标对象。
setPosition(position:Point) none 设置标注的地理坐标。

getPosition() Point 返回标注的地理坐标。

setOffset(offset:Size) none 设置标注的偏移值。
getOffset() Size 返回标注的偏移值。
addEventListener(event:String, handler:Function) none 添加事件监听函数
removeEventListener(event:String, handler:Function) none 移除事件监听函数

事件

事件参数描述
click event{type, target} 点击标注图标后会触发此事件。
dblclick event{type, target, point,pixel} 双击标注图标后会触发此事件。
查看
Class:极速版覆盖物类/Marker

类参考