Leaflet.TileLayer.PouchDBCached icon indicating copy to clipboard operation
Leaflet.TileLayer.PouchDBCached copied to clipboard

How to make it work with projected maps.

Open arenol opened this issue 5 years ago • 2 comments

I have downloaded your demo and have made it work, with a couple of corrections. But when I try to implement it in my own project, it doesn't.

One possible source of the problem is that my map is in UTM. Then I don't know what to submit as bounding box parameter to the layer.seed() method. Is it still longitudes / latitudes, or is it the projected coordinates? Whatever I try to do, nothing happens when I call the layer.seed() method.

arenol avatar May 18 '20 09:05 arenol

OK. It works wih projected maps, my error was that I misspelled useCache in my options, so it ended up beeing false. Nevertheless I had to find a bounding box in latitudes and longitudes. And eventueally I also figured out wath the other options were doing. But I eventually ran into the problem when my application is trying to cache a tile that is not existing, and there is a comment "/// FIXME: Do something on tile error!!" in the code that confirms that this is a problem unsolved.

arenol avatar Jun 25 '20 14:06 arenol

Hi arenol,

sry for responding so late... my job is keeping my quite busy at the moment.

The error handling for non existing tiles could be a lot better, that is true, but that is nothing that "confirms" the problem... ...it is just not handling errors in a good way (a.k.a the code ignores the error) :-)

What happens on loading empty tiles exactly in your case? Can you provide more details. In any case, I am pretty sure that a PR is more than welcome :-)

nikolauskrismer avatar Jun 25 '20 19:06 nikolauskrismer