I’d appreciate help to learn how one would load and visualize data served out via ArcGIS JavaScript REST service.
The layer I am interested in is here:
And when I click on the ‘View in ArcGIS JavaScript’ link, I am directed to a view of the map.
Looking at the map as ‘view source’, the data source appears (layerURL) to be nearly identical to the viewport URL (just without the trailing ?f=jsapi
). However the ?f=jsapi
seems to matter, as the content of the different URLs is quite different.
Trying a simple d3.json()
returns SyntaxError: Unexpected token < in JSON at position 0
.
Here’s a notebook showing the error:
I’d be happy for help and guidance. Just trying to figure out where to link into the hosted data confuses me. I expect that–even after loading the data–I’d have several more steps to get it to render in a similar way as to how they show it from the hosting site (different colors, etc). It would be really nice if someone could help show how this is accomplished. I’d especially enjoy learning how one does this with Leaflet.
Hope to hear from you!