0
votes

I have the longitude/latitude coordinates of a place. How do I call the below webservice with parameters: north,south,east,west. Any ideas? Thanks!

Recent Earthquakes
Webservice Type : REST
Url : api.geonames.org/earthquakesJSON?
Parameters : north,south,east,west : coordinates of bounding box
callback : name of javascript function (optional parameter)
date : date of earthquakes 'yyyy-MM-dd', optional parameter, earthquakes older or equal the given date sorted by date,magnitude
minMagnitude : minimal magnitude, optional parameter
maxRows : maximal number of rows returned (default = 10)

Result : returns a list of earthquakes, ordered by magnitude

Example http://api.geonames.org/earthquakesJSON?north=44.1&south=-9.9&east=-22.4&west=55.2&username=demo
1

1 Answers

0
votes

You can't use ajax for getting pages not in your domain. Either you proxy the request on your own server (be careful with that, allow only explicit whitelisted domains), or you have to use JSONP if the webservice supports that.