[OpenLayers-Users] _attempts counter (of tile image) never seems
to be reset?
Andreas Hocevar
ahocevar at opengeo.org
Thu Dec 8 18:43:29 EST 2011
Are you using OpenLayers 2.11 or older? If so, you should try the latest
from github, because the tile loading code was rewritten after 2.11 and
this issue should be fixed.
Andreas.
On Dec 9, 2011 12:04 AM, "michaeladamkatz" <michaeladamkatz at yahoo.com>
wrote:
> I am using a local tile server to serve XYZ tiles. (I'm actually using the
> tiles for an overlay layer, not a basemap layer, but I don't think that is
> relevant.)
>
> I would sometimes get missing tiles -- grid spots on the map where a tile
> should be drawn but wasn't. After adding some diagnostic logs in certain
> places in Image.js and Util.js, it seems to be simply a matter that the
> _attempts variable that gets attached to the tiles imgDiv never gets reset.
> I see that only about 28 total tile objects are ever created, and this pool
> of tiles is recycled as I zoom and pan around the map. Once in a while, by
> a
> combination of quick panning and zooming (especially several quick pans
> followed immediately by a sequence of three or four very quick zooms in or
> out), I can get an image load to fail, triggering the
> OpenLayers.Util.onImageLoadError() function. I have
> OpenLayers.IMAGE_RELOAD_ATTEMPTS set to 3. It appears that in general each
> load only fails once or twice. But since _attempts never gets reset, it
> keeps accumulating, so after several tile objects have two or three
> failures
> it is easy to get one more and have the tile not draw. So obviously the
> problem gets worse as a given session goes on.
>
> So it seems like the simple fix is just to reset _attempts to zero once
> there is a successful load. But I just wanted to check if that makes sense,
> since it seems like such a blatant error that maybe there's something I'm
> not understanding.
>
> Thanks for any help.
>
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/attempts-counter-of-tile-image-never-seems-to-be-reset-tp7076265p7076265.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111209/8ca38c77/attachment-0001.html
More information about the Users
mailing list