Esri/esri-leaflet — pull request #418 by patrickarlt (2014-12-14 07:10:47+00:00)
Title: Use f=geojson if possible for FeatureLayer

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 https://github.com/Esri/esri-leaflet/issues/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_](https://cloud.githubusercontent.com/assets/378557/5426719/03e87b26-831d-11e4-9066-d9bc851efbe6.png)

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.