Select to view content in your preferred language

Features don't show up until map is panned or zoomed

979
3
Jump to solution
03-15-2014 04:28 PM
JimWharton
Occasional Contributor
I'm loading a featureLayer using MODE_ONDEMAND. I've implemented a system where the previous extent of a map is stored in localStorage so the next time a user returns to a map, they're already in the right place, the moment they open the map. The only problem is, if the extent and location matches the default extent specified by the service, none of the features show up.

I can pan the map just a bit, and they draw. How do I force them to show up on initial display of the map?

Thanks,
-Jim
0 Kudos
1 Solution

Accepted Solutions
Noah-Sager
Esri Regular Contributor
Hi Jim,

I haven't encountered this use case before, but can you make use of the refresh or redraw methods of the featureLayer class upon initial display?

-Noah

View solution in original post

0 Kudos
3 Replies
Noah-Sager
Esri Regular Contributor
Hi Jim,

I haven't encountered this use case before, but can you make use of the refresh or redraw methods of the featureLayer class upon initial display?

-Noah
0 Kudos
JimWharton
Occasional Contributor
Wow, I have no idea how I overlooked that in the API docs....

Thank you!
0 Kudos
Noah-Sager
Esri Regular Contributor
No worries, glad that helped!
0 Kudos