Map Kotlin Extensions
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:2.4738")
To apply an operation on the TomtomMap:
inline fun MapFragment.applyOnTomtomMap(noinline block: TomtomMap.() -> Unit) {
getAsyncMap(block)
}
To take advantage of coroutines:
suspend inline fun MapFragment.getTomtomMap(): TomtomMap = suspendCoroutine { cont ->
val callback = OnMapReadyCallback { tomtomMap -> cont.resume(tomtomMap) }
getAsyncMap(callback)
}
API Reference
Older versions | Changes between current version |
---|---|
N/A |
|
N/A |
|
N/A |
|
N/A |