Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
Release 4.2.0-beta.4 (#170)
Browse files Browse the repository at this point in the history
* minor changes to match website examples

* fixes retrofit memory leak on device rotation

* gets rid of unused import

* bumped version to beta.4

* added missing file back
  • Loading branch information
Cameron Mace authored Oct 25, 2016
1 parent e36c97c commit 67dd094
Show file tree
Hide file tree
Showing 24 changed files with 43 additions and 28 deletions.
10 changes: 5 additions & 5 deletions MapboxAndroidDemo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 25
versionCode 31
versionName "4.2.0-beta.3"
versionCode 32
versionName "4.2.0-beta.4"
}

buildTypes {
Expand All @@ -25,7 +25,7 @@ android {

repositories {
maven { url "https://jitpack.io" }
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
// maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
}

dependencies {
Expand All @@ -39,8 +39,8 @@ dependencies {
compile 'com.squareup.picasso:picasso:2.5.2'

// Mapbox dependencies
// compile('com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.0-beta.3@aar') {
compile('com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.0-SNAPSHOT@aar') {
// compile('com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.0-SNAPSHOT@aar') {
compile('com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.0-beta.4@aar') {
transitive = true
}
compile('com.mapbox.mapboxsdk:mapbox-android-services:1.3.1@aar') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

public class DrawGeojsonLineActivity extends AppCompatActivity implements OnMapReadyCallback {

private static final String TAG = "MainActivity";
private static final String TAG = "DrawGeojsonLineActivity";

private MapView mapView;
private MapboxMap mapboxMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class DirectionsActivity extends AppCompatActivity {
private MapView mapView;
private MapboxMap map;
private DirectionsRoute currentRoute;
private MapboxDirections client;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -85,7 +86,7 @@ public void onMapReady(MapboxMap mapboxMap) {

private void getRoute(Position origin, Position destination) throws ServicesException {

MapboxDirections client = new MapboxDirections.Builder()
client = new MapboxDirections.Builder()
.setOrigin(origin)
.setDestination(destination)
.setProfile(DirectionsCriteria.PROFILE_CYCLING)
Expand Down Expand Up @@ -164,6 +165,10 @@ protected void onSaveInstanceState(Bundle outState) {
@Override
protected void onDestroy() {
super.onDestroy();
// Cancel the directions API request
if (client != null) {
client.cancelCall();
}
mapView.onDestroy();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class MapMatchingActivity extends AppCompatActivity {

private MapView mapView;
private MapboxMap map;
private MapboxMapMatching client;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -88,6 +89,10 @@ public void onLowMemory() {
@Override
protected void onDestroy() {
super.onDestroy();
// Cancel the MapMatching API request
if (client != null) {
client.cancelCall();
}
mapView.onDestroy();
}

Expand Down Expand Up @@ -171,7 +176,7 @@ private void drawBeforeMapMatching(List<Position> points) {
private void drawMapMatched(LineString lineString, int precision) {
try {
// Setup the request using a client.
MapboxMapMatching client = new MapboxMapMatching.Builder()
client = new MapboxMapMatching.Builder()
.setAccessToken(MapboxAccountManager.getInstance().getAccessToken())
.setProfile(DirectionsCriteria.PROFILE_DRIVING)
.setGpsPrecison(precision)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.annotations.BasicMarkerViewActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".examples.basics.SimpleMapViewActivity">
tools:context=".examples.annotations.CustomInfoWindowActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.annotations.DrawGeojsonLineActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.annotations.DrawMarkerActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.annotations.DrawPolygonActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.basics.SupportMapFragmentActivity">

<FrameLayout
android:id="@+id/container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.camera.AnimateMapCameraActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.camera.BoundingBoxCameraActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
tools:context=".examples.location.BasicUserLocation">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
tools:context=".examples.location.LocationTrackingActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.mas.DirectionsActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
tools:context=".examples.mas.GeocodingActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
tools:context=".examples.mas.MapMatchingActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.mas.StaticImageActivity">

<ImageView
android:id="@+id/mapImage"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.offline.SimpleOfflineMapActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
tools:context=".examples.mas.SimplifyPolylineActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapview"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.styles.DefaultStyleActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.styles.MapboxStudioStyleActivity">

<!--
Use your custom style by replacing the style url with the line below:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.styles.CustomRasterStyleActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".examples.styles.SatelliteStyleActivity">

<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapView"
Expand Down

0 comments on commit 67dd094

Please sign in to comment.