Select to view content in your preferred language

New GeoJSON Capabilities for Developers

12-10-2014 04:47 PM
Occasional Contributor III
6 6 13.1K

There’s a lot of cool things available with the December release of ArcGIS Online, but if you are a dev, here’s something you are not going to want to miss: The enhanced interop (data) support for GeoJSON!  At this release, you can now import, export and access data from ArcGIS Online hosted feature services via GeoJSON.

Here’s what you can do:

  1. Import GeoJSON: Using the Add Item button you can simply import GeoJSON to create a new ArcGIS Online hosted feature service.

  1. Export GeoJSON: For all feature services, you can also export features out as GeoJSON.
  2. Access Directly:  And lastly, you can access all hosted feature services as GeoJSON simply by adding the f=geojson query parameter.  You can even change the outSR if you happen to need the GeoJSON in a different spatial reference.

Accessing GeoJSON from a Feature Services

Accessing GeoJSON from other Applications

View it live

<!DOCTYPE html>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=1024, user-scalable=no">
      html { height: 100% }
      body { height: 100%; margin: 0; padding: 0;}
      #map{ height: 100% }
    <link rel="stylesheet" href="" />
<!--[if lte IE 8]>
    <link rel="stylesheet" href="" />

  <script src=""></script>
  <script type="text/javascript" src=""></script>
    <title>Leaflet AJAX</title>
    <div id="map"></div>

    <script type="text/javascript">
      var m ='map').setView([45.52, -122.6819], 13);
      var osmDataAttr = 'Map data &copy; <a href="">OpenStreetMap</a> contributors';
      var osm = L.tileLayer("http://{s}{z}/{x}/{y}.png",{attribution:osmDataAttr});

      var geojson = new L.GeoJSON.AJAX("", {});


NOTE:  Special thanks to Calvin Metcalf's L.GeoJSON.AJAX plug-in ‌that gives you direct access GeoJSON resources.

So there you have it.  But what about ArcGIS Server?  Well, the team says it’s coming soon, so keep your eyes peeled!

Happy interoping!

About the Author
Esri Geo Developer