REST Endpoint GeoJSON Demo

JSON, or Javascript Object Notation, has long been a common format for modern web applications using AJAX methodologies to dynamically display data. Recent years have seen an extension of this format into geography, called GeoJSON, providing web developers with a lightweight, open format that is easily parsed by Javascript and shown on simple maps. The format proved so popular that Google Maps began supporting it in 2014, and now with ArcGIS Online (AGOL) REST endpoints, you can request GeoJSON from Esri services to get the same thing. If you're working with an Esri-flavored endpoint that is NOT on AGOL, you can leverage open Javascript libraries such as this one from Terraformer to convert their original version of JSON-with-geometry to GeoJSON.

Below we take this in a few directions. First, we found an ArcGIS.com-hosted dataset from Detroit called Public Libraries. Then, with some help from Lyzi Diamond and a plugin from Calvin Metcalf, we add that dataset with a query of the layer, setting the output format to GeoJSON. (You'll only find this format in the HTML query form if it's available - currently only in ArcGIS.com-hosted data.)