This is gem for help to point on google map. You can marker your address and search your location
gem 'gmpoint', git: 'git@github.com:dangluan/gmpoint.git'
bundle
rails g gmpoint:install
rails g gmpoint MODEL
rake db:migrate
<%= google_map_api_js("your google api key") %>
.....
//= require locations
.....
<%= show_map_helper your_model %>
Example:
<%= show_map_helper user %>
<%= show_map_helper user, {width: 400, height: 200} %>
<%= show_map_helper user, {searchbox_width: 300} %>
<%= show_map_helper user, {searchbox: 'show', width: 400, height: 200, searchbox_width: 300} %>
and when you want to hide the search box
<%= show_map_helper user, {searchbox: 'none', width: 400, height: 200, searchbox_width: 300} %>
<%= show_map_helper user, {allow: 'show', searchbox: 'none', width: 400, height: 200, searchbox_width: 300} %>
and when you want to point
<%= show_map_helper user, {allow: 'point', searchbox: 'none', width: 400, height: 200, searchbox_width: 300} %>
Example:
<%= show_map_helper user, {width: 400, height: 200, searchbox_width: 300} %>
<%= show_map_helper user, {latitude: 1.3028, longitude: 103.35, allow: 'show', searchbox: 'none', width: 400, height: 200, searchbox_width: 300} %>
<%= show_map_helper user, {zoom: 10, latitude: 1.3028, longitude: 103.35, allow: 'show', searchbox: 'none', width: 400, height: 200, searchbox_width: 300} %>