Q:

lateinit property mMap has not been initialized

I wrote these lines of code and got error 
Caused by: kotlin.UninitializedPropertyAccessException: lateinit property mMap has not been initialized
My method : 
fun initCameraIdleListener() {
    var latitude = mMap.cameraPosition.target.latitude
    var longitude = mMap.cameraPosition.target.longitude
    myLatLng = LatLng(latitude, longitude)

    mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLatLng, 18f))

}

A:

On the onMapReady callback you need to assign your propety to the argument received:
override fun onMapReady(googleMap: GoogleMap) {
   mMap = googleMap
   initCameraIdleListener()
}

only after this you can call initCameraIdleListener()

