Here's a demo of 2 ways to add GeoJSON to a Leaflet web map: http://codepen.io/pmckinney/pen/mELyNY
I know there is also the Leaflet-AJAX plugin.
And if you're interested in converting a shapefile or feature class to GeoJSON, check out the City of Philadelphia's ArcToolbox.
Does anyone know why the output of the ArcGIS Desktop JSON conversion tool does not work in Leaflet? I've always wondered what was going on with this.
output from ArcMap's 'Features to JSON' tool won't work because its not GeoJSON, its Esri's own Geoservices JSON.
http://desktop.arcgis.com/en/arcmap/10.3/tools/conversion-toolbox/features-to-json.htm
in ArcGIS Pro, we've added an optional parameter to the tool for generating GeoJSON
http://pro.arcgis.com/en/pro-app/tool-reference/conversion/features-to-json.htm
ArcGIS REST API - Feature JSON documentation
http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Feature_object/02r3000000n8000000/
GeoJSON and Esri JSON side by side
When I export geojson in wgs84 or not using this tool. It is not usable in Leaflet.
The coordinates are not in a format usable by Leaflet. How do I get them to the correct format?
Example:
{
"type" : "FeatureCollection",
"crs" : {
"type" : "name",
"properties" : {
"name" : "EPSG:4326"
}
},
"features" : [
{
"type" : "Feature",
"id" : 1,
"geometry" : {
"type" : "Polygon",
"coordinates" : [
[
[
-10915535.083699999,
3895736.6819000021
],
[
-10915557.3475,
3895736.6819000021
WGS84 coordinates are always:
180 > X > -180 (longitude)
90 > Y > -90 (latitude).
Your feature collection looks to be mislabeled Web Mercator northings and eastings.
That is how Pro created the GEO JSON. Even though it says it is supposed to be WGS84, it is Web Mercator. Ended up projecting the feature class to WGS84 and then telling it to use the original SR. I think this might be a bug or something in Pro.
Paul Brown, while I can't speak to what's going on with ArcGIS Pro, you could check out the Arc Open Tool to convert shapefiles/feature classes to GeoJSON using ArcGIS Desktop (ArcMap/Catalog). Maybe you can use this tool while you await resolution with the ArcGIS Pro stuff?
I reproed the error you're reporting in ArcGIS Pro 2.2.2 and forwarded on the report to the appropriate team. Sorry for the inconvenience.