No commit activity in last 3 years
No release in over 3 years
Rails helper for embed Google Maps.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.8
~> 0
~> 10.0
~> 0
 Project Readme

GoogleMapsRails

Gem Version Build Status

This is a simple library for embed google maps in your app rails

Installation

Add this line to your application's Gemfile:

gem 'google_maps_rails'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install google_maps_rails

Usage

Add the code, and create attributes, in local where you want embed the map.

Attribute Type Default value
lat String nil
long String nil
address String nil
width String 500
height String 500
# Lat and Long
embed_google_maps(lat: '-20.262197', long: '-54.799805')
# => return: <iframe src='https://maps.google.com/maps?q=-20.262197,-54.799805&amp;output=embed' frameborder='0' style='border:0' width='250' height='250' allowfullscreen></iframe>

# Address
embed_google_maps(address: 'address name and number, 5555')
# => return: <iframe src='https://maps.google.com/maps?q=name%20address%2C%205555&amp;output=embed' frameborder='0' style='border:0' width='250' height='250' allowfullscreen></iframe>

license

See Mit license http://luizpicolo.mit-license.org/

Contributing

  1. Fork it ( https://github.com/[my-github-username]/google_maps_rails/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request