Skip to content

Commit dac1874

Browse files
authored
Release 1.2.0 (#108)
* fix javadoc error * bump versions to 2.0.0-SNAPSHOT * small fixes to match the new java 1.2.0 api * fix tolerance value * bump version to 2.0.0-SNAPSHOT * update CHANGELOGs
1 parent e68d766 commit dac1874

10 files changed

Lines changed: 31 additions & 11 deletions

File tree

libandroid/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Mapbox welcomes participation and contributions from everyone.
44

5+
### v1.2.0
6+
7+
* Updated to `libjava` v1.2.0
8+
* Several examples added to the TestApp
9+
* Improved documentation
10+
11+
Full changelog: https://github.com/mapbox/mapbox-java/issues?q=milestone%3Av1.2.0+is%3Aclosed
12+
513
### v1.1.0
614

715
* Updated to `libjava` v1.1.0

libandroid/app/src/main/java/com/mapbox/services/android/testapp/staticimage/StaticImageActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class StaticImageActivity extends AppCompatActivity {
2121
// All default Mapbox styles
2222
public final static String[] MAPBOX_STYLES = {
2323
Constants.MAPBOX_STYLE_STREETS, Constants.MAPBOX_STYLE_LIGHT,
24-
Constants.MAPBOX_STYLE_DARK, Constants.MAPBOX_OUTDOORS,
24+
Constants.MAPBOX_STYLE_DARK, Constants.MAPBOX_STYLE_OUTDOORS,
2525
Constants.MAPBOX_STYLE_SATELLITE, Constants.MAPBOX_STYLE_SATELLITE_HYBRID};
2626

2727
// The ten venues for Copa America Centenario

libandroid/app/src/main/java/com/mapbox/services/android/testapp/utils/MapMatchingActivity.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,10 @@ public void onResponse(Call<MapMatchingResponse> call, Response<MapMatchingRespo
219219
// Check that the map matching API response is "OK".
220220
if (response.code() == 200) {
221221
// Convert the map matched response list from position to latlng coordinates.
222-
for (int i = 0; i < response.body().getMatchedPoints().size(); i++) {
223-
mapMatchedPoints.add(new LatLng(response.body().getMatchedPoints().get(i).getLatitude(), response.body().getMatchedPoints().get(i).getLongitude()));
222+
for (int i = 0; i < response.body().getMatchedPoints().length; i++) {
223+
mapMatchedPoints.add(new LatLng(
224+
response.body().getMatchedPoints()[i].getLatitude(),
225+
response.body().getMatchedPoints()[i].getLongitude()));
224226
}
225227

226228
if (mapMatchedRoute != null) {

libandroid/app/src/main/java/com/mapbox/services/android/testapp/utils/SimplifyPolylineActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ private void drawSimplify(List<Position> points, double tolerance, boolean quali
222222
Position[] before = new Position[points.size()];
223223
for (int i = 0; i < points.size(); i++) before[i] = points.get(i);
224224

225-
Position[] after = PolylineUtils.simplify(before, tolerance, quality);
225+
Position[] after = PolylineUtils.simplify(before, 0.001 * tolerance, quality);
226226

227227
simplifiedRoutePoints = after.length;
228228

libandroid/lib/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010

1111
// This should be updated together with gradle.properties
1212
// Last number is 0 for a SNAPSHOT, 1 for a release
13-
versionCode 1 * 1000 + 1 * 100 + 0 * 10 + 0
14-
versionName "1.1.0-SNAPSHOT"
13+
versionCode 2 * 1000 + 0 * 100 + 0 * 10 + 0
14+
versionName "2.0.0-SNAPSHOT"
1515
}
1616

1717
compileOptions {
@@ -33,7 +33,7 @@ dependencies {
3333
compile 'com.android.support:design:23.3.0'
3434

3535
// Mapbox Java Services
36-
compile ('com.mapbox.mapboxsdk:mapbox-java-services:1.2.0-SNAPSHOT@jar') {
36+
compile ('com.mapbox.mapboxsdk:mapbox-java-services:1.2.0@jar') {
3737
transitive=true
3838
}
3939

libandroid/lib/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Version name should be updated in build.gradle too.
2-
VERSION_NAME=1.2.0-SNAPSHOT
2+
VERSION_NAME=2.0.0-SNAPSHOT
33

44
GROUP=com.mapbox.mapboxsdk
55

libjava/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
Mapbox welcomes participation and contributions from everyone.
44

5+
### v1.2.0
6+
7+
* Support for the Map Matching API
8+
* Improved Geocoder API (including support for `wikidata` and `bbox`)
9+
* Better Static Image API
10+
* Some [Turf](http://turfjs.org/) methods ported to Java: `TurfMeasurement.bearing`, `TurfMeasurement.destination`, `TurfMeasurement.distance`, `TurfMeasurement.lineDistance`, `TurfHelpers.distanceToRadians`, `TurfHelpers.radiansToDistance`, `TurfMisc.lineSlice`
11+
* [`simplify-js`](https://github.com/mourner/simplify-js) ported to Java
12+
13+
Full changelog: https://github.com/mapbox/mapbox-java/issues?q=milestone%3Av1.2.0+is%3Aclosed
14+
515
### v1.1.0
616

717
* Support for directions API v5

libjava/lib/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION_NAME=1.2.0-SNAPSHOT
1+
VERSION_NAME=2.0.0-SNAPSHOT
22
GROUP=com.mapbox.mapboxsdk
33

44
POM_DESCRIPTION=Mapbox Java Services

libjava/lib/src/main/java/com/mapbox/services/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class Constants {
77
/**
88
* Package version
99
*/
10-
public final static String MAPBOX_JAVA_VERSION = "1.2.0-SNAPSHOT";
10+
public final static String MAPBOX_JAVA_VERSION = "2.0.0-SNAPSHOT";
1111

1212
/**
1313
* User agent for HTTP requests

libjava/lib/src/main/java/com/mapbox/services/mapmatching/v4/gson/MapMatchingGeometryDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
/**
1414
* Custom deserializer that assumes a Polyline string.
15-
* <p/>
15+
*
1616
* In case of a json object, null is returned to support the geometry=false option
1717
* (empty object is returned instead of null)
1818
*

0 commit comments

Comments
 (0)