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

[android] - rounded zoom when zooming with zoom button controller #7630

Closed
wants to merge 2 commits into from

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Jan 8, 2017

This PR enables the zoom button controller to zoom to rounded values.
eg. map with zoom 1.435 will zoom in to 2 and 3 instead of current 2.435 and 3.435.

This PR also cleans up some duplicate code in MapGestureDetector related to zoom button controller.

cc @LornTao @1ec5
Review @zugaldia

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Jan 8, 2017
@tobrun tobrun added this to the android-v5.0.0 milestone Jan 8, 2017
@tobrun tobrun self-assigned this Jan 8, 2017
@tobrun tobrun requested a review from zugaldia January 8, 2017 09:57
@tobrun tobrun force-pushed the tobrun-rounded-zoom-button-controller branch from 9b09d15 to e6f0835 Compare January 8, 2017 09:59
@1ec5
Copy link
Contributor

1ec5 commented Jan 9, 2017

Checkstyle is failing:

[ant:checkstyle] [ERROR] /bitrise/src/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java:177:68: WhitespaceAround: '?' is not preceded with whitespace. [WhitespaceAround]
:MapboxGLAndroidSDK:checkstyle FAILED

FAILURE: Build failed with an exception.

Update: fixed in b8e55c6.

@tobrun tobrun closed this Jan 9, 2017
@1ec5 1ec5 deleted the tobrun-rounded-zoom-button-controller branch February 11, 2017 22:12
@1ec5
Copy link
Contributor

1ec5 commented Feb 11, 2017

A similar fix is going into the iOS and macOS SDKs in #8027.

@zugaldia zugaldia restored the tobrun-rounded-zoom-button-controller branch February 13, 2017 14:01
@zugaldia
Copy link
Member

Per #8027 (comment) this proposed change will be brought to 5.0 for consistency with iOS.

@zugaldia zugaldia reopened this Feb 13, 2017
@zugaldia
Copy link
Member

cc: @Guardiola31337 for review.

@tobrun
Copy link
Member Author

tobrun commented Feb 13, 2017

On board for adding this but preferably woud hold off merging this PR atm, GLSurfaceView in #8031 will require some rewriting and that would mean double work as this PR could use some finetuning.

@Guardiola31337
Copy link
Contributor

Guardiola31337 commented Feb 14, 2017

Looks great 👍
BTW, we should discuss code styles, etc. (I'm not a big fan of the ternary operator 😅)

@1ec5
Copy link
Contributor

1ec5 commented Mar 4, 2017

Since this PR is scheduled for Android SDK v5.0.0, it needs to be rebased and retargeted at the release-ios-v3.5.0-android-v5.0.0 branch.

@tobrun
Copy link
Member Author

tobrun commented Mar 7, 2017

Continued in #8299.

@tobrun tobrun closed this Mar 7, 2017
@tobrun tobrun deleted the tobrun-rounded-zoom-button-controller branch April 21, 2017 09:09
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.

4 participants