Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong tiles after map source change #183

Open
ManuelRiegler opened this issue Jul 20, 2012 · 2 comments
Open

Wrong tiles after map source change #183

ManuelRiegler opened this issue Jul 20, 2012 · 2 comments

Comments

@ManuelRiegler
Copy link

If you change the RMMapContents' tile source at runtime it happens that tiles from the "old" tile source are displayed and it ends up in a "wonderful" map tile mix. It looks like that the problem is somewhere at the DB (sql) cache, cause tiles are stored to the wrong DB cache.

There have been already discussions, but since that the problem still exists:
#2
http://www.mailinglistarchive.com/route-me-map@googlegroups.com/msg00403.html

removeAllCachedTiles is not really an option and [[NSURLCache sharedURLCache] removeAllCachedResponses] right before tile source change made it better, but does not fix the problem.

@vyskocil
Copy link
Member

Yes this bug is still there, if I remember well the culprit is the iOS NSURLrequest cache not being cleared.
A workaround is to use something like that after changing the tile source :

// workaround to update display
[self.tilesView moveBy:CGSizeMake(640,960)];
[self.tilesView moveBy:CGSizeMake(-640,-960)]; 

@ManuelRiegler
Copy link
Author

the problem is that somehow tiles are stored into the wrong DB. once stored in the wrong DB, a view "refresh", like the above workaround does not help.

I put some log output into "-(RMTileImage *) tileImage: (RMTile) tile" method in the RMCachedTileSource class to see which tileSource is called and to which DB the tiles are stored. I made map changes like Alpstein -> OCM -> GoogleMap -> GoogleSatellite ...always correct unit GoogleSatellite!! at GoogleSatellite the tiles were first stored correctly to its corresponding DB, but right after the tile source changed "MAGICALLY" to Alpstein and stored the tiles also in this DB!

I really dont know why!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants