tolerate 404 tiles #4

tmcw opened this Issue Sep 19, 2013 · 6 comments


None yet
4 participants

tmcw commented Sep 19, 2013

No description provided.

Just a comment, as I ran into this problem. I added something like:

im.onerror = function(e) {
     = "";

into loadTile(). But, you are going to end up with an incomplete image/missing tiles. For my use case, I have periodic tiles and the 404 errors were related to indices going out of bounds, without wrapping. So I manually added a periodic wrap to tilePoint.x and tilePoint.y in tiles.forEach(). Pretty hacky but it works.

nibua-r commented Jun 30, 2014

A good solution consists in using the leaflet errorTileUrl, no?

nibua-r commented Jun 30, 2014

OK, it works just fine using:

im.onerror = function(e) { = layer.options.errorTileUrl;

This works as long as errorTileUrl has been defined…

nibua-r commented Jun 30, 2014

Do you accept pull request on this one?


tmcw commented Jun 30, 2014

Yep. would need to be something that would work whether or not errorTileUrl is defined though.

i have same problem and i insert im.onerror and always error like this:
GET http://host/maps/tiles_PSK/7/71/38.png?cache=1415952554127 404 (Not Found)

may be need more insert?

tmcw closed this Jun 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment