opt
This commit is contained in:
@@ -12,6 +12,7 @@ import com.amap.api.navi.AMapNavi;
|
||||
import com.amap.api.navi.model.AMapNaviLocation;
|
||||
import com.amap.api.navi.model.AMapNaviPath;
|
||||
import com.amap.api.navi.model.NaviInfo;
|
||||
import com.mogo.map.impl.amap.AMapWrapper;
|
||||
import com.mogo.map.impl.amap.R;
|
||||
import com.mogo.map.impl.amap.overlay.RouteOverLayWrapper;
|
||||
import com.mogo.map.navi.MogoCalculatePath;
|
||||
@@ -81,6 +82,7 @@ public class NaviOverlayHelper implements MogoCalculatePath.OnItemClickInteracti
|
||||
* @return 排序好的路径规划列表
|
||||
*/
|
||||
private List< CalculatePathItem > getSortedPaths() {
|
||||
checkAMapInstance();
|
||||
final Map< Integer, AMapNaviPath > pathMap = mAMapNavi.getNaviPaths();
|
||||
if ( pathMap == null || pathMap.isEmpty() ) {
|
||||
return null;
|
||||
@@ -126,9 +128,16 @@ public class NaviOverlayHelper implements MogoCalculatePath.OnItemClickInteracti
|
||||
* @param bounds
|
||||
*/
|
||||
private void showPathsBound( LatLngBounds bounds ) {
|
||||
checkAMapInstance();
|
||||
mAMap.animateCamera( CameraUpdateFactory.newLatLngBoundsRect( bounds, mBoundRect.left, mBoundRect.right, mBoundRect.top, mBoundRect.bottom ) );
|
||||
}
|
||||
|
||||
private void checkAMapInstance(){
|
||||
if ( mAMap == null ) {
|
||||
mAMap = AMapWrapper.getAMap();
|
||||
}
|
||||
}
|
||||
|
||||
public void renderPathOverlay( List< CalculatePathItem > paths ) {
|
||||
if ( paths == null || paths.size() == 0 ) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user