Outdooractive / route-me

Open source map library for iOS
Other
122 stars 400 forks source link

Layerd web tile partial cache fix #138

Closed kaiwidmann closed 10 years ago

kaiwidmann commented 10 years ago

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 image 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.

kaiwidmann commented 10 years ago

I've closed this because I think it should go to the develop branch, not the release branch. Still learning, sorry.