public class InfoWindow
extends java.lang.Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
InfoWindow.OnInfoWindowClickListener
信息窗口点击事件监听接口
|
| 构造器和说明 |
|---|
InfoWindow(BitmapDescriptor bd,
LatLng position,
int yOffset,
InfoWindow.OnInfoWindowClickListener listener)
通过传入的 BitmapDescriptor 构造一个 InfoWindow。
|
InfoWindow(View view,
LatLng position,
int yOffset)
通过传入的 view 构造一个 InfoWindow, 此时只是利用该view生成一个Bitmap绘制在地图中,监听事件由开发者实现。
|
InfoWindow(View view,
LatLng position,
int yOffset,
boolean isFitDensityDpi,
int targetDensityDpi)
根据指定的像素密度对传入的view构造InfoWindow,
此时只是利用该view生成一个Bitmap绘制在地图中,监听事件由开发者实现。
|
| 限定符和类型 | 方法和说明 |
|---|---|
BitmapDescriptor |
getBitmapDescriptor()
获取InfoWindow的BitmapDescriptor资源
|
LatLng |
getPosition()
获取位置数据
|
java.lang.String |
getTag()
获取InfoWindow的Tag
|
View |
getView()
获取InfoWindow的View
|
int |
getYOffset()
获取InfoWindow的YOffset偏移
|
void |
setBitmapDescriptor(BitmapDescriptor mBitmapDescriptor)
更新InfoWindow的BitmapDescriptor属性。
|
void |
setPosition(LatLng mPosition)
设置位置数据
|
void |
setTag(java.lang.String tag)
设置InfoWindow的Tag
|
void |
setView(View mView)
更新InfoWindow的View属性
注: 仅支持通过
InfoWindow(View, LatLng, int, boolean, int) or InfoWindow(View, LatLng, int)两种方式创建
InfoWindow的更新; 如果是使用了InfoWindow(BitmapDescriptor, LatLng, int, OnInfoWindowClickListener)方式创建的
InfoWindow,则不要使用该接口更新View属性,否则可能出现View与BitmapDescriptor层叠的现象。 |
void |
setYOffset(int mYOffset)
设置InfoWindow的YOffset偏移
|
public InfoWindow(View view,
LatLng position,
int yOffset)
view - InfoWindow 展示的 viewposition - InfoWindow 显示的地理位置yOffset - InfoWindow Y 轴偏移量java.lang.IllegalArgumentException - view 和 position 不能为 nullpublic InfoWindow(BitmapDescriptor bd, LatLng position, int yOffset, InfoWindow.OnInfoWindowClickListener listener)
bd - InfoWindow 展示的bitmapposition - InfoWindow 显示的地理位置yOffset - InfoWindow Y 轴偏移量listener - InfoWindow 点击监听者java.lang.IllegalArgumentException - bitmapDescriptor 和 position 不能为 nullpublic InfoWindow(View view,
LatLng position,
int yOffset,
boolean isFitDensityDpi,
int targetDensityDpi)
view - InfoWindow 展示的 viewposition - InfoWindow 显示的地理位置yOffset - InfoWindow Y 轴偏移量isFitDensityDpi - 是否适配设备像素密度,默认不适配targetDensityDpi - 目标像素密度, 建议传入设备默认像素密度值,否则可能会展示效果无法到达预期java.lang.IllegalArgumentException - view 和 position 不能为 nullpublic LatLng getPosition()
public void setPosition(LatLng mPosition)
mPosition - 位置数据public BitmapDescriptor getBitmapDescriptor()
public void setBitmapDescriptor(BitmapDescriptor mBitmapDescriptor)
InfoWindow(BitmapDescriptor, LatLng, int, OnInfoWindowClickListener)方式创建的InfoWindow的更新;
如果是使用了InfoWindow(View, LatLng, int, boolean, int) or InfoWindow(View, LatLng, int)方式创建
的InfoWindow,则不要使用该接口更新BitmapDescriptor,否则可能出现View与BitmapDescriptor层叠的现象。mBitmapDescriptor - BitmapDescriptorpublic View getView()
public void setView(View mView)
InfoWindow(View, LatLng, int, boolean, int) or InfoWindow(View, LatLng, int)两种方式创建
InfoWindow的更新; 如果是使用了InfoWindow(BitmapDescriptor, LatLng, int, OnInfoWindowClickListener)方式创建的
InfoWindow,则不要使用该接口更新View属性,否则可能出现View与BitmapDescriptor层叠的现象。mView - Viewpublic int getYOffset()
public void setYOffset(int mYOffset)
mYOffset - YOffset偏移public java.lang.String getTag()
public void setTag(java.lang.String tag)
tag - InfoWindow的Tag