Reverse Geocode
ReverseGeocode:
Get reverse geocode data by providing latitude and longitude.
import { setConfig, reverseGeocode} from "barikoiapis";
reverseGeocode({ latitude: 23.810331, longitude: 90.412521 })
.then((response) => {
console.log(response);
})
.catch((err) => {
console.log(err);
});
This API initially returns:
id
, distance_within_meters
, address
, area
, city
.
Optional Parameters:
You can customize the reverse geocoding request by including additional optional parameters. Here's an example of how to use optional parameters:district (Optional): Specify the district for the response. Example:
import { setConfig, reverseGeocode} from "barikoiapis";
reverseGeocode({ latitude: 23.810331, longitude: 90.412521, district: true })
.then((response) => {
console.log(response);
})
.catch((err) => {
console.log(err);
});