From f4c38432f113372d0ae6892cb67f687c8fd8e555 Mon Sep 17 00:00:00 2001 From: adbenitez Date: Fri, 22 Jul 2022 16:18:08 -0400 Subject: [PATCH 1/2] update org.maplibre.gl to version 9.5.2 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 15b658c1fa..44f0cc3469 100644 --- a/build.gradle +++ b/build.gradle @@ -66,7 +66,7 @@ dependencies { } implementation 'com.annimon:stream:1.1.8' // brings future java streams api to SDK Version < 24 implementation 'com.codewaves.stickyheadergrid:stickyheadergrid:0.9.4' // glues the current time segment text in the gallery to the top. - implementation ('org.maplibre.gl:android-sdk:9.4.0') { + implementation ('org.maplibre.gl:android-sdk:9.5.2') { exclude group: 'com.google.android.gms' } From 3e7460b64acda88abf73bdec5fc5c6fa59cb15be Mon Sep 17 00:00:00 2001 From: adbenitez Date: Fri, 22 Jul 2022 17:19:03 -0400 Subject: [PATCH 2/2] update to new maplibre API --- src/org/thoughtcrime/securesms/map/MapActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/map/MapActivity.java b/src/org/thoughtcrime/securesms/map/MapActivity.java index 163fea86b9..f588f52a6e 100644 --- a/src/org/thoughtcrime/securesms/map/MapActivity.java +++ b/src/org/thoughtcrime/securesms/map/MapActivity.java @@ -26,6 +26,7 @@ import com.google.android.material.bottomsheet.BottomSheetBehavior; import com.mapbox.geojson.Feature; import com.mapbox.mapboxsdk.Mapbox; +import com.mapbox.mapboxsdk.WellKnownTileServer; import com.mapbox.mapboxsdk.camera.CameraPosition; import com.mapbox.mapboxsdk.camera.CameraUpdateFactory; import com.mapbox.mapboxsdk.geometry.LatLng; @@ -68,7 +69,7 @@ public class MapActivity extends BaseActivity implements Observer, public static void lazyMapboxInit(Context context) { try { - Mapbox.getInstance(context, BuildConfig.MAP_ACCESS_TOKEN); + Mapbox.getInstance(context, BuildConfig.MAP_ACCESS_TOKEN, WellKnownTileServer.Mapbox); // disable telemetry. these functions are currently partly redundant, // however, implementations may change @@ -111,7 +112,7 @@ protected void onCreate(Bundle savedInstanceState) { mapFragment = (DCMapFragment) getSupportFragmentManager().findFragmentByTag(MAP_TAG); } - mapFragment.getMapAsync(mapboxMap -> mapboxMap.setStyle(Style.MAPBOX_STREETS, style -> { + mapFragment.getMapAsync(mapboxMap -> mapboxMap.setStyle(Style.getPredefinedStyle("Streets"), style -> { this.mapboxMap = mapboxMap; this.markerViewManager = new MarkerViewManager(mapFragment.getMapView(), mapboxMap);