I've downloaded map tiles from http://tile.openstreetmap.org. What I want to do is use this map tiles with google map Library. I've followed the this links
- How to show google map offline?
- Google Map Offline
- TileProvider using local tiles
And have working map activity.
Here is CustomTileProvider class
public class CustomTileProvider implements TileProvider{
public Tile getTile(int x, int y, int zoom) {
Log.e("TAG","Get tile image");
byte[] image = readTileImage(x, y, zoom);
}
}
The problem I'm currently facing is when I uninstall the app and install, and run whithout internet connect the getTile method never been called. Can any body know why this is happening?
Edit:
I've stored the downloaded tiles inside assets folder with the following file structure
/map
/zoom/
/x
/y