diff options
author | Peng Liu <peng.liu@mapbox.com> | 2019-09-12 13:56:29 +0300 |
---|---|---|
committer | Peng Liu <peng.liu@mapbox.com> | 2019-09-19 11:52:49 +0300 |
commit | c7f0081be04797228a6d4bb7b2afb3f9dfadeee7 (patch) | |
tree | 68e4829d3c7840b18e9e3824033b64a4a6843b2c | |
parent | 80e8d7a2fcb9f75e585bb7dd26c2f2a893b6f560 (diff) | |
download | qtlocation-mapboxgl-c7f0081be04797228a6d4bb7b2afb3f9dfadeee7.tar.gz |
[android] Add debug info.
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AttributionDialogManager.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AttributionDialogManager.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AttributionDialogManager.java index 4f523948da..7ab7513c48 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AttributionDialogManager.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AttributionDialogManager.java @@ -18,6 +18,7 @@ import com.mapbox.mapboxsdk.R; import com.mapbox.mapboxsdk.attribution.Attribution; import com.mapbox.mapboxsdk.attribution.AttributionParser; import com.mapbox.mapboxsdk.camera.CameraPosition; +import com.mapbox.mapboxsdk.log.Logger; import com.mapbox.mapboxsdk.style.sources.Source; import java.lang.ref.WeakReference; @@ -141,9 +142,24 @@ public class AttributionDialogManager implements View.OnClickListener, DialogInt private void showMapFeedbackWebPage(int which) { Attribution[] attributions = attributionSet.toArray(new Attribution[attributionSet.size()]); String url = attributions[which].getUrl(); - if (url.contains(MAP_FEEDBACK_URL)) { + Logger.w("AttributionManager", "url:" + url); + + Logger.w("AttributionManager", "camera position:" + mapboxMap.getCameraPosition().toString()); + Logger.w("AttributionManager", "token:" + Mapbox.getAccessToken()); + Logger.w("AttributionManager", "owner:" + Mapbox.getSkuToken()); + Logger.w("AttributionManager", "package name:" + context.getPackageName()); + mapboxMap.getStyle(new Style.OnStyleLoaded() { + @Override + public void onStyleLoaded(@NonNull Style style) { + String styleUri = style.getUri(); + + Logger.w("AttributionManager", "id:" + style.getUri()); + } + }); + url = buildMapFeedbackMapUrl(mapboxMap.getCameraPosition()); - } + + Logger.w("AttributionManager", "final url to show:" + url); showWebPage(url); } @@ -192,7 +208,8 @@ public class AttributionDialogManager implements View.OnClickListener, DialogInt for (Source source : mapboxMap.getStyle().getSources()) { attribution = source.getAttribution(); if (!attribution.isEmpty()) { - attributions.add(source.getAttribution()); + Logger.w("AttributionManager", "add attribution:" + source.getAttribution()); + attributions.add(attribution); } } } |