CSVLayerView - maximumNumberOfFeatures not supported - Filtering scope too limited

415
1
04-11-2019 12:43 PM
ChrisSmith7
Frequent Contributor

Looking over the documentation for CSVLayerView, I see there is a property maximumNumberOfFeatures:

maximumNumberOfFeatures Number
Since: ArcGIS API for JavaScript 4.10

The maximum number of features that can be displayed at a time. This setting currently only applies to SceneView. By default, the maximum number of features is estimated automatically depending on the symbology, geometry complexity, memory consumption and display quality profile.

Changing this setting to a higher value may lead to a significant decrease in performance and increase in memory usage.

The way this reads, it only applies to SceneView and not a 2D MapView. I can confirm the JSAPI throws console errors if you attempt to set it. The problem with this is, I believe filter is only scrapping top xx records. When I apply something similar to:

Snippet

lv.filter = {    where: "col_field like '%" + val+ "%'"};

...the matching results are unexpectedly low, and it more-or-less matches top xx in the CSV. Is there a plan to allow the maximumNumberOfFeatures property in a future release? Am I understanding the limitation correctly, and is there a performant workaround? In my usecase, we are filtering as users are typing into an input box...

0 Kudos
1 Reply
UndralBatsukh
Esri Regular Contributor

Hi there, 

I may not have understood the question correctly. I think you are saying that filter in 2D is not displaying everything it should for csvLayer. maximNumberOfFeatures does apply to 3D only. MapView displays all points for csvLayer so there is no need to set this value. With that said, how many records does the csv have? Is it possible to get a reproducible case? If not, some kind of code or screenshot would be helpful.

Thanks,

0 Kudos