How to display more than 1000 features

3323
5
Jump to solution
04-15-2015 03:51 AM
LoaiFarajallah
New Contributor III

As you know there is a limit on the maximum number of features you can show on a map, is there a way to go beyond this limit?

query = new Query();
fl=FeatureLayer.SELECTION_NEW;

allCarolinaCounties = new FeatureLayer("http://server.url/MapServer/0", {
      mode: FeatureLayer.MODE_ONDEMAND,
     outFields: ["field1", "field2", "field3"]
});
allCarolinaCounties.setDefinitionExpression("field4='value'");

c
allCarolinaCounties.setSelectionSymbol(highlightSymbol);


map.addLayer(fl);
map.addLayer(allCarolinaCounties);

// then in another place
function showPop(){
     var pop=$("#tpop").val();
     query.where="field1 = '"+pop+"'";
     allCarolinaCounties.clearSelection();
     allCarolinaCounties.selectFeatures(query, fl, function(features){ /*do nothing*/ });
} // showPop
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Hi Loai,

The maximum number of records returned will be controlled by the service.  You can adjust this in the service properties.  Ex:

screen1.png

View solution in original post

5 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Loai,

The maximum number of records returned will be controlled by the service.  You can adjust this in the service properties.  Ex:

screen1.png

LoaiFarajallah
New Contributor III

Thank you very much!

0 Kudos
AlLewandowski1
Occasional Contributor III

How do you access the <Properties> of a service?

0 Kudos
JakeSkinner
Esri Esteemed Contributor

Right-click on the service in the Catalog window > Service Properties.

GeorgeReece_Jr_
New Contributor III

This is so awesome.  More than 1,000 features!!! YES!!!!