requestPoiDetails

Synchronously, provides POI details by a given POI identifier.

Return

The Result containing a PoiDetailsResponse if the call succeeds, or a SearchFailure if it fails.

Example of a POI details request:

val poiDetailsOptions = PoiDetailsOptions(
poiId = PoiId(searchResultId.id, Source.Online)
)
val response = search.requestPoiDetails(poiDetailsOptions)
if (response.isSuccess()) {
val result: PoiDetailsResponse = response.value()
Log.d("tag", "POI details: ${result.poiDetails}")
} else {
val failure: SearchFailure = response.failure()
Log.e("tag", failure.message)
}

Parameters

options

The object containing the properties to fetch POI details.


open override fun requestPoiDetails(options: PoiDetailsOptions, callback: PoiDetailsCallback): Cancellable

Asynchronously, provides POI details by a given POI identifier.

Return

A cancellable operation.

Example of a POI details request:

val poiDetailsOptions = PoiDetailsOptions(
poiId = PoiId(searchResultId.id, Source.Online)
)
val response = search.requestPoiDetails(poiDetailsOptions, object : PoiDetailsCallback {
override fun onSuccess(result: PoiDetailsResponse) {
Log.d("tag", "POI details: ${result.poiDetails}")
}
override fun onFailure(failure: SearchFailure) {
Log.e("tag", failure.message)
}
})

Parameters

options

The object containing the properties to fetch POI details.

callback

The PoiDetailsCallback invoked when the fetch operation has finished, either successfully or with an error. The callback is executed on the main thread.