rc
This commit is contained in:
@@ -199,6 +199,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
@Override
|
||||
public boolean onMarkerClicked( IMogoMarker marker ) {
|
||||
switch2( marker.getOwner() );
|
||||
mMogoModuleHandler.onMarkerReceive(marker.getOwner(),marker);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.module.main.cards;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
@@ -72,4 +73,12 @@ public interface MogoModulesHandler extends IMogoMapListener,
|
||||
* 销毁
|
||||
*/
|
||||
void destroy();
|
||||
|
||||
|
||||
/**
|
||||
* 卡片接收到Marker传入数据
|
||||
* @param cardType
|
||||
* @param marker
|
||||
*/
|
||||
void onMarkerReceive(String cardType, IMogoMarker marker);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.model.MogoPoi;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
@@ -21,8 +22,6 @@ import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.common.MogoModule;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.main.MainActivity;
|
||||
import com.mogo.module.main.receiver.MogoReceiver;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
import com.mogo.service.module.IMogoModuleLifecycle;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.module.ModuleType;
|
||||
@@ -445,6 +444,16 @@ public class MogoModulesManager implements MogoModulesHandler,
|
||||
|
||||
@Override
|
||||
public void onoCalculateFailed() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMarkerReceive( String cardType, IMogoMarker marker ) {
|
||||
for ( IMogoModuleProvider value : mModuleProviders.values() ) {
|
||||
if ( value.getModuleName().equals( cardType ) ) {
|
||||
if ( value.getMarkerClickListener() != null ) {
|
||||
value.getMarkerClickListener().onMarkerClicked( marker );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user