Skip to content

Support for directions matrix#418

Merged
cammace merged 3 commits into
masterfrom
cam-directions-matrix
Apr 1, 2017
Merged

Support for directions matrix#418
cammace merged 3 commits into
masterfrom
cam-directions-matrix

Conversation

@cammace

@cammace cammace commented Mar 29, 2017

Copy link
Copy Markdown

closes: #406

Adds support for the directions matrix v1 recently launched

Check List

  • Javadoc added to any methods included
  • Finish writing test.

@zugaldia

Copy link
Copy Markdown
Member

Besides mapbox/mapbox-android-demo#263, let's add an example to the Test App in MAS too.

.addConverterFactory(GsonConverterFactory.create())
.build();


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: extra space.

@Query("sources") String sources
);


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: extra space.

if (profile == null) {
throw new ServicesException(
"A profile is required for the Directions Matrix API. Use one of the profiles found in the"
+ "DirectionsCriteria.java file.");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the DirectionsCriteria values


if (profile.equals(DirectionsCriteria.PROFILE_DRIVING_TRAFFIC)) {
throw new ServicesException(
"The directions matrix doesn't support the driving traffic profile.");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Directions Matrix

if (!profile.equals(DirectionsCriteria.PROFILE_DRIVING)
&& !profile.equals(DirectionsCriteria.PROFILE_CYCLING)
&& !profile.equals(DirectionsCriteria.PROFILE_WALKING)) {
throw new ServicesException("Profile must be one of the constants found inside the DirectionsCriteria file.");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

values


if (coordinates.size() > 25) {
throw new ServicesException(
"All profiles allows for maximum of 25 coordinates.");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"allow for a maximum"

@cammace cammace force-pushed the cam-directions-matrix branch from 59f3efc to 5ad6697 Compare March 30, 2017 17:22
@zugaldia

Copy link
Copy Markdown
Member

@cammace Still missing #418 (comment).

@cammace cammace merged commit 278cfbc into master Apr 1, 2017
@cammace cammace deleted the cam-directions-matrix branch April 1, 2017 16:57
@cammace cammace mentioned this pull request Apr 15, 2017
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support the Directions Matrix API

2 participants