Displaying 2 results from an estimated 2 matches for "addy1".
Did you mean:
addr1
2014 Feb 06
0
Google Geolocation
Hi folks. Trying to get google-geo to work, but I am seeing errors.
#!/usr/bin/ruby
require 'Google-geo'
mykey = 'blahblahblah'
addy1 = '1600 Amphitheatre Parkway, Mountain View, CA' # 37.42246, -122.08394
geo = Google::Geo.new mykey
res = geo.locate addy1
puts res.coordinates
...and the error:
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- Google-geo (Lo...
2014 Feb 06
0
Array Confusion
I have the following instruction that returns an array that I'm quite confused about. I can't even read it. Can someone shed some light as to how to reach into this array of hashes (that's what I can see) to get the location lat and lon?
res = Geocoder.search(addy1)
This is the res:
[#<Geocoder::Result::Google:0x007fb46c345e18 @data={"address_components"=>[{"long_name"=>"1600", "short_name"=>"1600", "types"=>["street_number"]}, {"long_name"=>"Amphitheatre...