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.

[android]getMetersPerPixelAtLatitude #8990

Closed

Description

@Larnoo

Platform: android
Mapbox SDK version: 5.0.0

Steps to trigger behavior

  1. getMetersPerPixelAtLatitude()is 300. This means 1px is 300 meters?
    Or 1dp is 300 meters?

I test result may be that 1dp is 300 meters.

But why the method name is PerPixel?

Activity

  1. added
    Android
    on May 15, 2017
  2. Larnoo commented on May 18, 2017

    @Larnoo
    Author

    @tobrun getMetersPerPixelAtLatitude document said that Returns the distance spanned by one pixel at the specified latitude and current zoom level. The one pixel means 1dp or 1px? Can you tell me?

  3. tobrun commented on May 19, 2017

    @tobrun
    Member

    It should be 1px as the documentation and API would indicate. That said, I'm not seeing the required conversion in place to actually convert dp to px. Thank you for the report @Larnoo.

  4. added this to the android-v5.1.0 milestone on May 19, 2017
  5. self-assigned this
    on May 22, 2017
  6. tobrun commented on May 31, 2017

    @tobrun
    Member

    #9048 landed on the release branch

  7. reopened this on Jun 7, 2017
  8. tobrun commented on Jun 7, 2017

    @tobrun
    Member

    Reopening this, after cross comparing other bindings it seems that the assumptions in OP aren't correct. Going to revert this change before a final release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Android

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions