Select to view content in your preferred language

Wait Until AGSFeatureLayer loaded successfully

710
2
Jump to solution
08-03-2012 05:56 AM
SpencerV
Deactivated User
We are attempting to create an AGSGraphicsLayer from the graphics contained in an AGSFeatureLayer. However, the AGSFeatureLayer seems to take awhile to load and even though the loaded value returns YES, the graphics array of the AGSFeatureLayer still returns size 0 and seems to take a while longer to load. Is there a way to wait until the graphics array of the AGSFeatureLayer loads? There are graphics in the feature layer and they do appear on the map but seem to take awhile to load.

Thanks!
0 Kudos
1 Solution

Accepted Solutions
RickJones
Deactivated User
If no other option exists, you can always use a timer.

[self performSelector:@selector(doGraphicsStuff) withObject:nil afterDelay:5]; // run method after second delay

View solution in original post

0 Kudos
2 Replies
RickJones
Deactivated User
If no other option exists, you can always use a timer.

[self performSelector:@selector(doGraphicsStuff) withObject:nil afterDelay:5]; // run method after second delay
0 Kudos
SpencerV
Deactivated User
Thanks, that seems to work well.
0 Kudos