-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
coordinateForPoint inaccurate for Android. #2395
Comments
There's already a PR for that (#2390)
|
@danielgindi thank you so much for the work around. Saved me a ton of time. Looking forward to the PR. Appreciate your contribution to this library as well. |
Duplicate of #2390 |
@danielgindi Thanks man, you saved my life! |
@cklinx This is actually old, and the "next" module version is here. If you upgrade, you do not need this workaround :-) |
Is this a bug report?
Yes.
Have you read the Installation Instructions?
Yes.
Environment
react-native: 0.55.3
react: 16.3.1
react-native-maps: "git+https://github.com/react-community/react-native-maps.git"
Steps to Reproduce
Expected Behavior
The circle generated should generate a list of x/y points in relation to the screen, and then run each through the function coordinateForPoint attached to the map ref. These points will then generate a polyline that resemble exactly where on the map the circle was drawn with your finger.
Then, the coordinateForPoint function should reliable cast a Point as a Coordinate.
Actual Behavior
On android only, this does not work. Instead, the polyline is cast on a different part of the screen (lower and to the right). I think this is a bug with coordinateForPoint because it should be comparing reliably to the mapview visible on the screen, but seems to be casting on a larger view (off-screen).
Unfortunately, I cannot give screenshots, but I created an expo example.
Reproducible Demo
I have built a working example to explain how it is supposed to work. However, I don't think expo has the most recent react-native-maps version and "coordinateForPoint" does not seem to exist when testing on Android.
When testing on IOS it displays what should (mostly) happen. The circle is a polyline drawn from coordinates generated through coordinateForPoint (I am not sure why the red line connects all of them, but its irrelevant for arguments sake).
https://snack.expo.io/@jamiesonbates/react-native-maps-coordinateforpoint-example
The text was updated successfully, but these errors were encountered: