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

[android]getMetersPerPixelAtLatitude #8990

Closed
Larnoo opened this issue May 13, 2017 · 4 comments
Closed

[android]getMetersPerPixelAtLatitude #8990

Larnoo opened this issue May 13, 2017 · 4 comments
Assignees
Labels
Android Mapbox Maps SDK for Android

Comments

@Larnoo
Copy link

Larnoo commented May 13, 2017

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?

@tobrun tobrun added the Android Mapbox Maps SDK for Android label May 15, 2017
@Larnoo
Copy link
Author

Larnoo commented May 18, 2017

@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?

@tobrun
Copy link
Member

tobrun commented May 19, 2017

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.

@tobrun
Copy link
Member

tobrun commented May 31, 2017

#9048 landed on the release branch

@tobrun tobrun closed this as completed May 31, 2017
@tobrun tobrun reopened this Jun 7, 2017
@tobrun
Copy link
Member

tobrun commented Jun 7, 2017

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

2 participants