Look up elevation for multiple coordinates
client.elevation.batch(ElevationBatchParams { coordinates, format } params, RequestOptionsoptions?): ElevationBatchResult { features, type }
POST/api/v1/elevation/batch
Look up elevation for multiple coordinates
import Plaza from '@plazafyi/sdk';
const client = new Plaza({
apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted
});
const elevationBatchResult = await client.elevation.batch({
coordinates: [
{ lat: 48.8566, lng: 2.3522 },
{ lat: 45.764, lng: 4.8357 },
],
});
console.log(elevationBatchResult.features);{
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"elevation_m": 35.2
},
"type": "Feature"
}
],
"type": "FeatureCollection"
}Returns Examples
{
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"elevation_m": 35.2
},
"type": "Feature"
}
],
"type": "FeatureCollection"
}