dev
This commit is contained in:
@@ -40,32 +40,35 @@ public class MogoMapView extends MogoBaseMapView implements ILifeCycle {
|
||||
|
||||
@Override
|
||||
protected void addDleMaps() {
|
||||
mAMapView = new AMapBaseMapView().create( getContext() );
|
||||
mCustomMapView = new CustomMapView().create( getContext() );
|
||||
|
||||
if ( mAMapView != null ) {
|
||||
final View mapView = mAMapView.getMapView();
|
||||
if ( mapView != null ) {
|
||||
addView( mapView, new FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT ) );
|
||||
if ( !MogoMapDelegateFactory.isUseCustom() ) {
|
||||
mAMapView = new AMapBaseMapView().create( getContext() );
|
||||
if ( mAMapView != null ) {
|
||||
final View mapView = mAMapView.getMapView();
|
||||
if ( mapView != null ) {
|
||||
addView( mapView, new FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT ) );
|
||||
} else {
|
||||
Logger.e( TAG, "create MapView instance failed." );
|
||||
}
|
||||
} else {
|
||||
Logger.e( TAG, "create MapView instance failed." );
|
||||
Logger.e( TAG, "create IMogoMapView instance failed." );
|
||||
}
|
||||
mMapView = mAMapView;
|
||||
} else {
|
||||
Logger.e( TAG, "create IMogoMapView instance failed." );
|
||||
mCustomMapView = new CustomMapView().create( getContext() );
|
||||
if ( mCustomMapView != null ) {
|
||||
final View mapView = mCustomMapView.getMapView();
|
||||
if ( mapView != null ) {
|
||||
addView( mapView, new FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT ) );
|
||||
} else {
|
||||
Logger.e( TAG, "create MapView instance failed." );
|
||||
}
|
||||
} else {
|
||||
Logger.e( TAG, "create IMogoMapView instance failed." );
|
||||
}
|
||||
mMapView = mCustomMapView;
|
||||
}
|
||||
|
||||
// if ( mCustomMapView != null ) {
|
||||
// final View mapView = mCustomMapView.getMapView();
|
||||
// if ( mapView != null ) {
|
||||
// addView( mapView, new FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT ) );
|
||||
// } else {
|
||||
// Logger.e( TAG, "create MapView instance failed." );
|
||||
// }
|
||||
// } else {
|
||||
// Logger.e( TAG, "create IMogoMapView instance failed." );
|
||||
// }
|
||||
|
||||
mMapView = mAMapView;
|
||||
MogoMap.getInstance().init( getContext(), mMapView.getMap() );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user