Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

MyLocation view position is wrong after disable my location a while #6167

Closed

Description

@kingfisherphuoc

Platform: Android
Mapbox SDK version: 4.2.0-beta.1

Steps to trigger behavior

  1. Open activity with MapView, call mapboxMap.setMyLocationEnabled(true); to show current user's loation
  2. disable mylocation with mapboxMap.setMyLocationEnabled(false); for a while (10 minutes or more).
  3. Move to another location (still open app) then enable MyLocation mapboxMap.setMyLocationEnabled(true);.
    --> At this moment, the my location "icon" will slowly move to the current position. Sometimes, it only move to a place which near my current location which is different from LocationServices.getLocationServices(getContext()).getLastLocation().

Expected behavior

MyLocation should move faster when it's re-enabled or should visible immediately (or is there any wait to do so?).

**notes: you can re-create this bug easily with Lockito mock location in any android Device.

Activity

  1. added
    Android
    on Aug 26, 2016
  2. zugaldia commented on Feb 3, 2017

    @zugaldia
    Member

    @kingfisherphuoc With #7892 we have reworked the way we handle location updates with the introduction of a LocationSource object. This code will be available in the next nightly SNAPSHOT.

    Are you still experiencing this issue? if so, could you share with us the Lockito test? Thanks for your help troubleshooting this issue.

  3. tobrun commented on Apr 19, 2017

    @tobrun
    Member

    The underlying issue was the used LOST location provider. #8710 allows to set a custom location source so you can switch to another or roll your own. Closing.

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

    Android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions