public class BusRouteOverlay
extends java.lang.Object
构造器和说明 |
---|
BusRouteOverlay(Context context,
AMap amap,
com.amap.api.services.route.BusPath path,
com.amap.api.services.core.LatLonPoint start,
com.amap.api.services.core.LatLonPoint end)
通过此构造函数创建公交路线图层。
|
限定符和类型 | 方法和说明 |
---|---|
void |
addToMap()
添加公交路线到地图上。
|
void |
drawLineArrow(LatLng start,
LatLng end) |
void |
removeFromMap()
去掉BusLineOverlay上所有的Marker。
|
void |
setNodeIconVisibility(boolean visible)
路段节点图标控制显示接口。
|
void |
zoomToSpan() |
public BusRouteOverlay(Context context, AMap amap, com.amap.api.services.route.BusPath path, com.amap.api.services.core.LatLonPoint start, com.amap.api.services.core.LatLonPoint end)
context
- 当前activity。amap
- 地图对象。path
- 公交路径规划的一个路段。详见搜索服务模块的路径查询包(com.amap.api.services.route)中的类 BusPath。start
- 起点坐标。详见搜索服务模块的核心基础包(com.amap.api.services.core)中的类 LatLonPoint。end
- 终点坐标。详见搜索服务模块的核心基础包(com.amap.api.services.core)中的类 LatLonPoint。public void addToMap()
public void removeFromMap()
public void setNodeIconVisibility(boolean visible)
visible
- true为显示节点图标,false为不显示。public void zoomToSpan()