The best solution is to package these rendered tiles into a tile archive created by
Mobile Atlas Creator(MOBAC).
Another link here:
MobileAtlasCreator - osmdroid - How to use Mobile Atlas Creator. - OpenStreetMap-Tools for Android - Google Project Hosting.
MOBAC can be configured to create a tile archive from various sources.
You need to read the MOBAC FAQs:
Mobile Atlas Creator - FAQ and consult the MOBAC
README file.
You can configure MOBAC to create a tile archive from a directory of tiles on your PC or from a tool that serves tiles over an HTTP connection.
Can you 'mapnik-rendering tool' serve tiles over HTTP (just as a standard tile server does)?
If so then here's an example config file that, along with the readme file, should help you configure MOBAC:
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
<name>amd1055t-ubuntu</name>
<minZoom>0</minZoom>
<maxZoom>18</maxZoom>
<tileType>png</tileType>
<tileUpdate>IfNoneMatch</tileUpdate>
<url>http://amd1055t-ubuntu/osm/{$z}/{$x}/{$y}.png</url>
<backgroundColor>#000000</backgroundColor>
</customMapSource>
Here amd1055t-ubuntu is a virtual machine running apache/mapnik and renderd (the standard OSM tile server package).
I have that XML file saved as amd1055t-ubuntu.xml in my MOBAC
mapsources directory.
When i run MOBAC i can select this custom tile source - it's listed along with all the others in MOBAC.
Now i can draw a rectangle on the map, select the zoom levels i want to include in the tile archive and hit the GO button.
Time for a coffee and once it's complete i have a tile archive all ready for use in OSMDroid.
There's a tutorial to use a tile archive in OSMDroid here:
http://www.b4x.com/forum/basic4andr...smdroid-mapview-b4a-tutorial-2.html#post92702.
Something similar can be done to use a directory of tiles as a MOBAC source (that is file based not HTTP based access), take a look here:
Mobile Atlas Creator - Readme.
This isn't something i hav done so can't provide an example.
Either method should i hope work for you.
A tile archive is a more efficient use of external memory - a single tile archive will take far less space than a directory with hundreds or thousands of tiles.
Martin.