Consider pixel density in coordinate<->point conversion (Android)#2390
Consider pixel density in coordinate<->point conversion (Android)#2390alvelig merged 1 commit intoreact-native-maps:masterfrom
Conversation
There was a problem hiding this comment.
I applied these changes to my local node module and was unable to build for android.
I believe this line needs read final double density = (double) [context.getResources().getDisplayMetrics().density;
Once I made this change to the local file, I was able to build. I can also confirm that the PR's code does fix the issue described for android.
jamiesonbates
left a comment
There was a problem hiding this comment.
Line 146 needs to be declared with "final" otherwise the build fails with a scope error.
|
Thanks, fixed! |
jamiesonbates
left a comment
There was a problem hiding this comment.
I can validate that this PR solves the inaccuracy problem on Android, and does not affect IOS. Everything works as expected. We are using this updated coordinateForPoint in production now. (we have pinned a master version and added critical bug fixes like this).
|
There are no releases since April, seems like the guys are busy :-) |
|
LGTM @alvelig 🐽 |
|
LGTM |
Consider pixel density in coordinate<->point conversion (Android)
Does any other open PR do the same thing?
Nope
What issue is this PR fixing?
pointForCoordinateandcoordinateForPointuse raw pixel values, which is inconsistent with other functions and with iOS implementation.How did you test this PR?
This affects Android code only, and was tested locally in a sample app.