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

Android is inconsistent about “zoom” versus “zoomLevel” #3327

Closed
1ec5 opened this issue Dec 16, 2015 · 5 comments · Fixed by #3520
Closed

Android is inconsistent about “zoom” versus “zoomLevel” #3327

1ec5 opened this issue Dec 16, 2015 · 5 comments · Fixed by #3520
Assignees
Labels
Android Mapbox Maps SDK for Android refactor

Comments

@1ec5
Copy link
Contributor

1ec5 commented Dec 16, 2015

MapView has getZoomLevel(), while NativeMapView and LatLngZoom both have getZoom(). The Android bindings should standardize on one term to avoid confusion. The iOS SDK and OS X port have standardized on “zoom level”, to avoid situations where “zoom” is used as a noun in places where verbs can also be used.

/cc @bleege

@1ec5 1ec5 added refactor Android Mapbox Maps SDK for Android starter-task labels Dec 16, 2015
@bleege bleege added this to the android-v3.1.0 milestone Dec 22, 2015
@bleege
Copy link
Contributor

bleege commented Dec 22, 2015

Sounds good @1ec5. Let's tee this up for the next version of the Android SDK.

/cc @zugaldia @tobrun

@tobrun
Copy link
Member

tobrun commented Jan 8, 2016

This will be resolved if #3145 lands

@bleege
Copy link
Contributor

bleege commented Jan 8, 2016

@tobrun Since #3145 is a bit of a bigger lift that may or may not be ready by the time we're ready to release the next PROD version of the SDK let's knock this issue out first as getting things named consistently is important. Cool?

@tobrun
Copy link
Member

tobrun commented Jan 12, 2016

@bleege agreed, taking this up now

@tobrun
Copy link
Member

tobrun commented Jan 12, 2016

Added new methods:

  • void setZoom(zoomLevel)
  • void setZoom(zoomLevel, duration)
  • float getZoom

Deprecated old methods:

  • void setZoomLevel(zoomLevel)
  • void setZoomLevel(zoomLevel, duration)
  • float getZoom()

Added new attribute:

  • zoom (old one is zoom_level)

I replaced all occurrences in test app with new methods,
I replaced all occurrences in MapView class except the one loading the old attribute.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants