Last active
August 25, 2019 14:11
-
-
Save SeongUgJung/058b8fb94577285c91660dfd4d285585 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Single.create { emitter: SingleEmitter<Map> -> | |
mapFragment.getMapAsync { map: GoogleMap? -> | |
map?.let { actualMap -> | |
actualMap.setOnMapLoadedCallback { | |
emitter.onSuccess(GoogleMapImpl(actualMap)) | |
} | |
} ?: run { emitter.tryOnError(IllegalStateException("No Map")) } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment