0

The requirement is to track a list of Earthquakes after the user inputs the City name. I'm able to successfully send the City (and state + country etc.) name to the Google Maps API of GeoCoding (https://developers.google.com/maps/documentation/geocoding/start) and get the latitude and longitude. But the issue is, the webservice, which gives the Earthquake data (http://www.geonames.org/export/JSON-webservices.html#earthquakesJSON) accepts only 4 values as REST API parameters, which are North, South, East and West (http://api.geonames.org/earthquakesJSON?north=44.1&south=-9.9&east=-22.4&west=55.2&username=demo). So my question is: Is there a way to convert Latitude and longitude into N, S, E and W values of is there a way to receive N, S, E and W values form the Google maps API?

5
  • The api documentation for the earthquakes json mentions that it will look for earthquakes within a bounding box. This may be a crazy idea but what happens if you supply it with the latitude(north) and longitude (east), and latitude+ 1 (south) and longitude +1 for west. I don't have acces to the api so i can't test it.
    – Kasper
    Commented Sep 16, 2017 at 23:06
  • Check it here:- api.geonames.org/… Commented Sep 17, 2017 at 2:48
  • I can't get it to work either. It seems to work with longitude and latitude coordinates though. I did come across this API from the US government. The documentation is a easier to understand, and it has more options. Maybe that will work for you? earthquake.usgs.gov/fdsnws/event/1
    – Kasper
    Commented Sep 17, 2017 at 17:16
  • The geonames bounding box doesn't seem to work very well. I manually put in a NZ box but got results well out of range. api.geonames.org/… Commented Sep 18, 2017 at 0:14
  • @DanielBallinger I had the same issue.
    – Kasper
    Commented Sep 18, 2017 at 12:49

0

You must log in to answer this question.

Browse other questions tagged .