Map Kotlin Extensions
Additional classes that make development with Kotlin more pleasant and idiomatic. This module does not add any new features to the existing TomtomMap API.
To use this library, add the following dependency to the build.gradle file:
api("com.tomtom.online:sdk-maps-ktx-extensions:{libversion}")
To apply an operation on the TomtomMap:
1inline fun MapFragment.applyOnTomtomMap(noinline block: TomtomMap.() -> Unit) {2 getAsyncMap(block)3}
To take advantage of coroutines:
1suspend inline fun MapFragment.getTomtomMap(): TomtomMap = suspendCoroutine { cont ->2 val callback = OnMapReadyCallback { tomtomMap -> cont.resume(tomtomMap) }3 getAsyncMap(callback)4}
API Reference
JavaDocMapKtxExtensions_2.4.807 (JavaDocMapKtxExtensions_2.4.807.zip)
Older versions | Changes between current version |
---|---|
N/A | |
N/A | |
N/A | |
N/A | |
N/A | |
N/A | |
N/A | |
N/A |