Skip to content
Snippets Groups Projects
Commit 66fabc8d authored by Alex Reisner's avatar Alex Reisner
Browse files

Add Google URL parameters that recently became required.

parent 4825b5af
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,7 @@ module Geocoder
##
# Fetch coordinates based on the object's location.
# Returns an array <tt>[lat,lon]</tt>.search
# Returns an array <tt>[lat,lon]</tt>.
#
def fetch_coordinates
location = send(self.class.geocoder_options[:method_name])
......@@ -225,7 +225,13 @@ module Geocoder
# Request an XML geo search result from Google.
#
def self._fetch_xml(query)
params = { :q => query, :output => "xml" }
params = {
:q => query,
:key => GOOGLE_MAPS_API_KEY,
:output => "xml",
:sensor => "false",
:oe => "utf8"
}
url = "http://maps.google.com/maps/geo?" + params.to_query
# Query geocoder and make sure it responds quickly.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment