-
Notifications
You must be signed in to change notification settings - Fork 318
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
Add speed limit data returned by MapboxDirections.swift to the RouteProgress object #2114
Conversation
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.
Thanks, I think this PR is all set as far as the current API is concerned. Some upcoming changes to the API will require minimal additional work here (to determine the currently relevant sign style and unit), and we’ll have to revive the UI in #1242 before we can consider the feature complete, but this is a good foundation for a non-production application to prototype a UI.
All the builds are failing on CI, likely because Cartfile.resolved hasn’t been updated to reflect the changes in Cartfile.
@@ -25,7 +25,11 @@ open class NavigationRouteOptions: RouteOptions { | |||
shapeFormat = .polyline6 | |||
includesSteps = true | |||
routeShapeResolution = .full | |||
attributeOptions = [.congestionLevel, .expectedTravelTime, .maximumSpeedLimit] | |||
if profileIdentifier == .walking { |
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.
profileIdentifier
is mutable, so technically it’s possible for the developer to change the profile identifier to walking
after initializing the object. We could address that case by conditionally adding maximumSpeedLimit
in an override of the URLQueryItems
property instead of this initializer. But maybe it isn’t a big deal.
4b35798
to
3012c53
Compare
Once mapbox/mapbox-directions-swift#379 lands, this PR will be blocked by #2206. |
This PR is no longer blocked by either mapbox/mapbox-directions-swift#379 or #2206. However, mapbox/mapbox-directions-swift#250 does need to land first. |
This PR needs to be rebased to resolve conflicts, but mapbox/mapbox-directions-swift#250 depends on mapbox/mapbox-directions-swift#382, which master is incompatible with. #2275 fixes some of the compatibility issues but isn’t ready yet, and it depends on mapbox/mapbox-directions-swift#393, which isn’t ready either. 🤕 |
589e1dc
to
7bbdb60
Compare
…imit for the route progress.
… a segment and not be considered evenly distributed along the segment coordinates.
…edLimit per route segment array in favor of positioned SpeedLimit tuples.
…ofile request since they are invalid for that profile. Rework the logic for including maximumSpeedLimits annotations to restrict them to auto driving profiles.
…en the current speed limit is queried for.
Get just the current segment’s speed limit instead of bucketing the speed limits upfront.
8631b54
to
3339380
Compare
Shifting from PR #2112
Incorporate the new maxspeed annotations on the RouteLeg object from MapboxDirections.swift. Provide this data to Navigation SDK clients via the
maximumSpeedLimitsByLeg array on the RouteProgress objectRouteLegProgress.currentSpeedLimit
property.