This commit is contained in:
wangcongtao
2021-01-29 18:31:34 +08:00
parent e90e299b95
commit 50c30eeea1
4 changed files with 24 additions and 1 deletions

View File

@@ -67,7 +67,7 @@ dependencies {
implementation project(':foudations:mogo-commons')
}
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.0.7'
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.0.8'
// implementation 'com.zhidaoauto.machine:map:1.0.0-vr-test-3.4'
}

View File

@@ -524,4 +524,18 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
Logger.e( TAG, e, "error." );
}
}
@Override
public void setInfoWindowOffset( int offsetX, int offsetY ) {
try {
mMarker.setInfoWindowOffset( offsetX, offsetY );
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override
public void addDynamicAnchorPosition( MogoLatLng latLng, long duration ) {
mMarker.addDynamicAnchorPostion( new LonLatPoint( latLng.lon, latLng.lat ), ( int ) duration );
}
}

View File

@@ -363,4 +363,12 @@ public interface IMogoMarker {
default void updateInfoWindowView( View view ) {
}
default void setInfoWindowOffset(int offsetX, int offsetY){
}
default void addDynamicAnchorPosition(MogoLatLng latLng, long duration){
}
}

View File

@@ -123,6 +123,7 @@ class BaseDrawer {
mSpeedView.setLayoutParams( new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT ) );
}
mSpeedView.setText( String.valueOf( ( ( int ) ( speed * 3.6 ) ) ) );
mogoMarker.setInfoWindowOffset( 0, 20 );
mogoMarker.updateInfoWindowView( mSpeedView );
} else {
mogoMarker.hideInfoWindow();