1

I'm trying to get a list of the recent earthquakes, with latitude and longitude from this API: https://apps.pdc.org/msf/rest/services/global/pdc_active_hazards/MapServer/6

I can't rely on a server-side library as I have to use only JavaScript in an HTML page.

My problem is that I can't find the list of the events browsing the API

2

Here's the documentation page you're probably looking for, and as an example:

  • to get all the data you'll want to set WHERE parameter to 1=1
  • to get all the data attribute columns set outFields to *
  • to set the geometry spatial reference to lat/lng, you'll want outSR set to 4326
  • if you'd like JSON set the format to pjson or json

So all of the above parameters, in one request, would look like:

https://apps.pdc.org/msf/rest/services/global/pdc_active_hazards/MapServer/6/query?where=1=1&outFields=*&outSR=4326&f=pjson

.. and should give you all the data.

  • Thanks a lot! I was going crazy through the whole Esri documentation! – Giox Apr 13 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.