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

Get coordinates as an array before reversing.

This was causing an exception when `join` was called on the resulting
string.
parent 71ade291
No related branches found
No related tags found
No related merge requests found
...@@ -35,10 +35,10 @@ module Geocoder::Lookup ...@@ -35,10 +35,10 @@ module Geocoder::Lookup
def query_url_params(query) def query_url_params(query)
if query.reverse_geocode? if query.reverse_geocode?
{ {
:location => query.text.reverse.join(','), :location => query.coordinates.reverse.join(','),
:outFields => :*, :outFields => :*,
:p => :pjson :p => :pjson
}.merge(super) }.merge(super)
else else
{ {
:f => :pjson, :f => :pjson,
...@@ -49,4 +49,4 @@ module Geocoder::Lookup ...@@ -49,4 +49,4 @@ module Geocoder::Lookup
end end
end end
end end
\ No newline at end of file
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