Get feature by type and ID
elements().retrieve(ElementRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : GeoJsonFeature
GET/api/v1/features/{type}/{id}
Get feature by type and ID
package com.plazafyi.example
import com.plazafyi.client.PlazaClient
import com.plazafyi.client.okhttp.PlazaOkHttpClient
import com.plazafyi.models.GeoJsonFeature
import com.plazafyi.models.elements.ElementRetrieveParams
fun main() {
val client: PlazaClient = PlazaOkHttpClient.fromEnv()
val params: ElementRetrieveParams = ElementRetrieveParams.builder()
.type("type")
.id(0L)
.build()
val geoJsonFeature: GeoJsonFeature = client.elements().retrieve(params)
}{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"@id": "bar",
"@type": "bar",
"amenity": "bar",
"cuisine": "bar",
"name": "bar"
},
"type": "Feature",
"id": "node/21154906"
}Returns Examples
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"@id": "bar",
"@type": "bar",
"amenity": "bar",
"cuisine": "bar",
"name": "bar"
},
"type": "Feature",
"id": "node/21154906"
}