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

Min / Max Zoom Level Clamping In Core and Android - #3812

Merged
bleege merged 3 commits into
masterfrom
509-max25
Feb 4, 2016
Merged

bleege merged 3 commits into
masterfrom
509-max25

Conversation

@bleege

@bleege bleege commented Feb 4, 2016

Copy link
Copy Markdown
Contributor

Closes #509

…in Android. Clamping Min and Max zooms at Core GL for all platforms to use at runtime.
@bleege bleege added iOS Mapbox Maps SDK for iOS Android Mapbox Maps SDK for Android labels Feb 4, 2016
@bleege bleege added this to the android-v4.0.0 milestone Feb 4, 2016
@bleege

bleege commented Feb 4, 2016

Copy link
Copy Markdown
Contributor Author

Can you 👀 this PR @ansis @1ec5 to make sure it's inline with what we discussed in Slack earlier today? If it's good then feel free to merge!

Comment thread src/mbgl/map/transform_state.cpp Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can be succinctly expressed as util::clamp(minZoom, 0.0, 25.5). But you should also ensure that the minimum zoom level is less than the maximum.

@1ec5

1ec5 commented Feb 4, 2016

Copy link
Copy Markdown
Contributor

The numbers 0.0 and 25.5 should be factored out into constants. They can go right alongside PITCH_MAX in constants.h/.cpp.

@bleege

bleege commented Feb 4, 2016

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestions @1ec5! I've now implemented and tested them locally in Android. Assuming Travis / Bitrise is happy with it I'll push it into master.

@bleege

bleege commented Feb 4, 2016

Copy link
Copy Markdown
Contributor Author

Bitrise and Travis approved. Time to merge!

@bleege
bleege merged commit 87bac32 into master Feb 4, 2016
@bleege bleege self-assigned this Feb 4, 2016
@bleege
bleege deleted the 509-max25 branch February 4, 2016 01:18
@bleege bleege mentioned this pull request Feb 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Android Mapbox Maps SDK for Android iOS Mapbox Maps SDK for iOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants