I am using ESRI Leaflet to load an ESRI rest service layer. I am counting the number of features that it loads in my pointToLayer function and displaying that number to the screen when the layer fires the load event. The number is different every time. Also, the number gets smaller if I set the initial view extent to a higher number. So it appears that ESRI Leaflet is only loading the features within the current extent, plus some padding.
However, it does not always load ALL of the features within the initial view. Sometimes some features are missing and when I refresh, they appear again. I have more than 1,000 features in my Rest service, but there would never be that many in the initial view that I set.
I am thus wondering:
- Why does ESRI Leaflet load a different number of features even when I don't change the initial view?
- Why does it not always load ALL of the features in the initial view?
- Is there anything that I can do about this?