Conversation
There was a problem hiding this comment.
If you ever have to check for nil, that’s a sign you should make the variable optional (?) instead of implicitly unwrapped optional (!). Then you can simply call resetTrackingModeTimer?.invalidate() below.
There was a problem hiding this comment.
I agree that this method is useful, but you don’t appear to be using it anywhere. Looks like you went with passing in a raw array of coordinates in order to more easily get a subarray of them.
There was a problem hiding this comment.
Move this extension to a separate file to make it more discoverable.
7822d17 to
1e8a097
Compare
1ec5
left a comment
There was a problem hiding this comment.
This looks reasonable from a technical perspective. I’m a little concerned that the hit target is too small and too close to the Cancel button, and that residential roads may bleed into the button’s white background.
/cc @mayagao
| if isInOverviewMode { | ||
| recenterButton.isHidden = true | ||
| overviewButton.setTitle("Overview", for: .normal) | ||
| isInOverviewMode = !isInOverviewMode |
There was a problem hiding this comment.
It would be clearer to either move this line out of the if statement (and remove the similar one from the else case) or explicitly say false here and true below.
| <state key="normal" image="location"/> | ||
| <inset key="contentEdgeInsets" minX="0.0" minY="0.0" maxX="10" maxY="0.0"/> | ||
| <inset key="titleEdgeInsets" minX="15" minY="0.0" maxX="0.0" maxY="0.0"/> | ||
| <state key="normal" title="Resume" image="location"> |
There was a problem hiding this comment.
Should we localize this?
If the image asset is set to render as template image and the button type is
Is slightly more tricky since not all buttons should have tinted image and text. I would: @objc(MBHighlightedButton)
public class HighlightedButton: Button { }and apply a textColor for all labels that are contained inside a UILabel.appearance(for: traitCollection, whenContainedInInstancesOf: [HighlightedButton.self]).textColor = color |
|
@frederoni having a hard time getting the style of the button customizable. Could you take a look at this? |
|
@frederoni @1ec5 this is ready for another round of review |
|
Crappy errors on bitrise: |
|
-edited- |
Seems to be a mirror of libwebp (SDWebImage dependency) that disappeared from GH. (https://github.com/webmproject/libwebp) |
Cartfile.resolved
Outdated
| @@ -1,5 +1,5 @@ | |||
| binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "3.5.2" | |||
| github "52inc/Pulley" "1.4" | |||
| github "52inc/Pulley" "1.1" | |||
There was a problem hiding this comment.
oy, bad merge. Will fix
|
Note, when in overview mode, I'm hiding the current way name label as not to clutter the screen. |
|
@1ec5 @frederoni bump, review here would be 💯 |
|
@bsudekum Can you rebase this PR before review? |
|
@frederoni the rebase is looking pretty rough. the branch is up to date with master however. |
| <fontDescription key="fontDescription" type="system" pointSize="16"/> | ||
| <inset key="contentEdgeInsets" minX="0.0" minY="0.0" maxX="10" maxY="0.0"/> | ||
| <inset key="titleEdgeInsets" minX="15" minY="0.0" maxX="0.0" maxY="0.0"/> | ||
| <state key="normal" title="Resume" image="location"> |
There was a problem hiding this comment.
This needs to be localized. In the File inspector, click the Make Localizable button. When we merge this PR, we'll need to add Navigation.strings to Transifex and set up autoupdating.
| guard polyline.overlayBounds.ne - polyline.overlayBounds.sw > 200 else { | ||
| return | ||
| } | ||
| mapView.setVisibleCoordinateBounds(polyline.overlayBounds, edgePadding: overviewContentInset, animated: true) |
There was a problem hiding this comment.
FYI, the map SDK has a "targeted course tracking" feature that accomplishes a similar effect. You keep the userTrackingMode as followWithCourse but also set targetCoordinate. The map automatically adjusts the visible coordinate bounds to keep both the current location and target coordinate in view at the same time. What's nice is that the user puck continues to show (and point in the right direction).
Nevertheless, I think this code is fine for now, because targeted course tracking mode doesn't reset to north (which is arguably better) and may not show the entire route line (if part of the route bows way off to the side or behind the user.
Bridge profile identifier to Objective-C




Adds an overview button which fits the user location to the end of the route on all location updates
todo: