diff --git a/app/src/main/java/net/osmtracker/activity/DisplayTrackMap.java b/app/src/main/java/net/osmtracker/activity/DisplayTrackMap.java index 4e9f559d1..d0390b914 100644 --- a/app/src/main/java/net/osmtracker/activity/DisplayTrackMap.java +++ b/app/src/main/java/net/osmtracker/activity/DisplayTrackMap.java @@ -218,26 +218,27 @@ public void onClick(View v) { public void selectTileSource() { String mapTile = prefs.getString(OSMTracker.Preferences.KEY_UI_MAP_TILE, OSMTracker.Preferences.VAL_UI_MAP_TILE_MAPNIK); Log.e("TileMapName active", mapTile); - osmView.setTileSource(selectMapTile(mapTile)); + //osmView.setTileSource(selectMapTile(mapTile)); + osmView.setTileSource(TileSourceFactory.DEFAULT_TILE_SOURCE); } - /** - * Returns a ITileSource for the map according to the selected mapTile - * String. The default is mapnik. - * - * @param mapTile String that is the name of the tile provider - * @return ITileSource with the selected Tile-Source - */ - private ITileSource selectMapTile(String mapTile) { - try { - Field f = TileSourceFactory.class.getField(mapTile); - return (ITileSource) f.get(null); - } catch (Exception e) { - Log.e(TAG, "Invalid tile source '"+mapTile+"'", e); - Log.e(TAG, "Default tile source selected: '" + TileSourceFactory.DEFAULT_TILE_SOURCE.name() +"'"); - return TileSourceFactory.DEFAULT_TILE_SOURCE; - } - } +// /** +// * Returns a ITileSource for the map according to the selected mapTile +// * String. The default is mapnik. +// * +// * @param mapTile String that is the name of the tile provider +// * @return ITileSource with the selected Tile-Source +// */ +// private ITileSource selectMapTile(String mapTile) { +// try { +// Field f = TileSourceFactory.class.getField(mapTile); +// return (ITileSource) f.get(null); +// } catch (Exception e) { +// Log.e(TAG, "Invalid tile source '"+mapTile+"'", e); +// Log.e(TAG, "Default tile source selected: '" + TileSourceFactory.DEFAULT_TILE_SOURCE.name() +"'"); +// return TileSourceFactory.DEFAULT_TILE_SOURCE; +// } +// } @Override diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index c21577f83..cfa5790f3 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -98,13 +98,13 @@ android:title="@string/prefs_displaytrack_osm" android:summary="@string/prefs_displaytrack_osm_summary" android:defaultValue="false" /> - + android:defaultValue="MAPNIK" />-->