Skip to content

Instantly share code, notes, and snippets.

@DGaffney
Created January 26, 2011 23:20
Show Gist options
  • Select an option

  • Save DGaffney/797734 to your computer and use it in GitHub Desktop.

Select an option

Save DGaffney/797734 to your computer and use it in GitHub Desktop.
ruby-1.8.7-p330 :001 > include Geokit::Geocoders
=> Object
ruby-1.8.7-p330 :002 > gg = "Antwerpen, Vlaams Gewest, Belgie"
=> "Antwerpen, Vlaams Gewest, Belgie"
ruby-1.8.7-p330 :003 > geocode = GoogleGeocoder.geocode(gg)
=> #<Geokit::GeoLoc:0x1052f8a40 @province="Antwerp", @street_address=nil, @precision="city", @country_code="BE", @country="Belgium", @all=[#<Geokit::GeoLoc:0x1052f8a40 ...>], @lng=4.39625, @full_address="Antwerp, Belgium", @state="Flemish Region", @suggested_bounds=#<Geokit::Bounds:0x1051e15d0 @ne=#<Geokit::LatLng:0x1051e1440 @lng=4.6523688, @lat=51.3316021>, @sw=#<Geokit::LatLng:0x1051e1508 @lng=4.1401312, @lat=51.1079663>>, @zip=nil, @accuracy=4, @lat=51.21992, @success=true, @provider="google", @city="Antwerp">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment