终点marker 调整删除marker的逻辑
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.mogo.module.service.routeoverlay;
|
||||
|
||||
import android.content.Context;
|
||||
import android.location.Location;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
|
||||
@@ -14,10 +13,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.service.adas.IMogoAdasOCHCallback;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -80,7 +76,6 @@ public class MogoRouteOverlayManager implements IMoGoAutopilotPlanningListener,
|
||||
for (AutopilotRouteInfo.RouteModels routeModel : routeList.getModels()) {
|
||||
latLngList.add(new MogoLatLng(routeModel.getLat(), routeModel.getLon()));
|
||||
}
|
||||
Log.d(TAG2, "routeResult:" + latLngList.size());
|
||||
int listSize = latLngList.size();
|
||||
RouteOverlayDrawer.getInstance(mContext).addEndingMarker(latLngList.get(listSize - 1).lat,latLngList.get(listSize - 1).lon);
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.overlay.IMogoOverlayManager;
|
||||
import com.mogo.map.overlay.IMogoPolyline;
|
||||
import com.mogo.map.overlay.MogoPolylineOptions;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.utils.LocationUtils;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.utils.ColorUtils;
|
||||
|
||||
@@ -73,19 +73,22 @@ public class RouteOverlayDrawer {
|
||||
|
||||
public void addEndingMarker(double lat,double lon){
|
||||
if (markderOptions == null){
|
||||
markderOptions = new MogoMarkerOptions().
|
||||
set3DMode(MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode())
|
||||
markderOptions = new MogoMarkerOptions()
|
||||
.matchOnRoadSide(true)
|
||||
.gps(true)
|
||||
.icon(endingBitmap)
|
||||
.owner(markerType)
|
||||
.anchor(0.5f, 0.5f)
|
||||
.scale(0.5f)
|
||||
.zIndex(30001);
|
||||
// .object(markerShowEntity)
|
||||
}
|
||||
markderOptions.latitude(lat).longitude(lon);
|
||||
Log.d("lianglihui","addEndingMarker-"+lat+":"+lon);
|
||||
endMarker = MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext).addMarker(markerType, markderOptions);
|
||||
if (DebugConfig.isDebug()){
|
||||
ToastUtils.showLong("绘制终点marker,"+lat+":"+lon);
|
||||
}
|
||||
}
|
||||
|
||||
public void clearMogoRouteOverlay(){
|
||||
@@ -98,9 +101,7 @@ public class RouteOverlayDrawer {
|
||||
}
|
||||
|
||||
public void clearEndingMarker(){
|
||||
if (endMarker != null){
|
||||
endMarker.setVisible(false);
|
||||
}
|
||||
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager(mContext).removeMarkers(markerType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user