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 get the city #287

Closed fillipenorton closed 11 years ago

fillipenorton commented 11 years ago

Hi!

Is there some way to get the user city through the geolocation ?

Thanks for attetion!

Bye

apneadiving commented 11 years ago

What do you mean? through html geolocation + javascript or using acts_as_gmappable ?

fillipenorton commented 11 years ago

Well, i don't know the better way.

I'd like to save the current city of my website user, and now i'm using the geolocatoin. And i want know if there is some way to detect his city automatically.

apneadiving commented 11 years ago

you should head towards javascript.

The gem will only give you lat/lng of the user so you should use another tool for this purpose.