Hello, I just installed the plugin to help me display google maps in my rails application. I checked out the site, but am having trouble understanding what is what etc..(im slow in the head) i am going through the code and know that my ruby skills is infant compared to what is going on. my main question is does YM4R have a function that i can use to pass in an address and return me a google map? if not, i can use another example i found online that fetches the latitude and longitude after giving it a address, and then i can just pass the lat and long to YM4R to get the google map. thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 8/22/06, koloa <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hello, > I just installed the plugin to help me display google maps in my rails > application. I checked out the site, but am having trouble understanding > what is what etc..(im slow in the head) > > i am going through the code and know that my ruby skills is infant > compared to what is going on. my main question is does YM4R have a > function that i can use to pass in an address and return me a google > map?No, you need to geocode the address first, although Ym4r does come with google/yahoo geocoding methods. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hi snacks, what does one do with these geocoding methods that are available with the plugin? snacktime wrote:> On 8/22/06, koloa <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> >> Hello, >> I just installed the plugin to help me display google maps in my rails >> application. I checked out the site, but am having trouble understanding >> what is what etc..(im slow in the head) >> >> i am going through the code and know that my ruby skills is infant >> compared to what is going on. my main question is does YM4R have a >> function that i can use to pass in an address and return me a google >> map? > > No, you need to geocode the address first, although Ym4r does come > with google/yahoo geocoding methods.-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 8/22/06, koloa <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > hi snacks, what does one do with these geocoding methods that are > available with the plugin?There are samples in the documentation. I don''t have a sample handy as I used it once but we are using the perl version now. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
snacktime wrote:> On 8/22/06, koloa <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> >> >> hi snacks, what does one do with these geocoding methods that are >> available with the plugin? > > There are samples in the documentation. I don''t have a sample handy > as I used it once but we are using the perl version now.Here is a sample where I pass a zip code only: geocode = Geocoding::get(order.zip_code) #Check to see if it was a good result or not! if geocode.status == Geocoding::GEO_SUCCESS then ... #Get the coords and store them or create a marker with them. order.latitude = geocode[0].latitude order.longitude = geocode[0].longitude order.save ... else #You may have a bad zip/address ... end You then can create your markers with the lat/long coords. I think you need the Gem for the geocode functions (separate from the plugin) Hope this helps. On his website (YM4R) he has two tutorials that are extremely helpful. Michael -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---