changed google tile regex

This commit is contained in:
Philipp Schaefer 2013-12-21 17:33:53 +01:00
parent 3e5124022d
commit eed11120da
2 changed files with 3 additions and 2 deletions

View File

@ -285,7 +285,8 @@ public class IITC_WebViewClient extends WebViewClient {
@Override
public WebResourceResponse shouldInterceptRequest(final WebView view,
String url) {
if (url.matches(".*tile.*jpg") || url.matches(".*tile.*png") || url.matches(".*mts.*googleapis.*")) {
// if any tiles are requested, handle it with IITC_TileManager
if (url.matches(".*tile.*jpg") || url.matches(".*tile.*png") || url.matches(".*mts.*googleapis.*smartmaps")) {
try {
return mTileManager.getTile(url);
} catch (Exception e) {

View File

@ -39,8 +39,8 @@ public class DownloadTile extends AsyncTask<String, Void, Boolean> {
conn = tileUrl.openConnection();
InputStream is = null;
is = conn.getInputStream();
Log.d("iitcm", "writing to path: " + mFilePath);
File file = new File(mFilePath, mFileName);
Log.d("iitcm", "writing to file: " + file.toString());
File output = writeTileToFile(is, file, mFilePath);
} catch (IOException e) {
e.printStackTrace();