Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use f=geojson if possible for FeatureLayer #418

Merged
merged 6 commits into from
Dec 26, 2014

Conversation

patrickarlt
Copy link
Contributor

This updates L.esri.Tasks.Query (and subsequently anything that uses it) to request GeoJSON by default if the service is hosted in ArcGIS Online (URL has .arcgis.com).

This has a few advantages over the current methods of converting geometries client side

  • Although largely mitigated edge cases discovered in Simplifying Complex Polygons #320 with simplifying geometries can no longer occur since geometries will be simplified server side BEFORE being converted to GeoJSON. These issues were a result of trying to convert simplified geometries on the client.
  • Shaves a few milliseconds off every set of requests, not a huge deal but still good.

Unfortunately there is a bug in the f=geojson implementation where multipolygon features are not being returned properly.

esri-leaflet_dev_working_

As you can see holes in polygons are not being returned inside the polygon but rather as another polygon which makes some things appear twice.

Once this is fixed I'll merge this in so it can get released.

@jgravois
Copy link
Contributor

👯

@patrickarlt
Copy link
Contributor Author

This should be patched tonight and once tests pass this can be merged.

@patrickarlt
Copy link
Contributor Author

This is fixed in production, now the tests just have to pass.

patrickarlt added a commit that referenced this pull request Dec 26, 2014
Use f=geojson if possible for FeatureLayer
@patrickarlt patrickarlt merged commit 865bbac into Esri:master Dec 26, 2014
jgravois pushed a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
Use f=geojson if possible for FeatureLayer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants