I use the feature Layer definitionExpression property, and it is working.
But I want to limit the number of features the feature layer will load or display.
Is there a way to that in JS or it has to done it arcgis pro(before publishing the layer)?
Hi there,
The maxRecordCount property needs to be set at the time of feature service publishing: https://developers.arcgis.com/rest/services-reference/enterprise/feature-service.htm
If you are using Query class to query features from your FeatureLayer then use the Query.num property to specify the number of features to retrieve: https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html#num
but the property maxRecordCount determines the number of features returned from a query, I just want to limit to number of features displayed from the layer at all times.
am I worng?