[Fix]优化全览模式的淡入淡出效果、首次白屏闪现
This commit is contained in:
@@ -17,7 +17,7 @@ import androidx.annotation.Nullable;
|
||||
import com.amap.api.maps.AMap;
|
||||
import com.amap.api.maps.CameraUpdate;
|
||||
import com.amap.api.maps.CameraUpdateFactory;
|
||||
import com.amap.api.maps.MapView;
|
||||
import com.amap.api.maps.TextureMapView;
|
||||
import com.amap.api.maps.UiSettings;
|
||||
import com.amap.api.maps.model.BitmapDescriptor;
|
||||
import com.amap.api.maps.model.BitmapDescriptorFactory;
|
||||
@@ -65,7 +65,7 @@ public class AMapCustomView
|
||||
extends RelativeLayout
|
||||
implements IMoGoMapLocationListener {
|
||||
public static final String TAG = "AMapCustomView";
|
||||
private MapView mAMapView;
|
||||
private TextureMapView mAMapView;
|
||||
private AMap mAMap;
|
||||
private int zoomLevel = 15;
|
||||
private CameraUpdate mCameraUpdate;
|
||||
|
||||
@@ -67,7 +67,6 @@ object MarkerDrawerManager {
|
||||
private fun loopRouteAndWipe(routePoints: List<LatLng>?, lon: Double, lat: Double) {
|
||||
if (routePoints != null && routePoints.isNotEmpty()) {
|
||||
val arrivedIndex: Int = getArrivedPointIndex(routePoints, lon, lat)
|
||||
Log.d("cff", "thread is:${Thread.currentThread().name},arrivedIndex is:$arrivedIndex")
|
||||
if (arrivedIndex != -1 && lastArrivedIndex != arrivedIndex) {
|
||||
callback?.onLocationChanged(routePoints, arrivedIndex)
|
||||
lastArrivedIndex = arrivedIndex
|
||||
|
||||
@@ -17,10 +17,11 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
<com.amap.api.maps.MapView
|
||||
<com.amap.api.maps.TextureMapView
|
||||
android:id="@+id/aMapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overLayer"
|
||||
|
||||
Reference in New Issue
Block a user