lib/geocoder/lookups/amap.rb in geocoder-1.4.9 vs lib/geocoder/lookups/amap.rb in geocoder-1.5.0
- old
+ new
@@ -10,15 +10,19 @@
def required_api_key_parts
["key"]
end
- def query_url(query)
- path = query.reverse_geocode? ? 'regeo' : 'geo'
- "http://restapi.amap.com/v3/geocode/#{path}?" + url_query_string(query)
+ def supported_protocols
+ [:http]
end
private # ---------------------------------------------------------------
+
+ def base_query_url(query)
+ path = query.reverse_geocode? ? 'regeo' : 'geo'
+ "http://restapi.amap.com/v3/geocode/#{path}?"
+ end
def results(query, reverse = false)
return [] unless doc = fetch_data(query)
case [doc['status'], doc['info']]
when ['1', 'OK']