apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.26k stars 382 forks source link

How to store the exact coordinates? #392

Closed webproworker closed 10 years ago

webproworker commented 10 years ago

Hello,

Seems like I can't store the exact coordinates in my mysql database, no matter what column type I set (decimal or even string and text). For example, whenever I enter the coordinates and save, the log says the parameters are okay (i.e. "23.3514404296875") but when inserting in the database, it looks like the number is somehow approximated (i.e. "23.3610241").

However, if I try to edit the item afterwards from my application, the coordinates are saved correctly.

Is this something gmaps4rails does before saving?

Thanks a lot! PS: I'm new to Rails

apneadiving commented 10 years ago

gmaps4rails doesnt do anything in particular with coordinates.

Anyway, I've dropped geocoding in v2, you'd rather use geocoder gem which is dedicated.

webproworker commented 10 years ago

Ok Benjamin, thanks..