I have a custom MKTileOverlay in my iOS project using MapKit, it works fine most of the time. However, after zooming in/out a few times and panning the map some of the tiles are not being drawn.
At first I thought it was a simple case of tiles not being loaded so I subclassed the MKTileOverlay and added logging in the console. It showed that all tiles were loaded perfectly fine and delivered to the result block.
As I was running out of ideas I created a local tile generator that just returns images with their path x/y/z and frame drawn to see what tiles are missing.
Unfortunately the problem persists even with locally generated tiles so it has nothing to do with Internet connectivity. Another weird behaviour is that if I have two custom overlays on top of one another, it will be exactly the same tiles that are not being rendered on both overlays.
The only solution I can think of right now is subclassing the tile renderer and making sure that everything is displayed as there is no way to know that the tile is not rendered. This, however, sounds like a lot of work and a "reinventing the wheel" kinda task...