[V2X][Road]优化道路标记颜色逻辑
[V2X][Road]优化道路标记颜色逻辑2
This commit is contained in:
@@ -72,6 +72,7 @@ import com.zhidaoauto.map.sdk.open.camera.CameraPosition;
|
||||
import com.zhidaoauto.map.sdk.open.camera.CameraUpdateFactory;
|
||||
import com.zhidaoauto.map.sdk.open.camera.LatLngBounds;
|
||||
import com.zhidaoauto.map.sdk.open.data.MapDataApi;
|
||||
import com.zhidaoauto.map.sdk.open.location.LocationClient;
|
||||
import com.zhidaoauto.map.sdk.open.location.LocationListener;
|
||||
import com.zhidaoauto.map.sdk.open.location.MyLocationStyle;
|
||||
import com.zhidaoauto.map.sdk.open.location.RTKAutopilotLocationBean;
|
||||
@@ -125,6 +126,8 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
private boolean mIsFirstLocated = true;
|
||||
private boolean mIsDelayed = false;
|
||||
|
||||
private final LocationListener mGpsLocationListener = location -> CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(ObjectUtils.fromLocation(location), 0, true);
|
||||
|
||||
public AMapViewWrapper(MapAutoView mMapView) {
|
||||
CallerLogger.INSTANCE.i(M_MAP + TAG, "autoop--AMapViewWrapper: init");
|
||||
this.mMapView = mMapView;
|
||||
@@ -186,7 +189,11 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
mMapView.setOnMapLoadedListener(this);
|
||||
mMapView.setOnMapTouchListener(this);
|
||||
mMapView.setOnMapClickListener(this);
|
||||
mMapView.getLocationClient().registerListener(this);
|
||||
LocationClient client = mMapView.getLocationClient();
|
||||
if (client != null) {
|
||||
client.registerListener(this);
|
||||
client.registerGpsListener(mGpsLocationListener);
|
||||
}
|
||||
mMapView.registerListener(this, MapAutoApi.LISTENER_TYPE_ZOOM);
|
||||
mMapView.registerListener(this, MapAutoApi.LISTENER_TYPE_ROTATE);
|
||||
mMapView.registerListener(this, MapAutoApi.LISTENER_TYPE_3D);
|
||||
@@ -720,7 +727,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
@Override
|
||||
public void run() {
|
||||
if (location != null) {
|
||||
CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(location, 1);
|
||||
CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(location, 1, false);
|
||||
location = null;
|
||||
}
|
||||
}
|
||||
@@ -734,7 +741,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
public void onLocationChanged(@NotNull com.zhidaoauto.map.sdk.open.location.MogoLocation location) {
|
||||
MogoLocation currentLocation = ObjectUtils.fromLocation(location);
|
||||
if (Looper.myLooper() == Looper.getMainLooper()) {
|
||||
CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(currentLocation, 1);
|
||||
CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(currentLocation, 1, false);
|
||||
} else {
|
||||
if (mLocationTask == null) {
|
||||
mLocationTask = new LocationTask();
|
||||
|
||||
@@ -116,7 +116,7 @@ public class ALocationClient implements IMogoLocationClient {
|
||||
}
|
||||
Trace.beginSection( "timer.onLocationChanged" );
|
||||
mLastLocation = ObjectUtils.fromLocation( location );
|
||||
UiThreadHandler.post(() -> CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(mLastLocation, 0));
|
||||
UiThreadHandler.post(() -> CallerMapLocationListenerManager.INSTANCE.invokeMapLocationChangeListener(mLastLocation, 0, false));
|
||||
|
||||
Set< IMogoLocationListener > listeners = MogoLocationListenerRegister.getInstance().getListeners();
|
||||
synchronized ( listeners ) {
|
||||
|
||||
Reference in New Issue
Block a user