Skip to content

Remove workarounds adding content inset when setting map camera #2145

Closed

Description

@1ec5

Once mapbox/mapbox-gl-native#14813 lands and we upgrade to map SDK v5.1.0, NavigationMapView.userAnchorPoint and possibly other methods need to be updated to stop adding the map view’s contentInset to the edge padding when setting the map’s camera.

/ref #1651 (comment)
/cc @mapbox/navigation-ios @fabian-guerra @d-prukop

Activity

  1. added
    op-ex
    on Jun 1, 2019
  2. added this to the v0.35.0 milestone on Jun 1, 2019
  3. 1ec5 commented on Jun 20, 2019

    @1ec5
    ContributorAuthor

    In rudimentary testing, NavigationMapView.userAnchorPoint and NavigationMapView.updateCourseTracking(location:camera:animated:) seem to be behaving fine after upgrading to map SDK v5.1.0. That’s a bit of a surprising outcome, given that there was obviously a bug in the map SDK previously and it got fixed in v5.1.0.

  4. 1ec5 commented on Jun 27, 2019

    @1ec5
    ContributorAuthor

    Fixed in #2134.

  5. 1ec5 commented on Jul 17, 2019

    @1ec5
    ContributorAuthor

    I must not’ve been paying close enough attention, but NavigationMapView.updateCourseTracking(location:camera:animated:) is not quite correct. Upgrading from map SDK v5.0.0 to v5.1.0 causes the map to pivot around the center-bottom of the map instead of the puck’s center.

  6. reopened this on Jul 17, 2019
  7. modified the milestones: v0.35.0, v0.36.0 on Jul 17, 2019
  8. added
    bug
    on Jul 17, 2019
  9. 1ec5 commented on Jul 26, 2019

    @1ec5
    ContributorAuthor

    Possibly related to mapbox/mapbox-gl-native#15232.

  10. 1ec5 commented on Jul 26, 2019

    @1ec5
    ContributorAuthor

    I must not’ve been paying close enough attention, but NavigationMapView.updateCourseTracking(location:camera:animated:) is not quite correct. Upgrading from map SDK v5.0.0 to v5.1.0 causes the map to pivot around the center-bottom of the map instead of the puck’s center.

    This is probably mapbox/mapbox-gl-native#15233.

  11. removed this from the v0.36.0 milestone on Jul 27, 2019
  12. astojilj commented on Aug 14, 2019

    @astojilj
    Contributor

    Once mapbox/mapbox-gl-native#14813 lands and we upgrade to map SDK v5.1.0, NavigationMapView.userAnchorPoint and possibly other methods need to be updated to stop adding the map view’s contentInset to the edge padding when setting the map’s camera.

    /ref #1651 (comment)
    /cc @mapbox/navigation-ios @fabian-guerra @d-prukop

    @1ec5, @fabian-guerra

    Since mapbox/mapbox-gl-native@4026451 is already in 5.1, it requires described update.

    As padding is added to content inset, current anchor point calculation is out of sync with mapbox/mapbox-gl-native#14813 and effectively adds content insets twice: once in anchor point calculation and once in setCamera - defined in mapbox/mapbox-gl-native#12818. This is a cause of having the puck jumping down - working on fix for this in #2211.

  13. noway commented on Sep 26, 2019

    @noway

    In my experience, the puck is detaches from the route while jumping up, although when it's down it's too low as well, so the puck sort of either being too low (which is not too bad cause I can offset that myself I think) or too high and detached.

    Either way, is there any immediate workaround for puck jumping up/down? I'm using "mapbox/mapbox-navigation-ios" "v0.37.0" and "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "5.4.0" via Cathage. We were using mapbox navagtion 0.34 with mapbox ios sdk 5.0.0, but 5.0.0 fails to compile with Swift 5.1 now (which is forced with Xcode 11.0). Having to update to 0.37, this is a critical bug which blocks any releases we can do to our app. I set my bound using:

    self->_navigationViewController.view.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height);
    

    Update: workaround to this is to adopt this unmerged PR: #2211 (comment)

  14. 1ec5 commented on Oct 2, 2019

    @1ec5
    ContributorAuthor

    Once #2211 lands, #2248 will supersede the original problem tracked in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugop-ex

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions