I am developing an application in which I want to show fictional planes flying from and to airports. This may not be the only thing I want to imagine when flying through a map.
To do this, I used a sample code from LocationReminders (a subclass of MKOverlayPathView that they have, ReminderCircleView) and linked it to MKOverlay of my own plane view. This class subscribes to KVO notifications about the coordinates and radius properties of the overlay class and invalidates it every time there is an update.
Overlay updates its position with a few frames per second, and I also update its radius so that I can simulate the perspective (not very smart, considering it as a model object, but still the best solution I found).
I use a simple circle for testing.
This setting is working fine. The overlay view is updated and behaves correctly, scaling along with the map and everyone.
The problem is that in a simulated flight, the overlay will not be drawn over some plates, usually near the destination. The circle seems to look like these tiles.
I was able to understand one thing about this problem: whenever I observe that a circle is not drawn over any tile, if I zoom out, the circle will be drawn correctly. Zooming or panning does not solve anything.
My theory is that some fragments (or their rectangles) are not marked for redrawing, and therefore, only with the help of scaling can I do this. But still I think this is not consistent with the fact that scaling does not help.
I donโt know that I am doing something wrong or am in error or something like that. Instead, I used annotations, and it worked, but with that I lose the ability to represent a plane that becomes smaller if you zoom out without observing the zoom scale itself.
I tested in versions 5.1, 6.0 and 6.1, and the behavior is the same.