Module: GoogleMapFrame

Defined in:
lib/googleMap.rb

Class Method Summary collapse

Class Method Details

.generateiframe(address) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/googleMap.rb', line 3

def self.generateiframe(address)
add = address.tr!(' ', '+')
add1 = address.gsub!(/,/, ',+')
puts add1

generatedFrame = '<iframe width="940" height="320" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q='+add1+'&amp;t=m&amp;output=embed"></iframe>'
puts generatedFrame
return generatedFrame
end