Skip to content
This repository has been 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
kingfisherphuoc opened this issue Aug 26, 2016 · 2 comments
Closed
Labels
Android Mapbox Maps SDK for Android

Comments

@kingfisherphuoc
Copy link

kingfisherphuoc commented Aug 26, 2016

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.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Aug 26, 2016
@zugaldia
Copy link
Member

zugaldia commented Feb 3, 2017

@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.

@tobrun
Copy link
Member

tobrun commented Apr 19, 2017

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.

@tobrun tobrun closed this as completed Apr 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

3 participants