设置中心点和缩放比例:
/**
* 监听amap地图加载成功事件回调
*/
@Override
public void onMapLoaded() {
LatLng marker1 = new LatLng(39.90403, 116.407525);
//设置中心点和缩放比例
aMap.moveCamera(CameraUpdateFactory.changeLatLng(marker1));
aMap.moveCamera(CameraUpdateFactory.zoomTo(12));
}
获取两点之前距离
LatLng start = new LatLng(39.95676, 116.401394);
LatLng end = new LatLng(36.63014,114.499574);
AMapUtils.calculateLineDistance(start, end)