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

Can not get current location marked on map #296

Closed psahni closed 10 years ago

psahni commented 11 years ago

Hi apnediving

I have wrote following in my view file:

<%= gmaps( {:map_options => { :disableDefaultUI => true, :auto_adjust => true, :container_id => "google_map", :center_on_user => true, :detect_location => true}}) %>

It is detecting the current location, but it is not marking it.

I have searched in your issues and read your wiki

Can not get it through.

Thanks in advance

psahni commented 11 years ago

I have also added this question on stackoverflow http://stackoverflow.com/questions/13539939/current-location-is-not-getting-marked-using-gmap4rails-gem

farmcp commented 11 years ago

I figured out how to do that, but it's a bit tricky. My problem is that I think it's refreshing too often.

http://stackoverflow.com/questions/13663311/how-often-does-browser-geolocation-callback-fire