Open GoogleCodeExporter opened 8 years ago
as extra information that I forgot (and I'm not sure if it makes a difference),
I am using an mbtiles file as the source for the xytilesource
Original comment by jpetti...@gmail.com
on 1 Dec 2011 at 10:51
After some more research I am not sure the problem is necessarily related
directly to xytilesource. As I am completely lost as to what is causing it now,
here is the code i use to set up the map
ResourceProxy mResourceProxy = new DefaultResourceProxyImpl(getApplicationContext());
SimpleRegisterReceiver simpleReceiver = new SimpleRegisterReceiver(this);
File f = new File("path to mbtiles file");
XYTileSource MBTILESRENDER = new XYTileSource(
"mbtiles",
ResourceProxy.string.offline_mode,
minZoom, maxZoom, // zoom min/max
256, ".png", "http://i.dont.care.org/");
IArchiveFile[] files = { CustomMBTilesFileArchive.getDatabaseFileArchive(f) }; //custommbtilesfilearchive is just my fix for issue 254 (linked after code) since that has not been built into the jar yet
MapTileModuleProviderBase moduleProvider = new MapTileFileArchiveProvider(simpleReceiver, MBTILESRENDER, files);
mProvider = new MapTileProviderArray(MBTILESRENDER, null, new MapTileModuleProviderBase[]{ moduleProvider });
this.mOsmv = new MapView(this, 256, mResourceProxy, mProvider);
http://code.google.com/p/osmdroid/issues/detail?id=254
Original comment by jpetti...@gmail.com
on 1 Dec 2011 at 11:22
calling mProvider.clearTileCache() in the onStop seems to be a workaround for
this issue
@Override
protected void onStop()
{
mProvider.clearTileCache();
super.onStop();
}
Original comment by jpetti...@gmail.com
on 1 Dec 2011 at 11:35
See also issue 228.
Original comment by neilboyd
on 2 Dec 2011 at 8:12
comment 3 seems to be doing the trick for me...is there a better solution?
Original comment by christop...@gmail.com
on 26 Jun 2012 at 7:10
Original issue reported on code.google.com by
jpetti...@gmail.com
on 1 Dec 2011 at 10:45