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

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

Closed

Description

@dariav

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.

Activity

  1. added
    Android
    on Mar 23, 2016
  2. tobrun commented on Mar 24, 2016

    @tobrun
    Member

    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.

  3. added
    SEMVER-MAJOR
    on Jun 21, 2016
  4. self-assigned this
    on Nov 7, 2016
  5. added this to the android-v5.0.0 milestone on Nov 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

AndroidSEMVER-MAJORbug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions