NouranMahmoud / GoogleMapTut

SitePoint tutorial on how to integrate Google maps into your Rails application
25 stars 25 forks source link

"wrong format" message when entering 30.055487, 31.279766 in reverse geocoding #1

Open levi-damian-gazoomobile opened 8 years ago

levi-damian-gazoomobile commented 8 years ago

While using the link you provided to test the app. But is woking when I am entering the same two values in maps.google.com What I am doing wrong here.

NouranMahmoud commented 8 years ago

Actually, you are not doing anything wrong, you just found a bug. The right format is (30.055487,32.279766) But after debugging I found that I was using the wrong regex format because it excludes zeros var regex = /([1-9])+\.([1-9])+\,([1-9])+\.([1-9])+/g; and it must be ([0-9])+\.([0-9])+\,([0-9])+\.([0-9])+ if you tried this one 31.155487,32.279766 it will just work fine because it has no zeros.

I'll update it, Thanks levi

levi-damian-gazoomobile commented 8 years ago

Hi,

Many thanks. Please let me know when is the update done so I can try again.

Levi.

On Jun 4, 2016, at 3:51 PM, Nouranology notifications@github.com wrote:

Actually, you are not doing anything wrong .. the right format is (30.055487,32.279766) But after debugging I found that I was using the wrong regex format because it excludes zeros var regex = /([1-9])+.([1-9])+\,([1-9])+.([1-9])+/g; and it must be ([0-9])+.([0-9])+\,([0-9])+.([0-9])+ if you tried this one 31.155487,32.279766 it will just work fine because it has no zeros.

I'll update it, Thanks levi

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NouranMahmoud/GoogleMapTut/issues/1#issuecomment-223774815, or mute the thread https://github.com/notifications/unsubscribe/ARt6x7FlhykXmfYJWFmTA_6Y80o3oi19ks5qIddHgaJpZM4IdZTA.