In the current Leaflet version a 'tileerror' event is triggered in case any of the source servers with layer data can not deliver tiles being requested. In regular tile layers we handle these events and need to be able to do the same for utfgrid layers.
Changes:
add support for 'tileerror' event of Leaflet (yet undocumented but will be added, see https://github.com/Leaflet/Leaflet/issues/2756) by implementing error callbacks for Ajax and JSONP loading variants (JSONP: timeout only)
apply the configured request timeout to both loading methods instead of only JSONP (using request timeout rather than window.setTimeout for the ajax case)
_process_request: register timeout handler only after .callback() has been called, to avoid unnecessary window.setTimeout when _finish_request is called in callback()
extract a few anonymous functions to member functions to improve readability
I'd be happy if you consider this to be integrated into master.
In the current Leaflet version a 'tileerror' event is triggered in case any of the source servers with layer data can not deliver tiles being requested. In regular tile layers we handle these events and need to be able to do the same for utfgrid layers.
Changes:
I'd be happy if you consider this to be integrated into master.
Thanks for Leaflet.utfgrid and happy coding :-)