|
@@ -84,16 +84,16 @@ class AMapView(private val context: Context, private val channel: MethodChannel)
|
|
|
frameLayout?.removeView(mapView)
|
|
frameLayout?.removeView(mapView)
|
|
|
frameLayout = null
|
|
frameLayout = null
|
|
|
}
|
|
}
|
|
|
|
|
+ if (aMap != null) {
|
|
|
|
|
+ aMap?.setOnMyLocationChangeListener(null)
|
|
|
|
|
+ aMap = null
|
|
|
|
|
+ }
|
|
|
if (mapView != null) {
|
|
if (mapView != null) {
|
|
|
|
|
+ mapView?.onDestroy()
|
|
|
mapView?.removeAllViews()
|
|
mapView?.removeAllViews()
|
|
|
infoWindow = null
|
|
infoWindow = null
|
|
|
mapView = null
|
|
mapView = null
|
|
|
}
|
|
}
|
|
|
- aMap?.setOnMyLocationChangeListener(null)
|
|
|
|
|
- if (aMap != null) {
|
|
|
|
|
- aMap = null
|
|
|
|
|
- }
|
|
|
|
|
- mapView?.onDestroy()
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
override fun onMyLocationChange(p0: Location) {
|
|
override fun onMyLocationChange(p0: Location) {
|