A small JavaScript library that provides easy interface to use Barikoi API's
Include Barikoi in your page:
<script src="https://cdn.jsdelivr.net/gh/barikoi/barikoi-js/dist/barikoi.js?key:YOUR_API_KEY"></script>
This method performs location search using Barikoi Search API. It accepts two arguments a query string and a callback function and returns an array of locations
// Search for 'cafe'
Bkoi.search('cafe', function(response){
console.log(response) //gets a location array
})
This method performs location search using Barikoi Reverse Geocode API. It accepts three arguments a longitude, a latitude and a callback function and returns a Place object containing place information
// Get Reverse Geo Address
Bkoi.reverseGeo(90.36668110638857, 23.83723803415923, function (response) {
console.log(response)
})
This method performs location search using Barikoi Nearby API. It accepts three arguments a longitude, a latitude and a callback function and returns an array of nearby locations
// Get Nearby Locations
Bkoi.reverseGeo(90.36668110638857, 23.83723803415923, function (response) {
console.log(response)
})