Skip to content

Added some doc to bearing and position#17

Merged
zugaldia merged 4 commits into
masterfrom
commons-doc
Apr 15, 2016
Merged

Added some doc to bearing and position#17
zugaldia merged 4 commits into
masterfrom
commons-doc

Conversation

@cammace

@cammace cammace commented Apr 13, 2016

Copy link
Copy Markdown

Could I get some clarification on bearing range @zugaldia? I'm also testing the waters with better ways to comment sections of the class. For example, you were using this style in position.java:

/*
 * Factories
 */

which I changed to:

// ****************************** Factories ******************************

another option I've seen in some libraries is:

// ------------------------------------------------------------------------
// Factories
// ------------------------------------------------------------------------

Not sure if you prefer your way of commenting them or if you just want to get rid of it all together. I do like breaking up the code like this though.

@zugaldia

Copy link
Copy Markdown
Member

Sure thing. Bearing ranges are explained in https://www.mapbox.com/api-documentation/directions-v5.html as part of the StepManeuver object.

bearing_before: Number between 0 and 360 indicating the clockwise angle from true north to the direction of travel right before the maneuver

bearing_after: Number between 0 and 360 indicating the clockwise angle from true north to the direction of travel right after the maneuver

Regarding comments, let's keep them consistent with the main SDK. Either:

//
// Factories
//

or

/*
 * Factories
 */

Unless @tobrun or @bleege have a strong opinion otherwise.

@bleege

bleege commented Apr 13, 2016

Copy link
Copy Markdown
Contributor

👍

@cammace

cammace commented Apr 14, 2016

Copy link
Copy Markdown
Author

so in this case, direction is bearing_before and range would be bearing_after?

@zugaldia

Copy link
Copy Markdown
Member

I'm afraid this is a concept that it's still fluctuating as the new API gets released. Let's pause on v5 docs for now.

@cammace cammace changed the title [Not Ready] added some doc to bearing and position Added some doc to bearing and position Apr 15, 2016
@cammace

cammace commented Apr 15, 2016

Copy link
Copy Markdown
Author

@zugaldia if everything looks good, this PR is good to go then!

@zugaldia

zugaldia commented Apr 15, 2016

Copy link
Copy Markdown
Member

@cammace Thanks! Merging with minor edits. Leaving bering for until after v5.

@zugaldia
zugaldia merged commit 9f84cf3 into master Apr 15, 2016
@zugaldia
zugaldia deleted the commons-doc branch April 15, 2016 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants