fix bug of add Onlinecar in 2Dmap
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user