增加了关闭Marker详情的调用方法

This commit is contained in:
董宏宇
2020-02-10 14:32:23 +08:00
parent bb62440689
commit 77d8ff6be1
2 changed files with 23 additions and 2 deletions

View File

@@ -10,7 +10,6 @@ import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.launcher.news.FreshNewsConstants;
import com.mogo.module.adcard.AdCardConstants;
import com.mogo.module.back.BackToMainHomeManager;
import com.mogo.module.carchatting.card.CallChatConstant;
import com.mogo.module.common.MogoModule;
import com.mogo.module.common.MogoModulePaths;

View File

@@ -47,7 +47,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
// 第一次请求到地图的Marker数据
private boolean isFirstMarker = true;
private Context mContext;
private IMogoMarker lastMarker;
private static IMogoMarker lastMarker;
private static MapMarkerManager mMarkerManager;
private MapMarkerManager() {
@@ -198,6 +198,28 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
}
}
/**
* 关闭 Marker 详情
*
* @param marker 要关闭的Marker
*/
public void closeMarkerSelect(IMogoMarker marker) {
// 将上次选中 Marker 设置为未选中状态
if (marker != null) {
Logger.i(TAG, "closeMarkerSelect 将出Marker详情关闭" + marker);
// 将上次选中 Marker 设置为未选中状态
MarkerShowEntity lastMarkerShowEntity = (MarkerShowEntity) marker.getObject();
lastMarkerShowEntity.setChecked(false);
lastMarkerShowEntity.setHighlighted(false);
drawMapMarker(lastMarkerShowEntity);
marker.remove();
lastMarker = null;
}
}
/**
* 绘制Marker
*/