类 BigMap.Marker
Constructor Attributes | Constructor Name and Description |
---|---|
BigMap.Marker(point, options)
|
Marker构造函数
|
方法属性 | 方法名称和描述 |
---|---|
禁用拖拽
|
|
Marker启用拖拽
|
|
[getElement 获取html]
|
|
getImage()
|
[getImage 获取图片]
|
[getImageOffset 获取位移]
|
|
[getOffset 获取位移]
|
|
获取当前位置
|
|
[getZIndex 获取zIndex]
|
|
setElement(html)
|
[setElement 设置html]
|
setImage(imgUrl)
|
[setImage 设置图片]
|
setImageOffset(offset)
|
[setImageOffset 设置位移]
|
setLabel(label)
|
给Marker设置Label
|
setOffset(offset)
|
[setOffset 设置位移]
|
setPosition(pointcoord)
|
[setPosition 设置当前位置]
|
setZIndex(zIndex)
|
[setZIndex 设置zIndex]
|
addEventListener(options, callback)
|
给Marker添加点击事件
|
removeEventListener(options, callback)
|
取消监听
|
hide()
|
设置隐藏Marker
|
show()
|
设置显示Marker
|
moveAlong(pointArray, timeout, marker, scroll)
|
[moveAlong 设置移动事件]
|
[stopMoveAlong 移除移动事件]
|
|
on(options, callback, obj)
|
[on 绑订事件]
|
un(options, callback, opt_this)
|
[un 解绑事件]
|
类 详情
BigMap.Marker(point, options)
Marker构造函数
- Parameters:
- {BigMap.Point} point
- 地图的容器
- {json} options
- Marker的一些参数
{
element:"string 内容",
icon:"string 加载图片路径",
geogenerator:"boolean 是否大地线",
offset:"array 偏移数组",
zIndex:"number 层级"
}
方法详情
addEventListener(options, callback)
给Marker添加点击事件
- Parameters:
- {json} options
- 传入参数(click mouseover mouseout)
- {Function} callback
- 自定义事件
disableDragging()
禁用拖拽
enableDragging()
Marker启用拖拽
{dom}
getElement()
[getElement 获取html]
- Returns:
- {dom} [html代码]
{string}
getImage()
[getImage 获取图片]
- Returns:
- {string} [图片路径]
{array}
getImageOffset()
[getImageOffset 获取位移]
- Returns:
- {array} [图片的位移]
{array}
getOffset()
[getOffset 获取位移]
- Returns:
- {array} [位移]
getPosition()
获取当前位置
{int}
getZIndex()
[getZIndex 获取zIndex]
- Returns:
- {int} [zIndex指数]
hide()
设置隐藏Marker
moveAlong(pointArray, timeout, marker, scroll)
[moveAlong 设置移动事件]
- Parameters:
- pointArray
- timeout
- marker
- scroll
on(options, callback, obj)
[on 绑订事件]
- Parameters:
- {string} options
- 传入参数(click mouseover mouseout等)
- {Function} callback
- 自定义事件
- obj
removeEventListener(options, callback)
取消监听
- Parameters:
- {json} options
- 传入参数(click mouseover mouseout)
- {Function} callback
- 自定义事件
setElement(html)
[setElement 设置html]
- Parameters:
- {string} html
- [html代码]
setImage(imgUrl)
[setImage 设置图片]
- Parameters:
- {string} imgUrl
- [图片路径]
setImageOffset(offset)
[setImageOffset 设置位移]
- Parameters:
- {array} offset
- [图片的位移]
setLabel(label)
给Marker设置Label
- Parameters:
- label
setOffset(offset)
[setOffset 设置位移]
- Parameters:
- {array} offset
- [位移]
setPosition(pointcoord)
[setPosition 设置当前位置]
- Parameters:
- {BigMap.Point} pointcoord
- [点位置]
setZIndex(zIndex)
[setZIndex 设置zIndex]
- Parameters:
- {int} zIndex
- [zIndex指数]
{[type]}
show()
设置显示Marker
- Returns:
- {[type]} [description]
stopMoveAlong()
[stopMoveAlong 移除移动事件]
un(options, callback, opt_this)
[un 解绑事件]
- Parameters:
- {string} options
- 传入参数(click mouseover mouseout等)
- {Function} callback
- 自定义事件
- opt_this