Reference a json url in ArcGIS Online

4135
11
01-05-2018 01:45 PM
BrandonPrice
Occasional Contributor

I would like to reference this https://data.lacity.org/resource/4iim-t2y2.json  in my web map. Can someone guide on how this is done?

https://community.esri.com/community/developers/web-developers/arcgis-online-developers

0 Kudos
11 Replies
by Anonymous User
Not applicable

Can you expand on this? Do you want all features to point to that? Or is there separate JSON for each item?

0 Kudos
BrandonPrice
Occasional Contributor

All features. I got it from this website: https://data.lacity.org/A-Livable-and-Sustainable-City/Storm-Drain-System/pjh9-xwfn/data by selecting export, SODA API, and copying the API endpoint. Is this possible to add to ArcGIS Online? I couldn’t do it using any of the standard ways in a web map.

0 Kudos
by Anonymous User
Not applicable

If you want to have the raw JSON, you can always make custom pop-ups and point to this URL : https://data.lacity.org/api/views/4iim-t2y2/rows.json

If you're looking to selectively parse the JSON for each feature, you'll need to write some custom code (python will do the trick). 

Another option is to download this as a CSV, add it to your AGOL organization and point it to that URL.

Am I understanding your request properly? You just want users to be able to get to that json URL from the web map in some way? If so, custom pop-ups is the way to go

0 Kudos
BrandonPrice
Occasional Contributor

Hi Andrew,

I actually want to just display the layers attached to this json in my own web map. Specifically these layers: https://data.lacity.org/A-Livable-and-Sustainable-City/Storm-Drain-System/pjh9-xwfn/data

Brandon

0 Kudos
BrandonPrice
Occasional Contributor

Is that possible or even harder? Than the popup?

0 Kudos
by Anonymous User
Not applicable

Oh! And is this data constantly changing or would a static copy suffice?

0 Kudos
BrandonPrice
Occasional Contributor

Static would be in the worst case. I would preferably have it streaming in case it changes. I would guess the changes are not often.

0 Kudos
by Anonymous User
Not applicable

If it's static, you can download the GeoJSON from the site and then import that as a hosted item into you content. Then, from there, you can add it to your map as an item. That will be static, however. 

I'll do a little digging for dynamism, but that is a temporary solution

BrandonPrice
Occasional Contributor

Sounds good. Thanks for the help. I will try on my end too.

0 Kudos