百度地图API学习笔记(三)

来源:互联网 发布:森海塞尔耳机推荐 知乎 编辑:程序博客网 时间:2024/05/21 06:30

com.baidu.mapapi.map.GroundOverlay,定义在地图上绘制一个 Ground 覆盖物,继承自com.baidu.mapapi.map.Overlay

字段概要

  • 从类继承的字段 com.baidu.mapapi.map.Overlay

    listener

方法概要

方法 限定符和类型方法和说明floatgetAnchorX()
获取 ground 覆盖物水平方向锚点比例
floatgetAnchorY()
获取 ground 覆盖物垂直方向锚点比例
LatLngBoundsgetBounds()
获取 ground 覆盖物地理坐标范围
intgetHeight()
获取 ground 覆盖物的高度,单位:米
BitmapDescriptorgetImage()
获取 ground 覆盖物的图片信息
LatLnggetPosition()
获取 ground 覆盖物位置信息
floatgetTransparency()
获取 ground 覆盖物透明度
intgetWidth()
获取 ground 覆盖物的宽度,单位:米
voidsetAnchor(float anchorX, float anchorY)
当使用 setPosition() 方式设置覆盖物地理位置时,设置 ground 覆盖物的锚点比例,默认为 0.5f,水平与垂直方向都居中对齐
voidsetDimensions(int width)
设置 ground 覆盖物的宽度,单位:米, 高度按图片宽高比例
voidsetDimensions(int width, int height)
设置 ground 覆盖物的宽度和高度,单位:米
voidsetImage(BitmapDescriptor image)
设置 Ground 覆盖物的图片信息
voidsetPosition(LatLng latLng)
设置 Ground 覆盖物位置信息方式一,与 setDimensions(int, int)配合使用
voidsetPositionFromBounds(LatLngBounds bounds)
设置 ground 覆盖物的位置信息方式二,设置西南与东北坐标范围
voidsetTransparency(float transparency)
设置 ground 覆盖物透明度,默认为 1.0f

从类继承的方法 com.baidu.mapapi.map.Overlay

getExtraInfo,getZIndex, isVisible, remove, setExtraInfo, setVisible, setZIndex

0 0
原创粉丝点击