Skip to content

Instantly share code, notes, and snippets.

@divoxx
Created February 24, 2010 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save divoxx/313991 to your computer and use it in GitHub Desktop.
Save divoxx/313991 to your computer and use it in GitHub Desktop.
geo = GoogleGeocoding::Geocoder.new(:app_key => YOUR_API_KEY, :user_agent => YOUR_USER_AGENT)
res = geo.query("Union Square, San Francisco, CA")
res.placemarks # => [#<GoogleGeocoding::Placemark:0x100629598 @country_code="US", @country_name=["USA", "US"], @city="San Francisco", @accurracy=4, @coordinates=[-122.4074374, 37.7879938], @region="CA">]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment