fix bug of add Onlinecar in 2Dmap

This commit is contained in:
zhongchao
2021-04-13 11:00:41 +08:00
parent e81427ccb5
commit 6fce9c35e4
2 changed files with 10 additions and 1 deletions

View File

@@ -68,6 +68,15 @@ class MarkerDrawer {
return drawMapMarkerImpl( markerShowEntity, matchRoadSide, zIndex, 0, listener );
}
/**
* add marker, {@link OnlineCarDrawer 如果是需要在3D模式下显示则需要设置 {@link MogoMarkerOptions icon3DRes 资源id}}
* @param markerShowEntity marker展示数据结构体
* @param matchRoadSide 设置是否道路吸附,暂时没用到这个字段
* @param zIndex zOrder
* @param icon3DRes 3D Res资源
* @param listener marker回调
* @return {@link IMogoMarker}
*/
public IMogoMarker drawMapMarkerImpl( MarkerShowEntity markerShowEntity, boolean matchRoadSide, int zIndex, int icon3DRes, IMogoMarkerClickListener listener ) {
if ( markerShowEntity == null || markerShowEntity.getMarkerLocation() == null ) {
return null;

View File

@@ -105,7 +105,7 @@ class OnlineCarDrawer {
String sn = MarkerDrawer.getInstance().getPrimaryKeyFromEntity( markerOnlineCar );
IMogoMarker mogoMarker = existCarMap.get( sn );
if ( mogoMarker == null || mogoMarker.isDestroyed() ) {
mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl( markerShowEntity, false, MarkerDrawer.MARKER_Z_INDEX_LOW, R.raw.othercar, listener );
mogoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl( markerShowEntity, false, MarkerDrawer.MARKER_Z_INDEX_LOW, 0, listener );
}
if ( mogoMarker != null ) {
mogoMarker.setVisible( true );