I'm currently set up as follows:

A large wetlands polygon dataset is stored in an arcgis.com account as a feature service (~395,000 polygons).

I'm using the Esri-leaflet javascript library in conjunction with leaflet to dynamically load polygons into my map by querying using the map bounds and limiting by zoom level (in order to avoid exceeding the feature limit). I set a minimum zoom level of 14 this purpose.

When I use a smaller dataset that is also stored on arcgis.com (~17,000 features) it works flawlessly but when I switch the URL to the larger dataset (~395,000) features it returns an empty dataset.

Here is a snippet of the working code with the "small" dataset test:

var wwi = L.esri.featureLayer("http://services.arcgis.com/F7DSX1DSNSiWmOqh/arcgis/rest/services/WAWFA_Small_test/FeatureServer/0",{
    precision: 4,
    style: function(feature){
        return {
            color: layerColorRamp(feature.properties,'wetlands','SP'),
            weight: 1.5,
            opacity: 1,
            fillOpacity: 0.7
    simplifyFactor: 0.3,
    minZoom: 14

The large dataset uses this url: http://services.arcgis.com/F7DSX1DSNSiWmOqh/arcgis/rest/services/WAWFA_Large_test/FeatureServer/0

but should otherwise be identical. When I look at the network tab of Chrome's web tools, I see that the actual REST query looks like this:


which produces a working geojson output but when I switch the prefix to http://services.arcgis.com/F7DSX1DSNSiWmOqh/arcgis/rest/services/WAWFA_Large_test/FeatureServer/0/ for the larger dataset I get an output like this:

{ "type": "FeatureCollection", 
  "crs": { "type":"name", 
           "properties": { "name": "EPSG:4326" }
  "features":[] }

Any ideas on why this might be happening and whether there is a way to address this?

1 Answer 1


The small dataset isn't a subset of the larger dataset. I plotted the extents of each: http://jsbin.com/hekafo/edit?html,output

enter image description here

Most the features in the small dataset are in a different area.

  • Thank you! I'm not the database administrator and I had been told it was a statewide dataset. Glad it's not an issue with my code. Dec 14, 2015 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.