Refactoring of onMapReady