requestGeometryData
Performs a synchronous geometry data request described by the provided GeometryDataOptions object. Delivers the Result containing a GeometryDataResponse, or a SearchFailure if the action fails.
Return
The Result containing a GeometryDataResponse if the call succeeds, or a SearchFailure if it fails. Note that geometry data is available only for the online search.
Example of a geometry data request:
val geometryDataOptions = GeometryDataOptions(
geometryIds = listOf(GeometryId(id = "geometry-id"))
)
val response = search.requestGeometryData(geometryDataOptions)
if (response.isSuccess()) {
val result: GeometryDataResponse = response.value()
Log.d("tag", "Geometry data: ${result.geometries}")
} else {
val failure: SearchFailure = response.failure()
Log.e("tag", failure.message)
}
Parameters
The object which contains search properties for the given search request.
Performs an asynchronous geometry data request described by the provided GeometryDataOptions object. Returns the result using the provided GeometryDataCallback.
Parameters
The object which contains properties for the given search request.
The GeometryDataCallback invoked when the search operation has finished, either successfully or with an error. The callback is executed on the main thread. Note that geometry data is available only for the online search.
Example of a geometry data request:
val geometryDataOptions = GeometryDataOptions(
geometryIds = listOf(GeometryId(id = "geometry-id"))
)
val response = search.requestGeometryData(geometryDataOptions, object : GeometryDataCallback {
override fun onSuccess(result: GeometryDataResponse) {
Log.d("tag", "Geometry data: ${result.geometries}")
}
override fun onFailure(failure: SearchFailure) {
Log.e("tag", failure.message)
}
})