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)?
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
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?