Authored by Thomas Rasch

o Try resetting the images on-screen position instead of removing all tiles

... ... @@ -75,6 +75,7 @@
- (void)removeTile:(RMTile)tile;
- (void)removeAllTiles;
- (void)resetTiles;
- (void)setTileSource:(id <RMTileSource>)newTileSource;
- (void)setTileCache:(RMTileCache *)newTileCache;
... ...
... ... @@ -149,6 +149,18 @@
[imagesLock unlock];
}
- (void)resetTiles
{
[imagesLock lock];
for (RMTileImage *tileImage in images)
{
[tileImage setScreenLocation:CGRectZero];
}
[imagesLock unlock];
}
- (void)setTileSource:(id <RMTileSource>)newTileSource
{
[self removeAllTiles];
... ... @@ -579,7 +591,7 @@
- (void)removeTilesOutsideOf:(RMTileRect)rect
{
uint32_t minX, maxX, minY, maxY, span;
short currentZoom = rect.origin.tile.zoom;
volatile short currentZoom = rect.origin.tile.zoom;
RMTile wrappedTile;
id <RMMercatorToTileProjection> mercatorToTileProjection = [tileSource mercatorToTileProjection];
... ... @@ -645,7 +657,6 @@
if (x >= zoomedMinX || x <= zoomedMaxX)
continue;
}
}
// if haven't continued, tile is outside of rect
... ...
... ... @@ -67,7 +67,8 @@
- (void)clearLoadedBounds
{
loadedBounds = CGRectZero;
[[content imagesOnScreen] removeAllTiles];
// [[content imagesOnScreen] removeAllTiles];
[[content imagesOnScreen] resetTiles];
}
- (BOOL)screenIsLoaded
... ...