Get Area Name from Latitude and Longitude
Example code is provided for both JavaScript , along with a response schema.
Route Schema (URL)
https://api.pewds.vercel.app/foodpanda/areaname/{latitude}/{longitude}path Parameters.
| Parameter | Type | Description | Required? | Default |
|---|---|---|---|---|
| latitude | string | Latitude of selected location. | Yes | N/A |
| longitude | string | Longitude of selected location. | Yes | N/A |
Request Samples
import axios from "axios";
// Example request using no paramters
const url = "https://api.pewds.vercel.app/foodpanda/areaname/23.783782/90.368677";
const data = async () => {
try {
const { data } = await axios.get(url);
return data;
} catch (err) {
throw new Error(err.message);
}
};
console.log(data);Response Schema
MIME Type: application/json
[
{
"total": string,
"items": [
{
},
{
}
]
}
]