Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] getPointInView does not return density-independent pixels #1167

Open
frankrowe opened this issue Apr 9, 2018 · 1 comment
Open

Comments

@frankrowe
Copy link
Contributor

frankrowe commented Apr 9, 2018

Not sure when this change was introduced, but the getPointInView method on Android now returns actual screen resolution pixels, not density-independent pixels.

I'm using the following fix in my app, but this should probably be fixed in the library.

let point = await this._map.getPointInView(coordinate);
if (Platform.OS === 'android') {
  point = point.map(x => x / PixelRatio.get());
}
@anastely
Copy link

anastely commented Dec 9, 2019

when i follow it i got

this._map.getPointInView is not a function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants