Skip to content

Instantly share code, notes, and snippets.

@maptastik
Last active August 3, 2022 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maptastik/9be749cb768beb1f97baaa173bcec029 to your computer and use it in GitHub Desktop.
Save maptastik/9be749cb768beb1f97baaa173bcec029 to your computer and use it in GitHub Desktop.
Loading ArcGIS Service & GeoJSON

Loading ArcGIS Service & GeoJSON

This block demos a few things:

  1. Loading basemaps of Scott County, KY created in ArcGIS and served from ArcGIS Server using Esri-Leaflet. The amount of dialog boxes one has to go through to style features in ArcGIS makes the styling process a bit clunky, but it's possible to create a nice basemap in ArcGIS. The layer switcher shows two. The first one is based on OpenMapSurfer's style. The second is based on Stamen's Toner.
  2. Loading external GeoJSON data with D3. I had never used this method before until I came across Ian Johnson's tutorial series "Working with spatial data for the web". In the past I've used leaflet-ajax. It has worked well for me, but I like the idea of having D3 at my disposal and not having to load another library. Furthermore, while I do appreciate Calvin Metcalf's work on leaflet-ajax, D3 has a larger community contributing to it so I'm tempted to move to D3 for loading data.

Built with blockbuilder.org

Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment