I've tried to contribute code on the issue tracker online, but none of
my patches have been integrated into the main branch. Is there
anything I can do to try to get my code accepted? This patch in
particular is important, as it fixes a crashing bug:
http://code.google.com/p/route-me/issues/detail?id=31
Will MacKay
This sounds to me like it is maybe a cache problem. The current
functionality if the SQL cache does not work correctly in all
circumstances. Since you are using your phone and the simulator in
different patterns, they have different contents in the SQL cache.
I am not certain if this is what you are experiencing, but you have to
keep it in mind.
For instance, if you tell the map contents to change map sources,
sometimes it will update the on screen tiles, sometimes it won't. It is
different from phone to phone. I was experiencing this problem
frequently, and then it stopped for my phone, however when I sent out a
test build the tester complained that he was changing map sources and
the results on his phone did not update.
There is also no way to disable the database cache as-is in the code,
which I think is an issue. You can set the size to anything, but if you
set to 0 then the cache decides it is infinite. I would suggest allowing
for a -1 size in the config file to be a disable flag if not having a
disable flag explicit.
This replacement in RMTileCache.m will allow you to compile in or out
support for the SQL database, and that can let you quickly see if any
display issues are due to the dirty cache not being cleared. Note this
will cause a log message in your console about the database being unable
to start.
This is a debugging patch, this is not a functionality patch. I would
make the suggested changes for functionality:
1. add a database enabled flag to the config file to turn on or turn off
the cache completely
2. I would add an instance variable to the abstract superclass for map
tile sources that indicates whether or not the database cache should be
enabled for this map source... default is YES. Some licensed sources
have in their agreements that you may not cache the tiles, and this
would be the smart way of allowing implementors to specify caching
behavior on a per source basis...
3. I would have the TileCache check with the map source to check caching
properties, so that when a new tile source is taken in the cache will
configure itself correctly
4. I would fix the bug so that when the tile source is changed, the
cache correctly interprets this as a complete wipe/dirty of itself and
empties
Alternatively the cache should tag cached tiles not only for location
but for tile source so if someone is using multiple tile sources
flipping back and forth (i.e. a satellite view to a map view) that both
can reside happily in the cache without overwriting each other (as
currently seems to happen).
- darcy
// override to check if the database is on, if it is not, this returns
// nil which should prevent any further attempts to use it
#define DATABASE_ENABLED 1
- (id<RMTileCache>) newDatabaseCacheWithConfig: (NSDictionary*) cfg
tileSource: (id<RMTileSource>) theTileSource
{
if (DATABASE_ENABLED) {
return [super newDatabaseCacheWithConfig:cfg tileSource:theTileSource];
} else {
return nil;
<loading-bug.png>
>
> What happened to this patch? Anyone still working on it/should there
> be a branch made for this code?
I tried (not very hard) to apply this patch a couple of weeks ago a
and couldn't get it to go. I didn't have a good sense of what it was
doing or what it was supposed to look like, so moved it to my "too
hard" box. If someone wants to take another stab at it in a branch
that would be grand.
Hal