Are there any clear instructions available how to use an offline OpenStreetMap in B4A? I only need a small area of the UK.
Not sure how to download the map data I need and how to process and store it.
Currently I am using OSMDroid (4.1) with different map data, but I am unable to get up to data map data with this now.
RBS
Are there any clear instructions available how to use an offline OpenStreetMap in B4A? I only need a small area of the UK.
Not sure how to download the map data I need and how to process and store it.
Currently I am using OSMDroid (4.1) with different map data, but I am unable to get up to data map data with this now.
RBS
Got this all worked out now and for in case somebody needs it these are the steps to make a mbtiles SQLite file of the required area of OpenStreetMap:
1. Download and install Maperitive:
http://maperitive.net/
2. Start Maperitive by running the .exe
3. Tools, Add Web map, OSM Mapnik
4. Move to the required area on the map
5. Right-click the map and do Place geometry bounds
6. Drag the margins to the required area
7. Right-click and do Dump this position
8. Map (in the menu) and do Download OSM data
9. Copy this (alter as required) and paste to the command prompt box at the bottom:
generate-mbtiles bitmap-type=png exclude-partial=false file=Mapnik.mbtiles map-name=Mapnik maxzoom=19 minzoom=12 subpixel=2
Not sure about the subpixel argument, the default 1 might be fine.
10. Click in the command prompt box and hit the Return key
The generated SQLite file will be dumped to the Maperitive folder.
11. The table tiles in the generated SQLite file as no index and this is needed to avoid the tiles being loaded very slowly.
One single compound index involving all fields except the data blob field will do eg:
CREATE UNIQUE INDEX idx_tiles_zoom_level_tile_column_tile_row on tiles(zoom_level, tile_column, tile_row)
Load the SQLite file in whatever SQLite editor you use and create the above index.
The Maperitive interface is confusing and it took me some time to work the above out, hence the post to maybe avoid somebody having the same trouble.
RBS