Skip to content

Allow overriding the location puck's location #324

Closed

Description

@ericrwolfe

This is an upstream issue in mapbox-gl-native (@1ec5 I can't recall the ticket), but based on the release cycles of mapbox-gl-native, we should consider adding a workaround to the navigation SDK that allows developers to customize the location used to display the maps location puck while in course tracking mode.

The example app's CustomViewController gets around this by disabling the mapView's location and heading updates and overriding it's internal locationManager delegate callback 😬:

mapView.locationManager(routeController.locationManager, didUpdateLocations: [location])

cc @bsudekum

Activity

  1. added this to the v0.5.0 milestone on Jun 30, 2017
  2. 1ec5 commented on Jul 1, 2017

    @1ec5
    Contributor

    This is being tracked upstream in mapbox/mapbox-gl-native#6867.

    /ref #57 #172

  3. modified the milestones: v0.5.0, on Jul 9, 2017
  4. modified the milestones: v0.6.0-2, v0.6.0-1 on Jul 21, 2017
  5. ericrwolfe commented on Jul 26, 2017

    @ericrwolfe
    ContributorAuthor

    Currently, it's not possible to set up location simulation to override the puck's location like in the example app using just Core Navigation, as the example app makes use of this category on MGLMapView (https://github.com/mapbox/mapbox-navigation-ios/blob/master/MapboxNavigation/MGLMapView%2BMGLNavigationAdditions.h).

  6. 1ec5 commented on Jul 27, 2017

    @1ec5
    Contributor

    #402 moves that category to the example application proper, since it will no longer be used by the navigation SDK. Even now, we could eliminate the category in favor of -respondsToSelector: and -performSelector:withObject:withObject:, which would be safer than forward declaration albeit less aesthetically pleasing.

  7. removed this from the v0.6.0-2 milestone on Jul 27, 2017
  8. 1ec5 commented on Aug 18, 2017

    @1ec5
    Contributor

    #323 (comment) describes a way to precisely customize the location of the user puck on screen that should tide us over until #402 lands.

  9. 1ec5 commented on Oct 6, 2017

    @1ec5
    Contributor

    #402, which we hope to land next week after some testing, will reimplement course tracking without hackily overriding -locationManager:didUpdateLocations:; however, there’s still an MGLMapView+MGLNavigationAdditions.h that hackily overrides -mapViewDidFinishRenderingFrameFullyRendered: and redeclares displayLink in order to mitigate the power consumption issue in #370.

    Note that this ticket only covers the navigation SDK’s own ability to control the geographic location of the user puck. It has no direct impact on developers using this SDK. #323 is about allowing the developer to control the puck’s position on screen.

  10. bsudekum commented on Mar 28, 2018

    @bsudekum
    Contributor

    Closing now that #402 is in.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions