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

zoom - Inconsistent variable type (double vs float) #4445

Closed
dariav opened this issue Mar 23, 2016 · 1 comment
Closed

zoom - Inconsistent variable type (double vs float) #4445

dariav opened this issue Mar 23, 2016 · 1 comment
Assignees
Labels
Android Mapbox Maps SDK for Android bug SEMVER-MAJOR Requires a major release according to Semantic Versioning rules

Comments

@dariav
Copy link

dariav commented Mar 23, 2016

Looking at Mapbox SDK seems like zoom variable type is not consistent and that's causing me issues.

If I am to retrieve zoom level I would do:

double zoomLevel = mapboxMap.getCameraPosition().zoom;

If I want to change zoom level I would do:

 mapboxMap.animateCamera(CameraUpdateFactory.zoomTo(zoomLevel));

However, latter will result with an exception because CameraUpdateFactory.zoomTo expects float

Looking at google documentation, I see that getCameraPosition actually holds zoom as float.
https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition#field-summary

Now, there might be pretty good reason for us changing this in Mapbox SDK and I would love to hear it, I just wasn't able to find the answer anywhere.

@1ec5 1ec5 added the Android Mapbox Maps SDK for Android label Mar 23, 2016
@tobrun
Copy link
Member

tobrun commented Mar 24, 2016

Our old system was build on doubles, the newer Camera API that mimics Google started with float and we are granularly trying to move back to double.

@tobrun tobrun added the bug label Mar 24, 2016
@tobrun tobrun added the SEMVER-MAJOR Requires a major release according to Semantic Versioning rules label Jun 21, 2016
@tobrun tobrun self-assigned this Nov 7, 2016
@tobrun tobrun added this to the android-v5.0.0 milestone Nov 7, 2016
@tobrun tobrun mentioned this issue Mar 17, 2017
10 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 bug SEMVER-MAJOR Requires a major release according to Semantic Versioning rules
Projects
None yet
Development

No branches or pull requests

3 participants