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
1 Answer 1
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 to1=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 to4326
- if you'd like JSON set the
format
topjson
orjson
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– Giox2019年04月13日 17:06:49 +00:00Commented Apr 13, 2019 at 17:06
Explore related questions
See similar questions with these tags.