Commit 9b9ed816 authored by Alexandru Chircu's avatar Alexandru Chircu Committed by Romain Hunault
Browse files

Added stub for setMapStyleOptions; don't set a member to null because it was...

Added stub for setMapStyleOptions; don't set a member to null because it was still used after onDestroy()
parent c34da53c
......@@ -7,3 +7,8 @@ build/
user.gradle
local.properties
.directory
bin/
.project
.classpath
.output/
.settings/
Subproject commit 09bf9494038ab53e0b86d8699db409b955fe3c0c
Subproject commit c6448e7c55ff95c49a6affe2e514ef96b0a30bf3
......@@ -210,6 +210,11 @@ class GoogleMapImpl(private val context: Context, var options: GoogleMapOptions)
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) {
map?.setMinZoomPreference(minZoom.toDouble() - 1)
}
......@@ -678,23 +683,33 @@ class GoogleMapImpl(private val context: Context, var options: GoogleMapOptions)
override fun onResume() = mapView?.onResume() ?: Unit
override fun onPause() = mapView?.onPause() ?: Unit
override fun onDestroy() {
Log.d(TAG, "destroy");
Log.d(TAG, "destroy")
circleManager?.onDestroy()
circleManager = null
lineManager?.onDestroy()
lineManager = null
fillManager?.onDestroy()
fillManager = null
symbolManager?.onDestroy()
symbolManager = null
pendingMarkers.clear()
markers.clear()
BitmapDescriptorFactoryImpl.unregisterMap(map)
view.removeView(mapView)
// TODO can crash?
mapView?.onDestroy()
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
initialized = false
loaded = false
......
......@@ -46,6 +46,7 @@ class MapViewImpl(private val context: Context, options: GoogleMapOptions?) : IM
override fun onResume() = map?.onResume() ?: Unit
override fun onPause() = map?.onPause() ?: Unit
override fun onDestroy() {
Log.d(TAG, "destroy")
map?.onDestroy()
map = null
}
......
......@@ -59,6 +59,7 @@ import com.google.android.gms.maps.model.CircleOptions;
import com.google.android.gms.maps.model.GroundOverlayOptions;
import com.google.android.gms.maps.model.LatLngBounds;
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.PolylineOptions;
import com.google.android.gms.maps.model.TileOverlayOptions;
......@@ -210,6 +211,12 @@ public class GoogleMapImpl extends IGoogleMapDelegate.Stub
}
@Override
public boolean setMapStyle(MapStyleOptions options) throws RemoteException {
Log.d(TAG, "unimplemented Method: setMapStyle");
return true;
}
@Override
public void setMinZoomPreference(float minZoom) throws RemoteException {
Log.d(TAG, "unimplemented Method: setMinZoomPreference");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment