GeoJSON URL Query

166
4
Jump to solution
05-31-2022 09:31 AM
JoshBillings
Occasional Contributor

Hey all,

I need a GeoJSON URL of this layer with a query for the boundary of Winston-Salem only.

There is a GeoJSON URL for the entire feature service available (under API resources on the right) but I'm unsure as to how to use the "query?outFields=" in the URL to bring back Winston-Salem specifically.

Can anyone help?

Thanks!

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

If you look at the REST API page for the Corporate Limits layer (ID:0) (Layer: Corporate Limits (ID:0) (arcgis.com)), you will see MUNICIPALITY uses coded values.  For Winston-Salem, that would be 'WS'.  So you want a where clause of:

MUNICIPALITY='WS'

View solution in original post

0 Kudos
4 Replies
JoshuaBixby
MVP Esteemed Contributor

If you look at the REST API page for the Corporate Limits layer (ID:0) (Layer: Corporate Limits (ID:0) (arcgis.com)), you will see MUNICIPALITY uses coded values.  For Winston-Salem, that would be 'WS'.  So you want a where clause of:

MUNICIPALITY='WS'
0 Kudos
JoshBillings
Occasional Contributor

Thanks Josh. I tried the URL below but it didn't work. I'm sure the formatting after "where=" is wrong. What can I do to correct it?

https://services1.arcgis.com/5Yf8nIJWE7cxpd3N/arcgis/rest/services/Corporate_Limits_Hosted/FeatureSe...

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Can you elaborate on "didn't work?"  I just clicked on the hyperlink, and it opened a window with results I would expect.

0 Kudos
JoshBillings
Occasional Contributor

I was testing the link by adding it to a web map. Got a message that said "unable to display filter" but I think it's because it's a GeoJSON URL. The feature showed up fine in the map. I think it's working fine, that just confused me. Thank you for your help!

JoshuaBillings_0-1654019284569.png

 

0 Kudos