public class DrivingRouteOverlay
extends java.lang.Object
构造器和说明 |
---|
DrivingRouteOverlay(Context context,
AMap amap,
com.amap.api.services.route.DrivePath path,
com.amap.api.services.core.LatLonPoint start,
com.amap.api.services.core.LatLonPoint end)
通过此构造函数创建驾车路线图层。
|
DrivingRouteOverlay(Context context,
AMap amap,
com.amap.api.services.route.DrivePath drivePath,
com.amap.api.services.core.LatLonPoint start,
com.amap.api.services.core.LatLonPoint end,
java.util.List<com.amap.api.services.core.LatLonPoint> throughPointList)
通过此构造函数创建带有途经点的驾车路线图层。
|
限定符和类型 | 方法和说明 |
---|---|
void |
addToMap()
绘制节点和线路
|
void |
removeFromMap()
去掉DriveLineOverlay上所有的Marker。
|
void |
setNodeIconVisibility(boolean visible)
路段节点图标控制显示接口。
|
void |
setThroughPointIconVisibility(boolean visible)
途经点图标控制显示接口。
|
void |
zoomToSpan() |
public DrivingRouteOverlay(Context context, AMap amap, com.amap.api.services.route.DrivePath path, com.amap.api.services.core.LatLonPoint start, com.amap.api.services.core.LatLonPoint end)
context
- 当前activity。amap
- 地图对象。path
- 驾车路线规划的一个方案。详见搜索服务模块的路径查询包(com.amap.api.services.route)中的类 DrivePath。start
- 起点。详见搜索服务模块的核心基础包(com.amap.api.services.core)中的类 LatLonPoint。end
- 终点。详见搜索服务模块的核心基础包(com.amap.api.services.core)中的类LatLonPoint。public DrivingRouteOverlay(Context context, AMap amap, com.amap.api.services.route.DrivePath drivePath, com.amap.api.services.core.LatLonPoint start, com.amap.api.services.core.LatLonPoint end, java.util.List<com.amap.api.services.core.LatLonPoint> throughPointList)
context
- 当前activity。amap
- 地图对象。drivePath
- 驾车路线规划的一个方案。详见搜索服务模块的路径查询包(com.amap.api.services.route)中的类 DrivePath。start
- 起点。详见搜索服务模块的核心基础包(com.amap.api.services.core)中的类 LatLonPoint。end
- 终点。详见搜索服务模块的核心基础包(com.amap.api.services.core)中的类LatLonPoint。throughPointList
- 途经点列表,详见搜索服务模块的核心基础包(com.amap.api.services.core)中的类LatLonPoint。public void addToMap()
public void removeFromMap()
public void setThroughPointIconVisibility(boolean visible)
visible
- true为显示节点图标,false为不显示。public void setNodeIconVisibility(boolean visible)
visible
- true为显示节点图标,false为不显示。public void zoomToSpan()