Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location layer asset update #245

Merged
merged 7 commits into from
Jan 25, 2018
Merged

Location layer asset update #245

merged 7 commits into from
Jan 25, 2018

Conversation

cammace
Copy link

@cammace cammace commented Jan 16, 2018

#This PR optimizes/updates some of the location layer assets. The main difference is now we are adding a more 3D effect to the icons so that the user location pops out more and is easier to find (especially on a white background).

ezgif com-video-to-gif 2

I've also fixed an issue with the accuracy layer getting initialized with the default radius of 5 and then immediately going back to zero since the location variable was null. lastLocation variable has been removed since location is virtually identical.

@cammace cammace self-assigned this Jan 16, 2018
@cammace cammace requested a review from tobrun January 16, 2018 17:07
@cammace cammace force-pushed the location-layer-asset-update branch from d6e44b9 to a2beeb7 Compare January 18, 2018 19:42
@cammace cammace added ready for review When your PR has been personally reviewed, its time for an external contributors to approve and removed ⚠️ DO NOT MERGE labels Jan 19, 2018
Copy link
Member

@tobrun tobrun left a comment

Choose a reason for hiding this comment

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

looking great overall, found a couple of small nit picks

private void addCameraListener() {
if (locationLayerMode == LocationLayerMode.NAVIGATION) {
mapboxMap.removeOnCameraMoveListener(this);
return;
Copy link
Member

Choose a reason for hiding this comment

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

it's a bit strange that a method called #addCameraListener is actually removing the listener in some cases. Either rename the method to something fitting or decouple the removal into a separate codeblock

@@ -496,6 +504,8 @@ private void setNavigationLayerVisibility(boolean visible) {
@Override
public void onCameraMove() {
locationLayer.updateAccuracyRadius(location);
locationLayer.updateForegroundOffset(mapboxMap.getCameraPosition().tilt);
locationLayer.updateForegroundBearing((float) mapboxMap.getCameraPosition().bearing);
Copy link
Member

Choose a reason for hiding this comment

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

reuse the CameraPosition object, now we are calling twice into c++ code while we can get away with just once.

@cammace
Copy link
Author

cammace commented Jan 25, 2018

Thanks for the review, made the changes @tobrun

@cammace cammace merged commit bb09c7f into master Jan 25, 2018
@cammace cammace deleted the location-layer-asset-update branch January 25, 2018 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review When your PR has been personally reviewed, its time for an external contributors to approve
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants