Select to view content in your preferred language

FeatureLayer Load Timeout

331
0
01-22-2013 06:51 AM
KarenRobine
Frequent Contributor
Is there an event I can run after a certain amount of time if the Feature Layer hasn't completed loading?

I have map.addLayer(fLayer)
Then,
dojo.connect(fLayer, "onUpdateEnd", function(evt) {
HideProgressIndicator();
});
dojo.connect(fLayer, "onUpdateStart", function(evt) {
ShowProgressIndicator();
});


But in some cases, my Feature Layer takes a long time to update so I basically want to execute HideProgressIndicator() if the layer hasn't completed loading within certain amount of time.
There's setTimeout(function() {
HideProgressIndicator();
}, 2000);
but the indicator will still stay on till onUpdateEnd occurs..

Karen
0 Kudos
0 Replies