changed google tile regex
This commit is contained in:
parent
3e5124022d
commit
eed11120da
@ -285,7 +285,8 @@ public class IITC_WebViewClient extends WebViewClient {
|
|||||||
@Override
|
@Override
|
||||||
public WebResourceResponse shouldInterceptRequest(final WebView view,
|
public WebResourceResponse shouldInterceptRequest(final WebView view,
|
||||||
String url) {
|
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 {
|
try {
|
||||||
return mTileManager.getTile(url);
|
return mTileManager.getTile(url);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -39,8 +39,8 @@ public class DownloadTile extends AsyncTask<String, Void, Boolean> {
|
|||||||
conn = tileUrl.openConnection();
|
conn = tileUrl.openConnection();
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
is = conn.getInputStream();
|
is = conn.getInputStream();
|
||||||
Log.d("iitcm", "writing to path: " + mFilePath);
|
|
||||||
File file = new File(mFilePath, mFileName);
|
File file = new File(mFilePath, mFileName);
|
||||||
|
Log.d("iitcm", "writing to file: " + file.toString());
|
||||||
File output = writeTileToFile(is, file, mFilePath);
|
File output = writeTileToFile(is, file, mFilePath);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user