Hi all, is it possible to get a FeatureLayer to limit features that are displayed on the map to just the current map extent that I'm viewing?
My featureLayer has roughly 280K features covering the entire county. I've restricted the scale at which the features show, so you have to be zoomed into a small area before they load. When the features are displayed it's loading all 280k features onto the map which can take 1-2 mins. Once all features are loaded, it's fine and you can zoom around the map and select features with no issue, however that's not what I require. I'd like it to just load on the area I'm viewing and hopefully that will vastly improve the initial performance.
This map is going to be customer facing and will be used to log an issue against a feature via the popup. With the current initial load time it would be unacceptable for use.
I've seen something called queryExtent but I'm not sure how I would implement it?
Thanks
Ricky
Solved! Go to Solution.
You may find the solution to this here.
You may find the solution to this here.
Hi Joel
Thank you so much for the link which lead me to the solution. Following the advice I've applied the following to the beginning of my code:
<script>
var dojoConfig = {
has: {
"featurelayer-snapshot-enabled": 0,
}
};
</script>
All I can say is wow what a difference in performance! The features now load in my view in the blink of an eye rather than an agonising wait whilst it loaded data for the whole county!
Thanks again, Ricky.