[OpenLayers-Users] How to abort a loading of tiles and generate a new request?

Eric Lemoine eric.c2c at gmail.com
Thu Nov 29 15:02:43 EST 2007


On Nov 28, 2007 4:11 AM, Stephen Woodbridge <woodbri at swoodbridge.com> wrote:
> Hi all,
>
> I have a situation where we load a generic index.html page and it starts
> loading tiles for some generic map center and scale. While this is
> happening we generate a GeoIP request via an AJAX request. This request
> might fail, in which case we just want the original tiles to load, but
> more often than not it succeeds and we want to abort the current set of
> tiles that are loading and request and new center and zoom scale. This
> all works just fine except the second zoom request apprears to have to
> wait for the tiles of the first to finish loading.
>
> Shouldn't a new request, abandon or abort a previous request that is
> incomplete? Is this supposed to be happening already?

Tiles are <img> nodes and to my knowledge there's no way to abort an
HTTP request resulting from an <img>. If someone knows a way, I'm
interested... In particular to cancel the loading of tiles when
switching (too) quickly between zoom levels...

Cherers,
--
Eric



More information about the Users mailing list