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

MyLocationView activate/deactivate LocationSource #8255

Merged

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Mar 2, 2017

This PR fixes two issues:

  • not activating/deactivating the LocationSource when toggling MyLocationView state, we aren't receiving any location updates atm.
  • incorrect accuracy circle width (closes Accuracy circle scaling incorrectly #6084).

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Mar 2, 2017
@tobrun tobrun added this to the android-v5.0.0 milestone Mar 2, 2017
@tobrun tobrun self-assigned this Mar 2, 2017
@tobrun tobrun requested a review from zugaldia March 2, 2017 16:01
Copy link
Member

@zugaldia zugaldia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, one question only.

@@ -423,22 +421,18 @@ public void onRestoreInstanceState(Parcelable state) {
private void toggleGps(boolean enableGps) {
LocationEngine locationEngine = LocationSource.getLocationEngine(getContext());
if (enableGps) {
// Set an initial location if one available
Location lastLocation = locationEngine.getLastLocation();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tobrun why not request a manual update? This way we could have a faster location reading before the LocationEngineListener receives the first update?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you clarify manual update? Expose a setter for end-users? or saving the last location ourselves? some background on why these lines were removed, this line will always return null as the LocationEngine hasn't been connected (this is due the change in LOST 1.0 -> 2.0).

@tobrun tobrun force-pushed the tvn-mylocationview-activate branch from 57bfbe4 to 7c1fe5b Compare March 3, 2017 14:39
@tobrun tobrun merged commit e115d55 into release-ios-v3.5.0-android-v5.0.0 Mar 8, 2017
@tobrun tobrun deleted the tvn-mylocationview-activate branch March 8, 2017 23:01
@zugaldia zugaldia mentioned this pull request Mar 10, 2017
8 tasks
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

Successfully merging this pull request may close these issues.

2 participants