public class AMapUtils
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static int |
BUS_COMFORT
最舒适 : 4
|
static int |
BUS_MONEY_LITTLE
费用优先 : 1
|
static int |
BUS_NO_SUBWAY
不乘地铁 : 5
|
static int |
BUS_TIME_FIRST
最快捷 : 0
|
static int |
BUS_TRANSFER_LITTLE
最少换乘 : 2
|
static int |
BUS_WALK_LITTLE
最少步行 : 3
|
static int |
DRIVING_AVOID_CONGESTION
避免拥堵 : 4
|
static int |
DRIVING_DEFAULT
速度优先 : 0
|
static int |
DRIVING_NO_HIGHWAY
不走高速 : 3
|
static int |
DRIVING_NO_HIGHWAY_AVOID_CONGESTION
不走高速且躲避拥堵 : 6
|
static int |
DRIVING_NO_HIGHWAY_AVOID_SHORT_MONEY
不走高速且避免收费 : 5
|
static int |
DRIVING_NO_HIGHWAY_SAVE_MONEY_AVOID_CONGESTION
不走高速躲避收费和拥堵 : 8
|
static int |
DRIVING_SAVE_MONEY
费用优先 : 1
|
static int |
DRIVING_SAVE_MONEY_AVOID_CONGESTION
躲避收费和拥堵 : 7
|
static int |
DRIVING_SHORT_DISTANCE
距离优先 : 2
|
构造器和说明 |
---|
AMapUtils() |
限定符和类型 | 方法和说明 |
---|---|
static float |
calculateArea(LatLng leftTopLatlng,
LatLng rightBottomLatlng)
计算地图上矩形区域的面积,单位平方米。
|
static float |
calculateLineDistance(LatLng startLatlng,
LatLng endLatlng)
根据用户的起点和终点经纬度计算两点间距离,此距离为相对较短的距离,单位米。
|
static void |
getLatestAMapApp(Context context)
打开最新版高德地图的下载页。
|
static void |
openAMapDrivingRoute(RoutePara para,
Context context)
调起高德地图驾车路线检索页面。
|
static void |
openAMapNavi(NaviPara para,
Context context)
唤起高德地图进行导航。
|
static void |
openAMapPoiNearbySearch(PoiPara para,
Context context)
调起高德地图poi周边检索页面。
|
static void |
openAMapTransitRoute(RoutePara para,
Context context)
调起高德地图公交路线检索页面。
|
static void |
openAMapWalkingRoute(RoutePara para,
Context context)
调起高德地图步行路线检索页面。
|
public static final int DRIVING_DEFAULT
public static final int DRIVING_SAVE_MONEY
public static final int DRIVING_SHORT_DISTANCE
public static final int DRIVING_NO_HIGHWAY
public static final int DRIVING_AVOID_CONGESTION
public static final int DRIVING_NO_HIGHWAY_AVOID_SHORT_MONEY
public static final int DRIVING_NO_HIGHWAY_AVOID_CONGESTION
public static final int DRIVING_SAVE_MONEY_AVOID_CONGESTION
public static final int DRIVING_NO_HIGHWAY_SAVE_MONEY_AVOID_CONGESTION
public static final int BUS_TIME_FIRST
public static final int BUS_MONEY_LITTLE
public static final int BUS_TRANSFER_LITTLE
public static final int BUS_WALK_LITTLE
public static final int BUS_COMFORT
public static final int BUS_NO_SUBWAY
public static float calculateLineDistance(LatLng startLatlng, LatLng endLatlng)
startLatlng
- 起点的坐标endLatlng
- 终点的坐标public static float calculateArea(LatLng leftTopLatlng, LatLng rightBottomLatlng)
leftTopLatlng
- 矩形区域左上角点坐标rightBottomLatlng
- 矩形区域右下角点坐标public static void getLatestAMapApp(Context context)
context
- 上下文,必须填写public static void openAMapNavi(NaviPara para, Context context) throws AMapException
para
- 导航需要的参数。context
- 上下文,必须填写AMapException
public static void openAMapPoiNearbySearch(PoiPara para, Context context) throws AMapException
para
- poi周边检索需要的参数。context
- 上下文,必须填写AMapException
public static void openAMapDrivingRoute(RoutePara para, Context context) throws AMapException
para
- 驾车路线检索需要的参数。context
- 上下文,必须填写AMapException
public static void openAMapTransitRoute(RoutePara para, Context context) throws AMapException
para
- 公交路线检索需要的参数。context
- 上下文,必须填写AMapException
public static void openAMapWalkingRoute(RoutePara para, Context context) throws AMapException
para
- 步行路线检索需要的参数。context
- 上下文,必须填写AMapException