new InfoWindow(options)
构造详细信息展示窗体。
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
通过options指定窗体样式
|
Classes
Methods
-
close()
overlay/InfoWindow.js, line 99 -
关闭信息窗体,只有当使用默认模板时,才生效
-
getOffset(){Array}
overlay/InfoWindow.js, line 179 -
获取放置弹窗时使用的像素偏移量
Returns:
Type Description Array 放置弹窗时使用的像素偏移量。 -
getPosition(){Array}
overlay/InfoWindow.js, line 139 -
获取弹窗位置
Returns:
Type Description Array 弹窗位置,经纬度数组 -
getPositioning(){String}
overlay/InfoWindow.js, line 160 -
获取弹窗相对于其position属性的实际放置方式
Returns:
Type Description String 弹窗相对于其position属性的实际放置方式。 -
getZIndex(){Number}
overlay/InfoWindow.js, line 121 -
获取弹窗的显示顺序zIndex值
Returns:
Type Description Number 弹窗显示顺序zIndex值 -
open(position, content)
overlay/InfoWindow.js, line 80 -
在地图的指定位置打开信息窗体,只有当使用默认模板时,才生效
Name Type Description position
Array 弹窗的经纬度位置
content
String | HTMLElement 弹窗的内容,可以是HTML要素字符串或者HTMLElement对象
-
setOffset(offset)
overlay/InfoWindow.js, line 170 -
设置放置弹窗时使用的像素偏移量。数组中的第一个元素是水平偏移量。 正值将弹窗右移。数组中的第二个元素是垂直偏移量。正值会将弹窗向下移动。
Name Type Description offset
Array 放置弹窗时使用的像素偏移量。
-
setPosition(position)
overlay/InfoWindow.js, line 130 -
设置弹窗位置
Name Type Description position
Array 弹窗位置,经纬度数组
-
setPositioning(positioning)
overlay/InfoWindow.js, line 151 -
设置定义弹窗相对于其position属性的实际放置方式
Name Type Description positioning
String 定义弹窗相对于其position属性的实际放置方式。 当前默认使用的positioning值是'bottom-center'。可以通过此方法设置其他值,'bottom-left', 'bottom-center','bottom-right','center-left','center-center','center-right', 'top-left','top-center',和'top-right'。
-
setZIndex(zIndex)
overlay/InfoWindow.js, line 108 -
设置弹窗的显示顺序
Name Type Description zIndex
Number 弹窗渲染的z-index属性