opt
This commit is contained in:
@@ -278,6 +278,7 @@ public class MogoServices implements IMogoMapListener,
|
||||
|
||||
public void init( Context context ) {
|
||||
mContext = context;
|
||||
initWorkThread();
|
||||
|
||||
MarkerServiceHandler.init( mContext );
|
||||
mRefreshModel = new RefreshModel( context );
|
||||
@@ -325,7 +326,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
mCardManager = MarkerServiceHandler.getMogoCardManager();
|
||||
|
||||
mFragmentManager.addMainFragmentStackTransactionListener( this );
|
||||
initWorkThread();
|
||||
}
|
||||
|
||||
private void initWorkThread() {
|
||||
@@ -452,6 +452,8 @@ public class MogoServices implements IMogoMapListener,
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
restartAutoRefreshAtTime( ServiceConst.DEFAULT_AUTO_REFRESH_WHEN_INTERRUPT );
|
||||
mThreadHandler.removeMessages( ServiceConst.MSG_LOCK_CAR );
|
||||
mThreadHandler.sendEmptyMessageDelayed( ServiceConst.MSG_LOCK_CAR, ServiceConst.DEFAULT_AUTO_REFRESH_WHEN_INTERRUPT );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -490,6 +492,8 @@ public class MogoServices implements IMogoMapListener,
|
||||
@Override
|
||||
public void onMapChanged( MogoLatLng latLng, float zoom, float tilt, float bearing ) {
|
||||
|
||||
MapMarkerManager.getInstance().syncLocation( latLng.lon, latLng. lat );
|
||||
|
||||
if ( mIsCameraInited ) {
|
||||
mLastZoomLevel = zoom;
|
||||
mLastCustomRefreshCenterLocation = latLng;
|
||||
@@ -608,7 +612,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
mLastAutoRefreshLocation = point;
|
||||
notifyRefreshData( mLastAutoRefreshLocation, getQueryRadius(), mAutoRefreshCallback );
|
||||
}
|
||||
MapMarkerManager.getInstance().syncLocation( latLng.getLongitude(), latLng.getLatitude() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.module.service.marker;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.view.animation.BounceInterpolator;
|
||||
import android.view.animation.OvershootInterpolator;
|
||||
@@ -865,7 +866,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
return;
|
||||
}
|
||||
runOnTargetThread( () -> {
|
||||
drawOnlineCarMarkers( onlineCarList, ServiceConst.MAX_AMOUNT_SINGLE_CARD );
|
||||
drawOnlineCarMarkers( onlineCarList, Integer.MAX_VALUE );
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -910,7 +911,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
return;
|
||||
}
|
||||
|
||||
List<MogoLatLng> points = new ArrayList<>();
|
||||
List<MogoLatLng> points = new ArrayList<>();
|
||||
for ( int j = 0; j < poiList.size(); j++ ) {
|
||||
MarkerCarPois poi = poiList.get( j );
|
||||
if ( poi == null || poi.getCoordinates() == null && poi.getCoordinates().size() != 2 ) {
|
||||
@@ -919,13 +920,12 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
try {
|
||||
double lat = Double.valueOf( poi.getCoordinates().get( 1 ) + "" );
|
||||
double lng = Double.valueOf( poi.getCoordinates().get( 0 ) + "" );
|
||||
points.add(new MogoLatLng(lat, lng));
|
||||
} catch ( Exception e ) {
|
||||
}
|
||||
points.add(new MogoLatLng(lat, lng));
|
||||
} catch ( Exception e ) { }
|
||||
}
|
||||
if (points.size() >= 1){
|
||||
points.add(new MogoLatLng(markerLocation.getLat(), markerLocation.getLon()));
|
||||
iMogoMarker.startSmooth( points, SMOOTH_DURATION );
|
||||
iMogoMarker.startSmooth( points, SMOOTH_DURATION );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -946,6 +946,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
double lat2 = Double.valueOf( end.getCoordinates().get( 1 ) + "" );
|
||||
double lng2 = Double.valueOf( end.getCoordinates().get( 0 ) + "" );
|
||||
if ( Utils.calculateLineDistance( new MogoLatLng( lat1, lng1 ), new MogoLatLng( lat2, lng2 ) ) >= 500 ) {
|
||||
Logger.d( TAG, "filter point" );
|
||||
return true;
|
||||
}
|
||||
} catch ( Exception e ) {
|
||||
|
||||
Reference in New Issue
Block a user