This commit is contained in:
wangcongtao
2020-02-21 13:39:23 +08:00
parent d84c243799
commit d481cf1c70
3 changed files with 24 additions and 6 deletions

View File

@@ -428,6 +428,7 @@ public class MogoServiceProvider implements IMogoModuleProvider,
@Override
public void onMapChanged( MogoLatLng latLng, float zoom, float tilt, float bearing ) {
if ( mIsCameraInited ) {
mLastZoomLevel = zoom;
mLastCustomRefreshCenterLocation = latLng;
@@ -444,6 +445,7 @@ public class MogoServiceProvider implements IMogoModuleProvider,
if ( mStatusManager.isUserInteracted() ) {
mLastCustomRefreshCenterLocation = latLng;
mLastZoomLevel = zoom;
refreshCameraPosition();
return;
}
@@ -487,6 +489,7 @@ public class MogoServiceProvider implements IMogoModuleProvider,
if ( factor == 0.0f ) {
return false;
}
Logger.d( TAG, "invokeRefreshWhenTranslationByUsermLastCustomRefreshCenterLocation = %s, latLng = %s", mLastCustomRefreshCenterLocation, latLng );
float distance = Utils.calculateLineDistance( latLng, mLastCustomRefreshCenterLocation );
return distance > factor;
} catch ( Exception e ) {
@@ -500,6 +503,9 @@ public class MogoServiceProvider implements IMogoModuleProvider,
if ( location == null ) {
return;
}
Logger.d( TAG, "onLocationChanged = %s", location );
// 自动刷新触发
final MogoLatLng point = new MogoLatLng( location.getLatitude(), location.getLongitude() );
if ( mLastAutoRefreshLocation == null ) {

View File

@@ -510,8 +510,8 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoOnMessag
if (isFirstMarker && isOnLineCard) {
if (nearlyMogoMarker != null) {
Logger.w(TAG, "ACC ON,或者语音搜索触发默认选中最近的在线车辆nearlyMogoMarker" + nearlyMogoMarker);
// onMarkerClicked(nearlyMogoMarker);
// MogoMarkersHandler.getInstance().onMarkerClicked(nearlyMogoMarker);
onMarkerClicked(nearlyMogoMarker);
MogoMarkersHandler.getInstance().onMarkerClicked(nearlyMogoMarker);
isFirstMarker = false;
}
}