Skip to content
Snippets Groups Projects
Commit d5dcaf58 authored by Steve Hoeksema's avatar Steve Hoeksema Committed by Alex Reisner
Browse files

Add Google precision attribute to result object

parent fe488358
No related branches found
No related tags found
No related merge requests found
......@@ -82,5 +82,9 @@ module Geocoder::Result
def geometry
@data['geometry']
end
def precision
geometry['location_type'] if geometry
end
end
end
......@@ -26,6 +26,12 @@ class ServicesTest < Test::Unit::TestCase
assert_equal nil, result.city
end
def test_google_precision
result = Geocoder.search("Madison Square Garden, New York, NY").first
assert_equal "ROOFTOP",
result.precision
end
# --- Yahoo ---
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment