add new function of click map static marker
This commit is contained in:
@@ -8,6 +8,7 @@ import android.util.Log;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.extensions.R;
|
||||
@@ -40,16 +41,18 @@ public class CameraLiveNoticeHelper implements IMogoCloudOnMsgListener {
|
||||
mContext = context;
|
||||
|
||||
MoGoAiCloudRealTime.registerOnMsgListener(this);
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().registerMogoMarkerClickListener(PushDataType.TYPE_PUSH_CAMERA_DATA, marker -> {
|
||||
//点击的marker的具体数据
|
||||
if (mCloudRoadData != null && !TextUtils.isEmpty(mCloudRoadData.getRtmpUrl())) {
|
||||
CameraLiveManager.getInstance().init(mCloudRoadData);
|
||||
} else {
|
||||
Logger.e(TAG, " onMarkerClicked mCloudRoadData == null ");
|
||||
TipToast.shortTip("直播流地址为空");
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi().registerMogoMarkerClickListener(PushDataType.TYPE_PUSH_CAMERA_DATA, new IMogoMarkerClickListener() {
|
||||
@Override
|
||||
public boolean onMarkerClicked(IMogoMarker marker) {
|
||||
//点击的marker的具体数据
|
||||
if (mCloudRoadData != null && !TextUtils.isEmpty(mCloudRoadData.getRtmpUrl())) {
|
||||
CameraLiveManager.getInstance().init(mCloudRoadData);
|
||||
} else {
|
||||
Logger.e(TAG, " onMarkerClicked mCloudRoadData == null ");
|
||||
TipToast.shortTip("直播流地址为空");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// loadMarker(false);
|
||||
|
||||
Reference in New Issue
Block a user