-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isochrone api #621
Merged
Merged
Isochrone api #621
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
efa922e
vk-296-isochrone-api: added Isochrone class with related entities. Un…
Udumft d3cae7a
vk-296-isochrone-api: added code docs, changed IsochroneProfileIdenti…
Udumft 05ba71d
vk-296-isochrone-api: CHANGELOG updated
Udumft a36b69b
vk-296-isochrone-api: Linux build fix
Udumft b14e55d
vk-296-isochrone-api: replace IsochroneCredentials definition to be a…
Udumft b36d42b
vk-296-isochrone-api: test data typo fix (+2 squashed commits)
Udumft c2a31ff
vk-296-isochrone-api: linux build color fix
Udumft 5060f55
vk-296-isochrone-api: refactoed IsochroneOptions: renamed members, re…
Udumft 66fe022
vk-296-isochrone-api: incorporated Measurement for contours bounds de…
Udumft 104a9b5
vk-296-isochrone-api: linux compilation fixed.
Udumft e658370
vk-296-isochrone-api: corrected naming, added color space converting …
Udumft 9420de4
vk-296-isochrone-api: added README example; fixed query encoding bug
Udumft d0584be
vk-296-isochrone-api: deprecated DirectionsCredentials and Directions…
Udumft 630bf2e
vk-296-isochrone-api: respored xcodeproj file references
Udumft 4548f2c
vk-296-isochrone-api: test compilation issue fixed
Udumft f979052
vk-296-isochrone-api: replaced ContourDefinition enum with Definition…
Udumft 96b852d
vk-296-isochrone-api: linux build fix
Udumft c196293
vk-296-isochrones-api: code docs corrected.
Udumft 4b4ddf5
vk-296-isochrone-api: CHANGELOG corrected; moved DirectionsCredential…
Udumft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,10 +120,10 @@ open class DirectionsOptions: Codable { | |
|
||
Do not call `DirectionsOptions(waypoints:profileIdentifier:)` directly; instead call the corresponding initializer of `RouteOptions` or `MatchOptions`. | ||
|
||
- parameter waypoints: An array of `Waypoint` objects representing locations that the route should visit in chronological order. The array should contain at least two waypoints (the source and destination) and at most 25 waypoints. (Some profiles, such as `DirectionsProfileIdentifier.automobileAvoidingTraffic`, [may have lower limits](https://docs.mapbox.com/api/navigation/#directions).) | ||
- parameter profileIdentifier: A string specifying the primary mode of transportation for the routes. `DirectionsProfileIdentifier.automobile` is used by default. | ||
- parameter waypoints: An array of `Waypoint` objects representing locations that the route should visit in chronological order. The array should contain at least two waypoints (the source and destination) and at most 25 waypoints. (Some profiles, such as `ProfileIdentifier.automobileAvoidingTraffic`, [may have lower limits](https://docs.mapbox.com/api/navigation/#directions).) | ||
- parameter profileIdentifier: A string specifying the primary mode of transportation for the routes. `ProfileIdentifier.automobile` is used by default. | ||
*/ | ||
required public init(waypoints: [Waypoint], profileIdentifier: DirectionsProfileIdentifier? = nil) { | ||
required public init(waypoints: [Waypoint], profileIdentifier: ProfileIdentifier? = nil) { | ||
self.waypoints = waypoints | ||
self.profileIdentifier = profileIdentifier ?? .automobile | ||
} | ||
|
@@ -159,7 +159,7 @@ open class DirectionsOptions: Codable { | |
public required init(from decoder: Decoder) throws { | ||
let container = try decoder.container(keyedBy: CodingKeys.self) | ||
waypoints = try container.decode([Waypoint].self, forKey: .waypoints) | ||
profileIdentifier = try container.decode(DirectionsProfileIdentifier.self, forKey: .profileIdentifier) | ||
profileIdentifier = try container.decode(ProfileIdentifier.self, forKey: .profileIdentifier) | ||
includesSteps = try container.decode(Bool.self, forKey: .includesSteps) | ||
shapeFormat = try container.decode(RouteShapeFormat.self, forKey: .shapeFormat) | ||
routeShapeResolution = try container.decode(RouteShapeResolution.self, forKey: .routeShapeResolution) | ||
|
@@ -197,9 +197,9 @@ open class DirectionsOptions: Codable { | |
/** | ||
A string specifying the primary mode of transportation for the routes. | ||
|
||
The default value of this property is `DirectionsProfileIdentifier.automobile`, which specifies driving directions. | ||
The default value of this property is `ProfileIdentifier.automobile`, which specifies driving directions. | ||
*/ | ||
open var profileIdentifier: DirectionsProfileIdentifier | ||
open var profileIdentifier: ProfileIdentifier | ||
|
||
// MARK: Specifying the Response Format | ||
|
||
|
@@ -291,7 +291,7 @@ open class DirectionsOptions: Codable { | |
// MARK: Getting the Request URL | ||
|
||
/** | ||
An array of URL query items to include in an HTTP request. | ||
The path of the request URL, specifying service name, version and profile. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for catching this! |
||
|
||
The query items are included in the URL of a GET request or the body of a POST request. | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapbox/MapboxStatic.swift#112 tracks streamlining these steps by adding Turf support to the library.