From 2a70ba9d56a78ceffba8c732804d769550726760 Mon Sep 17 00:00:00 2001 From: Tobias Zwick Date: Thu, 8 Mar 2018 21:08:44 +0100 Subject: [PATCH] Revert "update tangram to 0.9.0" This reverts commit fcdf04edfea301ae2a5b3a500777c39f84b9c86a. --- app/build.gradle | 2 +- .../streetcomplete/tangram/TileHttpHandler.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8a2f60a405..ba96d1d80b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -122,7 +122,7 @@ dependencies { implementation 'com.esotericsoftware:kryo:4.0.1' // map and location - implementation 'com.mapzen.tangram:tangram:0.9.0' + implementation 'com.mapzen.tangram:tangram:0.8.1' implementation 'com.mapzen.android:lost:3.0.4' // config files diff --git a/app/src/main/java/de/westnordost/streetcomplete/tangram/TileHttpHandler.java b/app/src/main/java/de/westnordost/streetcomplete/tangram/TileHttpHandler.java index c377617362..1d0adc9f65 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/tangram/TileHttpHandler.java +++ b/app/src/main/java/de/westnordost/streetcomplete/tangram/TileHttpHandler.java @@ -21,8 +21,14 @@ public TileHttpHandler(String apiKey, File directory, long maxSize) this.apiKey = apiKey; } - public void onRequest(String url, Callback cb, long requestHandle) { + public boolean onRequest(String url, Callback cb) { if(url != null) url += "?api_key=" + apiKey; - super.onRequest(url, cb, requestHandle); + return super.onRequest(url, cb); } + + public void onCancel(String url) { + if(url != null) url += "?api_key=" + apiKey; + super.onCancel(url); + } + }