I have an osmdroid map, and i want to load offline tiles from either MOBAC's osmdroid zip or gemf file. I looked into it and everywhere i go it says just put it in sdcard/osmdroid. But it doesnt work, do i need to change something in the code?
public class Map extends Activity {
private IMapView mMapView;
private static IMapController mMapController;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
mMapView = (MapView) findViewById(R.id.mapview);
((MapView) mMapView).setBuiltInZoomControls(true);
mMapController = mMapView.getController();
mMapController.setZoom(13);
GeoPoint geoPecs = new GeoPoint(46.070833,18.233056);
mMapController.setCenter(geoPecs);
mProvider = new MapTileProviderBasic(getApplicationContext());
mCustomTileSource = new XYTileSource("Turaterkep", null, 13, 15, 256, ".png", "http://users.atw.hu/perzsa/map/Turaterkep/");
mProvider.setTileSource(mCustomTileSource);
mTilesOverlay = new TilesOverlay(mProvider,this.getBaseContext());
mMapView.getOverlays().add(mTilesOverlay);
update: I managed to load the tiles from online with the samples included to osmdroid, i updated the code as well, i guess i have to start with this sample, maybe i can load from localhost? ill check back
picture: http://i.stack.imgur.com/CoZT1.png