Thanks Simon,
3 years later ... this still works !
Thanks Simon, it works. I'm still using the 3.12 API version. Inserted it at the start of my "require" first function.
This is a "hack" in the API, so I cannot guarantee that this is still compatible with latest version of the API.
You should place this in your javascript as soon as possible after once the esri.layers package is loaded.
Regards,
Hi Simon Uyttendaele
Can you advise where to add this code?
if( typeof esri.layers.Layer.prototype._errorHandler == 'function' ) { esri.layers.Layer.prototype._errorHandler = function(error) { if( error && error.message && error.message == "xhr cancelled" ) return; this.onError(error); } dojo.config.deferredOnError = function(e){} dojo._ioSetArgs2 = dojo._ioSetArgs; dojo._ioSetArgs = function(_14,_15,_16,_17) { return dojo._ioSetArgs2(_14,_15,_16,function(a,b){return a;}); } }
If you cancel the XHR, the error callback will be triggered, think about it if you handle errors with a �??try again�?� mechanism, since you may reschedule a canceled request
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.