Provide latitude and logitude of the given place.
Params | Data type | Descriptions |
place maxRows | string int | place , eg: 'mumbai' number of result at time, eg: 6 |
{
"geonames":[
{
"place_name":"Mumbai",
"latitude":19.07283,
"longitude":"72.88261",
"timezone_id":"Asia/Kolkata",
"country_code":"IN"
},
{
"place_name":"Navi Mumbai",
"latitude":19.03681,
"longitude":"73.01582",
"timezone_id":"Asia/Kolkata",
"country_code":"IN"
}
]
}
var api = 'geo_details';
var userId = '<Your User Id>';
var apiKey = '<Your Api Key>';
var data = {
place: "mumbai",
maxRows: 6,
};
var request = $.ajax({
url: "https://json.astrologyapi.com/v1/"+api,
method: "POST",
dataType:'json',
headers: {
"authorization": "Basic " + btoa(userId+":"+apiKey),
"Content-Type":'application/json'
},
data:JSON.stringify(data)
});
request.then( function(resp){
console.log(resp);
}, function(err){
console.log(err);
});