Don't null a param which is still used, stub for missing function. Fixes #1126.

This commit is contained in:
Alexandru Chircu 2020-08-05 08:01:59 +00:00 committed by Marvin W
parent a22a366797
commit 5839489b1c
2 changed files with 16 additions and 1 deletions

View File

@ -223,6 +223,11 @@ class GoogleMapImpl(private val context: Context, var options: GoogleMapOptions)
override fun stopAnimation() = map?.cancelTransitions() ?: Unit override fun stopAnimation() = map?.cancelTransitions() ?: Unit
override fun setMapStyle(options: MapStyleOptions?): Boolean {
Log.d(TAG, "setMapStyle options: " + options?.getJson())
return true
}
override fun setMinZoomPreference(minZoom: Float) { override fun setMinZoomPreference(minZoom: Float) {
map?.setMinZoomPreference(minZoom.toDouble() - 1) map?.setMinZoomPreference(minZoom.toDouble() - 1)
} }
@ -719,7 +724,10 @@ class GoogleMapImpl(private val context: Context, var options: GoogleMapOptions)
// TODO can crash? // TODO can crash?
mapView?.onDestroy() mapView?.onDestroy()
mapView = null mapView = null
map = null
// Don't make it null; this object is not deleted immediately, and it may want to access map.* stuff
//map = null
created = false created = false
initialized = false initialized = false
loaded = false loaded = false

View File

@ -60,6 +60,7 @@ import com.google.android.gms.maps.model.CircleOptions;
import com.google.android.gms.maps.model.GroundOverlayOptions; import com.google.android.gms.maps.model.GroundOverlayOptions;
import com.google.android.gms.maps.model.LatLngBounds; import com.google.android.gms.maps.model.LatLngBounds;
import com.google.android.gms.maps.model.MarkerOptions; import com.google.android.gms.maps.model.MarkerOptions;
import com.google.android.gms.maps.model.MapStyleOptions;
import com.google.android.gms.maps.model.PolygonOptions; import com.google.android.gms.maps.model.PolygonOptions;
import com.google.android.gms.maps.model.PolylineOptions; import com.google.android.gms.maps.model.PolylineOptions;
import com.google.android.gms.maps.model.TileOverlayOptions; import com.google.android.gms.maps.model.TileOverlayOptions;
@ -211,6 +212,12 @@ public class GoogleMapImpl extends IGoogleMapDelegate.Stub
} }
@Override
public boolean setMapStyle(MapStyleOptions options) throws RemoteException {
Log.d(TAG, "unimplemented Method: setMapStyle");
return true;
}
@Override @Override
public void setMinZoomPreference(float minZoom) throws RemoteException { public void setMinZoomPreference(float minZoom) throws RemoteException {
Log.d(TAG, "unimplemented Method: setMinZoomPreference"); Log.d(TAG, "unimplemented Method: setMinZoomPreference");