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

Vince
20.5k16 gold badges49 silver badges65 bronze badges
asked Apr 13, 2019 at 10:02

1 Answer 1

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.

answered Apr 13, 2019 at 16:43
1
  • Thanks a lot! I was going crazy through the whole Esri documentation! Commented Apr 13, 2019 at 17:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.