Alpstein/route-me — pull request #139 by mwxwidmann (2014-02-19 13:53:01+00:00)
Title: Fix for partial caching of layered web tiles

This change fixes an issue we had with composit web tiles. We are using OpenSeaMap tiles as a layer above OpenStreetMap tiles. If for whatever reason one of the layer images could not be loaded but the other images was loaded, the partial image (e.g. containing only the transparent OpenSeaMap layer) ended up in the route me cache and the full composit image was not requested again. To prevent this I've added a counter that is increased whenever a layer image is loaded. This counter is checked against the number of URLs. If the number of loaded layer images is smaller than the number of URLs, the composit image is not cached.
This is my first pull request ever, so I'm sorry if I've done something wrong. Please let me know.

Cheers & thanks for the great work you have done with your route-me fork.