Permalink
Browse files

added mapmatching and static map modules

  • Loading branch information...
cammace committed Sep 16, 2017
1 parent 0a8c903 commit 445f5e522a617d1d0f611ff2d5b88201ca658172
Showing with 3,838 additions and 847 deletions.
  1. +36 −0 .github/ISSUE_TEMPLATE.md
  2. BIN .github/mbxservice-logo.png
  3. +196 −0 CHANGELOG.md
  4. +18 −0 CONTRIBUTING.md
  5. +18 −4 README.md
  6. +0 −1 app/.gitignore
  7. +0 −29 app/build.gradle
  8. +0 −21 app/proguard-rules.pro
  9. +0 −26 app/src/androidTest/java/com/mapbox/myapplication/ExampleInstrumentedTest.java
  10. +0 −11 app/src/main/AndroidManifest.xml
  11. +0 −114 app/src/main/res/drawable/ic_launcher_background.xml
  12. +0 −5 app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  13. +0 −5 app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  14. BIN app/src/main/res/mipmap-hdpi/ic_launcher.png
  15. BIN app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
  16. BIN app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  17. BIN app/src/main/res/mipmap-mdpi/ic_launcher.png
  18. BIN app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
  19. BIN app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  20. BIN app/src/main/res/mipmap-xhdpi/ic_launcher.png
  21. BIN app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
  22. BIN app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  23. BIN app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  24. BIN app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
  25. BIN app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  26. BIN app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  27. BIN app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
  28. BIN app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  29. +0 −6 app/src/main/res/values/colors.xml
  30. +0 −3 app/src/main/res/values/strings.xml
  31. +0 −11 app/src/main/res/values/styles.xml
  32. +0 −17 app/src/test/java/com/mapbox/myapplication/ExampleUnitTest.java
  33. +10 −1 build.gradle
  34. +517 −507 config/checkstyle/checkstyle.xml
  35. +7 −0 config/checkstyle/suppressions.xml
  36. +4 −0 gradle.properties
  37. +16 −0 gradle/code-quality.gradle
  38. +2 −1 gradle/dependencies.gradle
  39. +10 −0 samples/build.gradle
  40. +25 −0 samples/src/main/java/com/mapbox/samples/DirectionsSample.java
  41. +1 −1 services-directions/src/main/java/com/mapbox/directions/v5/MapboxDirections.java
  42. +74 −74 services-directions/src/main/java/com/mapbox/directions/v5/models/DirectionsResponse.java
  43. +9 −9 services-geocoding/src/main/java/com/mapbox/geocoding/v5/models/CarmenFeature.java
  44. +30 −0 services-matching/build.gradle
  45. +73 −0 services-matching/src/main/java/com/mapbox/matching/v5/MapMatchingService.java
  46. +509 −0 services-matching/src/main/java/com/mapbox/matching/v5/MapboxMapMatching.java
  47. +111 −0 services-matching/src/main/java/com/mapbox/matching/v5/MapboxService.java
  48. +186 −0 services-matching/src/main/java/com/mapbox/matching/v5/models/MapMatchingMatching.java
  49. +134 −0 services-matching/src/main/java/com/mapbox/matching/v5/models/MapMatchingResponse.java
  50. +160 −0 services-matching/src/main/java/com/mapbox/matching/v5/models/MapMatchingTracepoint.java
  51. +4 −0 services-matching/src/main/java/com/mapbox/matching/v5/models/package-info.java
  52. +6 −0 services-matching/src/main/java/com/mapbox/matching/v5/package-info.java
  53. +339 −0 services-matching/src/test/java/com/mapbox/matching/v5/MapboxMapMatchingTest.java
  54. +88 −0 services-matching/src/test/java/com/mapbox/matching/v5/models/MapMatchingResponseTest.java
  55. +147 −0 services-matching/src/test/java/com/mapbox/matching/v5/models/MapMatchingTracepointTest.java
  56. +1 −0 services-matching/src/test/resources/mapmatching_v5_polyline.json
  57. +25 −0 services-staticmap/build.gradle
  58. +450 −0 services-staticmap/src/main/java/com/mapbox/staticmap/v1/MapboxStaticMap.java
  59. +16 −0 services-staticmap/src/main/java/com/mapbox/staticmap/v1/StaticMapCriteria.java
  60. +343 −0 services-staticmap/src/main/java/com/mapbox/staticmap/v1/models/StaticMarkerAnnotation.java
  61. +265 −0 services-staticmap/src/main/java/com/mapbox/staticmap/v1/models/StaticPolylineAnnotation.java
  62. +4 −0 services-staticmap/src/main/java/com/mapbox/staticmap/v1/package-info.java
  63. +1 −0 services/src/main/java/com/mapbox/services/Constants.java
  64. +3 −1 settings.gradle
@@ -0,0 +1,36 @@
WHat kind of issue is this?
- [ ] **Questions** are better to ask on [Stack Overflow](https://stackoverflow.com/questions/tagged/mapbox+android). We are actively monitoring the questions there and oftentimes, others have already asked a similar question.
- [ ] **Feature request** should start off by describing the problem the feature will resolve. Please open a GitHub ticket beforehand with information about the feature to spark some discussion about the topic and once you have our support.
- [ ] **Bug Report** can be reported using the provided template below:
<!--- Provide a general summary of the issue in the Title above -->
#### Expected Behavior
<!--- Tell us what should happen -->
#### Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
#### Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
#### Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.
#### Context (Environment)
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
<!--- Provide a general summary of the issue in the Title above -->
#### Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->
#### Possible Implementation
<!--- Not obligatory, but suggest an idea for implementing addition or change -->
Binary file not shown.
@@ -0,0 +1,196 @@
## Changelog for Mapbox Java and Android Services
Mapbox welcomes participation and contributions from everyone.
### v2.2.3
- Introduce setDebugLoggingEnabled API [#549](https://github.com/mapbox/mapbox-java/pull/549)
### v2.2.2
- Adds setter for session rotation time [#544](https://github.com/mapbox/mapbox-java/pull/544)
### v2.2.1
- Updates release script for CircleCI [#541](https://github.com/mapbox/mapbox-java/pull/541)
### v2.2.0
- Adds ProGuard rules for Optimization and Directions Matrix API [#516](https://github.com/mapbox/mapbox-java/pull/516)
- Adds support for multiple languages in geocoder auto complete widget: [#512}(https://github.com/mapbox/mapbox-java/pull/512)
- Adds support for multiple languages in geocoder API: [#512](https://github.com/mapbox/mapbox-java/pull/512)
- Reduced API access in `GeocoderAdapter.java` to non-public since user has no reason for using: [#512](https://github.com/mapbox/mapbox-java/pull/512)
- Auto complete widget now extends to Support Library widget: [#512](https://github.com/mapbox/mapbox-java/pull/512)
- `TYPE_DISTRICT` and `TYPE_LOCALITY` result filters added: [#512](https://github.com/mapbox/mapbox-java/pull/512)
- Adds `place_type` support in Carman Feature: [#512](https://github.com/mapbox/mapbox-java/pull/512)
- Adds `matching_text` support in Carman Feature: [#512](https://github.com/mapbox/mapbox-java/pull/512)
- Adds `matching_place_name` support in Carman Feature: [#512](https://github.com/mapbox/mapbox-java/pull/512)
- Adds `language` support in Carman Feature: [#512](https://github.com/mapbox/mapbox-java/pull/512)
- Several Javadoc improvements: [#512](https://github.com/mapbox/mapbox-java/pull/512)
- Updated fixtures and test: [#512](https://github.com/mapbox/mapbox-java/pull/512)
- Adds exception and test for Turf methods which require at least 2 coordinates: [#513](https://github.com/mapbox/mapbox-java/pull/513)
- Resolves Fatal Exception: java.lang.OutOfMemoryError with the TelemetryClient: [#467](https://github.com/mapbox/mapbox-java/issues/467)
- Fixes Optimization API `getRadius()` method which wasn't being converted to a string: [#506](https://github.com/mapbox/mapbox-java/pull/506)
- Fixes Optimization API `getBearing()` method which wasn't being converted to a string: [#506](https://github.com/mapbox/mapbox-java/pull/506)
- Adds support for Optimization API language parameter: [#506](https://github.com/mapbox/mapbox-java/pull/506)
- Adds support for Optimization API distributions parameter: [#506](https://github.com/mapbox/mapbox-java/pull/506)
- Adds missing Optimization API `waypoint_index` inside the OptimizationWaypoint class: [#506](https://github.com/mapbox/mapbox-java/pull/506)
- Deprecates Optimization API `annotation` in favor of the correct name `annotations`: [#506](https://github.com/mapbox/mapbox-java/pull/506)
- Adds directions API support for languages [#504](https://github.com/mapbox/mapbox-java/pull/504)
- Adds directions API support for congestions annotation: [#469](https://github.com/mapbox/mapbox-java/pull/469)
- Adds `alternatives_count` to MapMatchingTraceoint class: [#507](https://github.com/mapbox/mapbox-java/pull/507)
- Adds support for the language param in MapMatching API: [#507](https://github.com/mapbox/mapbox-java/pull/507)
- Mock LocationEngine exposed in `libandroid-services`: [#476](https://github.com/mapbox/mapbox-java/pull/476)
- Adds Convert distance methods in TurfHelper class: [#476](https://github.com/mapbox/mapbox-java/pull/481)
### v2.1.3
* Downgrade LOST to v1.1.1 to address stability issues [#493](https://github.com/mapbox/mapbox-java/pull/493)
### v2.1.2
* Update to LOST `3.0.1` which fixes a bug where location requests were too aggressive [#486](https://github.com/mapbox/mapbox-java/pull/486)
* Expose `MockLocationEngine` as part of the public API [#476](https://github.com/mapbox/mapbox-java/pull/476)
* Update style versions to `v10` and add traffic styles [#478](https://github.com/mapbox/mapbox-java/pull/478)
* Fix static marker annotation URL generation [#479](https://github.com/mapbox/mapbox-java/pull/479)
* Add convert distance method to `TurfHelper` [#481](https://github.com/mapbox/mapbox-java/pull/481)
* Add new SSL certs for 2018/2019 [#484](https://github.com/mapbox/mapbox-java/pull/484)
### v2.1.1
* Updates to [LOST `3.0.0`](https://github.com/mapbox/mapbox-java/pull/462)
* Fixed location [timestamp issue](https://github.com/mapbox/mapbox-java/pull/463)
* Updated [library dependencies](https://github.com/mapbox/mapbox-java/pull/464)
* correct [units for `LegAnnotation.speed`](https://github.com/mapbox/mapbox-java/pull/460)
### v2.1.0
* The Mapbox Navigation SDK for Android has been moved into its own repository. Code and tickets can now be followed on [mapbox-navigation-android](https://github.com/mapbox/mapbox-navigation-android) [#439](https://github.com/mapbox/mapbox-java/pull/439)
* Introduced support for the [Optimized Trips API](https://www.mapbox.com/api-documentation/#optimized-trips) [#437](https://github.com/mapbox/mapbox-java/pull/437)
* Added support for the [Directions Matrix API](https://www.mapbox.com/api-documentation/#directions-matrix). This replaces the Distance API [#418](https://github.com/mapbox/mapbox-java/pull/418), which is now deprectated [#405](https://github.com/mapbox/mapbox-java/pull/405)
* Added support for direction [annotations](https://github.com/mapbox/mapbox-java/blob/master/mapbox/libjava-services/src/main/java/com/mapbox/services/api/directions/v5/MapboxDirections.java#L345-L358) [#417](https://github.com/mapbox/mapbox-java/pull/417)
* Added `setInterval`, `setFastestInterval` and `setSmallestDisplacement` to allow configurable [LocationEngine](https://github.com/mapbox/mapbox-java/blob/master/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/location/LocationEngine.java) parameters [#402](https://github.com/mapbox/mapbox-java/pull/402)
* Added setters in `DirectionsResponse` to simplify object creation [#422](https://github.com/mapbox/mapbox-java/pull/422)
* Added `weight` and `weight_name` support to the Directions API response [#438](https://github.com/mapbox/mapbox-java/pull/438)
* Fixed issue where some coordinates were overwritten when setting all origin, destination and a coordinates list inside the directions builder [#420](https://github.com/mapbox/mapbox-java/pull/420)
* Fixed bug when using `TurfMisc.pointOnLine()` where incorrect warnings would state your `Position` values were outside the recommended range [#416](https://github.com/mapbox/mapbox-java/pull/416)
* Enhanced coordinates formatting to remove trailing zeros [#424](https://github.com/mapbox/mapbox-java/pull/424)
### v2.0.0 - March 17th, 2017
* Mapbox Navigation SDK [#346](https://github.com/mapbox/mapbox-java/pull/346)
* Introduce support for Mapbox Distance API [#219](https://github.com/mapbox/mapbox-java/pull/219)
* Update Map Matching API to support new `v5`
* Divide library into smaller modules to reduce method count on Android projects [#251](https://github.com/mapbox/mapbox-java/pull/251)
* AppEngine support [#344](https://github.com/mapbox/mapbox-java/pull/344)
* Introduce support for Mapbox Telemetry [#282](https://github.com/mapbox/mapbox-java/pull/282)
* Added reusable components for permission and connectivity management [#276](https://github.com/mapbox/mapbox-java/pull/276)
* Abstracted the location engine from a specific provider [#269](https://github.com/mapbox/mapbox-java/pull/269) and provide default implementations [#320](https://github.com/mapbox/mapbox-java/pull/320)
* Shared improvements across clients
* RxJava support [#304](https://github.com/mapbox/mapbox-java/pull/304)
* Enabled setting a base URL to facilitate testing [#245](https://github.com/mapbox/mapbox-java/pull/245)
* Directions improvements:
* Added direction v5 lanes [#214](https://github.com/mapbox/mapbox-java/pull/214)
* Added support for the `driving-traffic` profile [#292](https://github.com/mapbox/mapbox-java/pull/292)
* Added support for polyline6 [#287](https://github.com/mapbox/mapbox-java/pull/287)
* Added rotary convenience methods [#329](https://github.com/mapbox/mapbox-java/pull/329)
* Added bearing query parameter [#337](https://github.com/mapbox/mapbox-java/pull/337)
* Remove support for `v4` [#260](https://github.com/mapbox/mapbox-java/pull/260)
* Geocoding improvements:
* Batch requests support [#267](https://github.com/mapbox/mapbox-java/pull/267)
* Added landmark, limit, country parameters support [#209](https://github.com/mapbox/mapbox-java/pull/209) [#217](https://github.com/mapbox/mapbox-java/pull/217)
* Added cancel method [#226](https://github.com/mapbox/mapbox-java/pull/226), setting multiple types [#230](https://github.com/mapbox/mapbox-java/pull/230), and language, base URL method setting to autocomplete widget [#315](https://github.com/mapbox/mapbox-java/pull/315) [#328](https://github.com/mapbox/mapbox-java/pull/328)
### v2.0.0-beta.3
* Make `ServicesException` and `TurfException` unchecked exceptions
### v2.0.0-beta.2
* Mapbox Navigation SDK
* Bearing query parameter and rotary convenience methods added to the Directions API
* Base URL method setting added to geocoder autocomplete widget
* AppEngine support
### v2.0.0-beta.1
* Introduce support for Mapbox Distance API
* Update Map Matching API to support new `v5`
* Divide library into smaller modules to reduce method count on Android projects (`libjava-core`, `libjava-geojson`, `libjava-services`, `libjava-services-rx`, `libandroid-telemetry`, `libandroid-services`, `libandroid-ui`)
* Introduce support for Mapbox Telemetry
* Added reusable components for permission and connectivity management
* Abstracted the location engine from a specific provider and provide default implementations
* Shared improvements across clients:
* RxJava support
* Enabled setting a base URL to facilitate testing
* Directions improvements:
* Added direction v5 lanes
* Added support for the `driving-traffic` profile
* Added support for polyline6
* Remove support for `v4`
* Geocoding improvements:
* Batch requests support
* Added landmark, limit, country parameters support
* Added cancel method, setting multiple types, and language method setting to autocomplete widget
### v1.3.2
* Geocoding: added poi.landmark type
### v1.3.1
* GeoJson: Feature properties are now properly serialized and raw array tests have been added
* Introduce checkstyle to the project
### v1.3.0
* `RouteUtils` class to simplify work with `RouteLeg` objects
* `geojson-tidy` integrated with Map Matching client
* Added Turf's `midpoint`, `along`, and `within` methods
* Added an example to showcase Turf's `lineslice`
* Geocoding widget now supports the `bbox` parameter
### v1.2.1
* Bring back `toString()` method in `CarmenFeature`
* Fixes regresion in `GeocoderAutoCompleteView`
Full changelog: https://github.com/mapbox/mapbox-java/issues?q=milestone%3Av1.2.1+is%3Aclosed
### v1.2.0
* Support for the Map Matching API
* Improved Geocoder API (including support for `wikidata` and `bbox`)
* Better Static Image API
* Some [Turf](http://turfjs.org/) methods ported to Java: `TurfMeasurement.bearing`, `TurfMeasurement.destination`, `TurfMeasurement.distance`, `TurfMeasurement.lineDistance`, `TurfHelpers.distanceToRadians`, `TurfHelpers.radiansToDistance`, `TurfMisc.lineSlice`
* [`simplify-js`](https://github.com/mourner/simplify-js) ported to Java
* Updated to `libjava` v1.2.0
* Several examples added to the TestApp
* Improved documentation
Full changelog: https://github.com/mapbox/mapbox-java/issues?q=milestone%3Av1.2.0+is%3Aclosed
### v1.1.0
* Support for directions API v5
* Support for Maki 3 and directions icons in Test App
* Fixed a bug where locale was different from `Locale.US`
* Updated to `libjava` v1.1.0
* Removed extra dependencies to reduce method count
Full changelog: https://github.com/mapbox/mapbox-java/issues?q=milestone%3Av1.1.0+is%3Aclosed
### v1.0.0
* Initial release: Java module with no Android dependencies
* Support for Geocoding API v5
* Support for Directions API v4 and v5
* Support for Static API v1
* RxJava support
* Support for GeoJSON objects
* Polyline encoder and decoder
* Initial release
* Full replacement for the stock `AndroidGeocoder`
* Geocoder autocomplete widget based on Android's `AutoCompleteTextView`
* Utility class to handle the new permission system in 6.0
* TestApp with sample code for directions v4 and v5, geocoding (reverse, widget, service), and static image with Picasso
@@ -0,0 +1,18 @@
# Contributing
If you have a usage question pertaining to Mapbox Android Services, or any of our other products, contact us through [our support page](https://www.mapbox.com/contact/).
If you want to contribute code:
1. Please familiarize yourself with the [install process](INSTALL.md).
2. Ensure that existing [pull requests](https://github.com/mapbox/mapbox-java/pulls) and [issues](https://github.com/mapbox/mapbox-java/issues) don’t already cover your contribution or question.
3. Pull requests are gladly accepted. If there are any changes that developers should be aware of, please update the [change log](CHANGELOG.md)
4. Mapbox uses checkstyle to enforce good Java code standards, Make sure to read the [wiki entry](https://github.com/mapbox/mapbox-java/wiki/Setting-up-Mapbox-checkstyle) and setup. CI will fail if your PR contains any mistakes.
# Code of conduct
Everyone is invited to participate in Mapbox’s open source projects and public discussions: we want to create a welcoming and friendly environment. Harassment of participants or other unethical and unprofessional behavior will not be tolerated in our spaces. The [Contributor Covenant](http://contributor-covenant.org) applies to all projects under the Mapbox organization and we ask that you please read [the full text](http://contributor-covenant.org/version/1/2/0/).
You can learn more about our open source philosophy on [mapbox.com](https://www.mapbox.com/about/open/).
@@ -1,9 +1,23 @@
[![](https://raw.githubusercontent.com/mapbox/mapbox-java/master/.github/splash-img.png)](https://www.mapbox.com/android-docs/mapbox-services/)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.mapbox.mapboxsdk/mapbox-android-services/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.mapbox.mapboxsdk/mapbox-android-services) [![CircleCI](https://circleci.com/gh/mapbox/mapbox-java.svg?style=svg)](https://circleci.com/gh/mapbox/mapbox-java)
<h1 align="center">
<br>
<a href="https://www.mapbox.com/android-docs/mapbox-services/overview/"><img src="https://github.com/mapbox/mapbox-java/blob/mb-java-3.0.0/.github/mbxservice-logo.png" alt="Mapbox Service" width="400"></a>
</h1>
<h4 align="center">Build powerful Java apps using Mapbox's tools and services</h4>
<p align="center">
<a href="https://maven-badges.herokuapp.com/maven-central/com.mapbox.mapboxsdk/mapbox-android-services">
<img src="https://maven-badges.herokuapp.com/maven-central/com.mapbox.mapboxsdk/mapbox-android-services/badge.svg"
alt="Maven Central">
</a>
<a href="https://circleci.com/gh/mapbox/mapbox-java">
<img src="https://circleci.com/gh/mapbox/mapbox-java.svg?style=shield&circle-token=:circle-token">
</a>
</p>
<br>
Mapbox Android Services contains directions, geocoding, and many more APIs to use inside your Android or Java application. This repository holds the source code for the project and is divided into several modules to make it easier for developers to only include the dependencies needed for their project.
## Getting Started
If you are looking to include this inside your project, please take a look at [the detailed instructions](https://www.mapbox.com/android-docs/mapbox-services/) found in our docs. If you are interested in building from source, read the contributing guide inside this project.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 445f5e5

Please sign in to comment.