AnsweredAssumed Answered

Confusion over lack of features displayed from 'new FeatureLayer'

Question asked by peterlen on Sep 5, 2017
Latest reply on Sep 6, 2017 by peterlen

The services that I will be referring to are not public-facing, so I am hoping I can explain it properly.  I am loading a feature class via a MapServer service in the following manner:
var layer = new FeatureLayer(url, { mode: Featurelayer.MODE_ONDEMAND });;
When this happens, the polygon features are displayed on my map.  Because it is listed with the MODE_ONDEMAND, only the polygon features within the viewport are listed in the layer's "graphics" array and displayed on the map.  The service has a maxRecordCount of 1000, but depending on the map extent, there may be more than 1000 features displayed.  My understanding is the maxRecordCount is used for query responses, which is not really what is going on in this example.

I have another feature class via a MapServer service (points) that also has a maxRecordCount of 1000 and also has a relationship table (a non-spatial audit table).  When I create a new FeatureLayer for this service with the same definition type, I find that I am only getting 1000 features back even though there are about 9000 total features.  When I try to load the non-spatial relationship table using the "new FeatureLayer", I again am only getting 1000 items even though that table has many more objects.

I am trying to find out why the one service is populating the one FeatureLayer with more features than the maxRecordCount, while the other services (one for the other feature class and one for the relationship table) are only populating the FeatureLayer with an amount equal to the maxRecordCount.  As a note, there are no restrictions on the services that are only returning the an amount equal to the maxRecordCount, such as having to be at a certain zoom level before features are displayed.

I am hoping that somone can point me in the right direction.  I can't find anything in particular in the service metadata that might indicate something.  The only thing that is different is that I don't own the data for the service that is displaying more features than the maxRecordCount but do own the other service.  I am wondering if there is some service setting that I am not seeing.  Again, I am not doing any type of query (such as layer.queryFeatures). 

Thanks for any insight - Peter