Hi Patrick, how about:
google_query = URI::parse( params[:query_string] ).query
google_params = CGI::parse(google_query)
This will give you a Hash of all the URI parameters, including the
search string ''q'', and ''ll'' which is your
lat-long array.
--Andrew
On Feb 28, 2:36 pm, "Patrick Aljord"
<patc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> hey all,
> I have a google maps url posted by the user such as:
>
>
http://www.google.com/maps?hl=en&client=firefox-a&q=restaurants+sushi...
>
> is there a way to get all the paramaters (such as the q, the latlngt
> and whatever is needed) of that url and use them into the ym4r
> functions?
>
> thanx in advance
>
> PAt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---