new fengmap.FMMiniMap(options)
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
参数集合
|
Members
-
displayMode
-
Properties:
Name Type Description displayModefengmap.FMDisplayMode 显示模式
-
visible
-
Properties:
Name Type Description visiblebool 显示隐藏
Methods
-
addMarker(marker)
-
添加覆盖物到小地图中
Name Type Description markerfengmap.FMLocationMarker | fengmap.FMLineMarker marker对象
-
dispose()
-
销毁小地图对象,注:只销毁小地图,不会删除小地图容器div
-
getRotation(){number}
-
获取小地图旋转角度
Returns:
Type Description number 小地图旋转角度 -
getZoom(){number}
-
获取地图当前缩放级别
Returns:
Type Description number 缩放级别 -
off(type, callback)
-
地图事件注销
Name Type Description typestring 事件类型
callbackfunction 回调函数
-
on(type, callback)
-
地图事件注册
Name Type Description typestring 事件类型
callbackfunction 回调函数
-
resize(w, h)
-
设置小地图尺寸,注只修改小地图,容器如div修改尺寸需要用户自己修改
Name Type Description wnumber 小地图宽度,单位像素
hnumber 小地图高度,单位像素
-
setRotation(angle)
-
设置小地图旋转角度
Name Type Description anglenumber 旋转角度
-
setZoom(zoom)
-
缩放小地图到指定级别
Name Type Description zoomnumber 小地图缩放级别
Events
-
click
-
鼠标点击事件
Name Type Description eventObject 事件返回参数
Name Type Description coordsobject 点击到的地图坐标