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

Get directions Android Physical device #19

Closed
janvdt opened this issue Feb 19, 2018 · 13 comments
Closed

Get directions Android Physical device #19

janvdt opened this issue Feb 19, 2018 · 13 comments
Labels
invalid Not a react-native-maps-directions issue

Comments

@janvdt
Copy link

janvdt commented Feb 19, 2018

When trying to get directions between 2 points i seem to get a response from Google Directions API. But my console logs this error

--------- beginning of crash 02-16 12:07:46.385 10186-10186/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.Paxi, PID: 10186 com.facebook.react.bridge.UnexpectedNativeTypeException: Tried to read an int, but got a non-integral double: 20.571429

Any idea on this? this is when running on android physical device

@bramus
Copy link
Owner

bramus commented Feb 19, 2018

I have an app in the Play Store with react-native-maps-directions and it runs just fine on Android …

Could you detail which versions of the following are you using:

  • Android
  • React Native
  • react-native-maps
  • react-native-maps-directions

@8Ozymandias
Copy link

@bramus For that app you have in the app store that is able to make use of the react-native-maps-directions, what version of Android, React Native and react-native-maps and react-native-maps-directions did you utilize in order to make it work?

@bramus
Copy link
Owner

bramus commented Mar 7, 2018

@janvdt Can you provide some more info on this? Otherwise I'm going to close this issue as there's not enough info for me to work with.

@bramus
Copy link
Owner

bramus commented Mar 7, 2018

@8Ozymandias react-native-maps-directions has been tested with react-native-maps 0.16 and higher. That version of react-native-maps is compatible with react-native 0.47.0 or higher.

Do note that react-native-maps 0.20.1 is not compatible with the newly released react-native 0.54.0. A hotfix has landed in their master though (See react-native-maps/react-native-maps#2053)

@bramus
Copy link
Owner

bramus commented Mar 29, 2018

Closing due to inactivity / insufficient information.

Feel free to add some more info and I'll gladly reopen.

@bramus bramus closed this as completed Mar 29, 2018
@yogeshmoradiya121
Copy link

this issue happen in android kit kat 4.4.2 can anyone solve this??

@MariamMobeen
Copy link

I get this issue in Android version 7.1. Did you find the solution for it?

@nomoreboredom
Copy link

react-native-maps version 0.20.1, react-native v 0.53.3, android api23, react-native-maps-directions 1.6 the same as above

@nomoreboredom
Copy link

nomoreboredom commented Feb 13, 2019

Which is occurring if edgePadding is used on onReady for fitToCoordinates function, with decimal values

@bramus
Copy link
Owner

bramus commented Feb 13, 2019

Thanks for the extra info @nomoreboredom.

Can you provide a full example somewhere (a gist or repo) in which the issue can be reproduced? That way I can help pinpointing the source of the problem.

@nomoreboredom
Copy link

nomoreboredom commented Feb 13, 2019

Sorry man, private repo but I was getting Screen Width and was using sth like Dimensions.width / 30, and if this number results in a decimal number, edgePadding was throwing error. Applying Math.floor fixed the issue for me

@bramus
Copy link
Owner

bramus commented Feb 13, 2019

Looks like it’s a problem with react-native-maps itself then. As the error mentions: it requires an int somehwere, but receives a double.

@bramus bramus added invalid Not a react-native-maps-directions issue and removed more info needed labels Feb 13, 2019
@SevdaCimen
Copy link

Sorry man, private repo but I was getting Screen Width and was using sth like Dimensions.width / 30, and if this number results in a decimal number, edgePadding was throwing error. Applying Math.floor fixed the issue for me

yes thats works on me !thanks

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Not a react-native-maps-directions issue
Projects
None yet
Development

No branches or pull requests

7 participants