|
|
@@ -13,6 +13,7 @@ import androidx.lifecycle.LifecycleOwner;
|
|
|
import com.amap.api.maps.AMap;
|
|
|
import com.amap.api.maps.CameraUpdateFactory;
|
|
|
import com.amap.api.maps.MapView;
|
|
|
+import com.amap.api.maps.TextureMapView;
|
|
|
import com.atmob.map_amap_android.contants.Constants;
|
|
|
import com.atmob.map_amap_android.overlays.MyMethodCallHandler;
|
|
|
import com.atmob.map_amap_android.overlays.marker.MarkersController;
|
|
|
@@ -37,7 +38,7 @@ public class AmapView implements PlatformView, DefaultLifecycleObserver, MethodC
|
|
|
|
|
|
private final MethodChannel channel;
|
|
|
|
|
|
- private MapView mapView = null;
|
|
|
+ private TextureMapView mapView = null;
|
|
|
|
|
|
private boolean disposed = false;
|
|
|
|
|
|
@@ -62,7 +63,7 @@ public class AmapView implements PlatformView, DefaultLifecycleObserver, MethodC
|
|
|
LogUtil.i(TAG, "AmapView() ==> viewId: " + viewId + ", hash: " + this.hashCode());
|
|
|
|
|
|
try {
|
|
|
- mapView = new MapView(context);
|
|
|
+ mapView = new TextureMapView(context);
|
|
|
mapView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
|
|
|
@Override
|
|
|
public void onViewAttachedToWindow(@NonNull View v) {
|