My Rails application (Rails: V 2.1.0, Ruby: V 1.8.6) has on it, the ability for users to submit stories with their address information, which *will* be atomised into appropriate fields. A front end form allows users to submit stories, these stories are saved into a database table. They are then approved by my client and are displayed on a map. Currently, this map is static and has to be changed by my client and re-embedded every time a story, with a postcode, is submitted. So, the map displays markers in the position of the postcode that is submitted with the story. My question is: what would you recommend as the most effective way to automate this process to omit the need for my client to re-embed this code? If my request is not clear, please post whatever else you may need. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You can use geokit (http://github.com/andre/geokit-gem) + ( http://github.com/andre/geokit-rails) to geocode the story location and then use the YM4R-GM plugin to display the geocoded locations on a google map ( http://github.com/queso/ym4r-gm) . This article might be a bit dated, but it goes how you can interact with the YM4R-GM plugin: http://www.developer.com/open/article.php/3757576/Adding-Google-Maps-To-Your-Rails-Applications.htm On Thu, Jul 22, 2010 at 7:39 AM, Pale Horse <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> My Rails application (Rails: V 2.1.0, Ruby: V 1.8.6) has on it, the > ability for users to submit stories with their address information, > which *will* be atomised into appropriate fields. > > A front end form allows users to submit stories, these stories are saved > into a database table. They are then approved by my client and are > displayed on a map. > > Currently, this map is static and has to be changed by my client and > re-embedded every time a story, with a postcode, is submitted. So, the > map displays markers in the position of the postcode that is submitted > with the story. > > My question is: what would you recommend as the most effective way to > automate this process to omit the need for my client to re-embed this > code? > > If my request is not clear, please post whatever else you may need. > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Patrick Robertson wrote:> You can use geokit (http://github.com/andre/geokit-gem) + ( > http://github.com/andre/geokit-rails) to geocode the story location and > then > use the YM4R-GM plugin to display the geocoded locations on a google map > ( > http://github.com/queso/ym4r-gm) . > > This article might be a bit dated, but it goes how you can interact with > the > YM4R-GM plugin: > http://www.developer.com/open/article.php/3757576/Adding-Google-Maps-To-Your-Rails-Applications.htmDoes this generate a new map with each post code that I will pass or will it add a marker to the existing map? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
a = Geokit::Geocoders::YahooGeocoder.geocode "#{ModelName.first.address}" a.ll The above works in my console and returns the latitude and longitude as requested. I cannot get this to work in my (development) application. When I attempt to run "script/plugin install svn://rubyforge.org/var/svn/ym4r/Plugins/GM/trunk/ym4r_gm", it returns "svn: not found". I assume this is a result of me missing subversion. Is there another way to install this plugin. Alternatively, can anyone tell me any better ways of finding the geocode from an address or postcode? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> > I assume this is a result of me missing subversion. Is there another wayto install this plugin. Alternatively, can anyone tell me any better ways of finding the geocode from an address or postcode? http://github.com/queso/ym4r-gm is a port onto github that I''ve used in the past. If your model is using geokit (acts_as_mappable) , lat/lng are attributes from a provided address. Otherwise you have to geocode from calling that geocode method. acts_as_mappable provides convenience on top ActiveRecords find method as well for a geocodable model. On Fri, Jul 23, 2010 at 9:07 AM, Pale Horse <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> a = Geokit::Geocoders::YahooGeocoder.geocode > "#{ModelName.first.address}" > a.ll > > The above works in my console and returns the latitude and longitude as > requested. I cannot get this to work in my (development) application. > > When I attempt to run "script/plugin install > svn://rubyforge.org/var/svn/ym4r/Plugins/GM/trunk/ym4r_gm", it returns > "svn: not found". > > I assume this is a result of me missing subversion. Is there another way > to install this plugin. > > Alternatively, can anyone tell me any better ways of finding the geocode > from an address or postcode? > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Patrick Robertson wrote:> > I assume this is a result of me missing subversion. Is there another way to install this plugin. > > Alternatively, can anyone tell me any better ways of finding the geocode from an address or postcode? > > http://github.com/queso/ym4r-gm is a port onto github that I''ve used in > the > past. > > If your model is using geokit (acts_as_mappable) , lat/lng are > attributes > from a provided address. Otherwise you have to geocode from calling > that > geocode method. acts_as_mappable provides convenience on top > ActiveRecords > find method as well for a geocodable model.Installing the plugin from that port causes an error: script/plugin install http://github.com/queso/ym4r-gm + ./opensearch.xml Plugin not found: ["http://github.com/queso/ym4r-gm"] Is there a way to produce the process of automatically adding custom markers with info-windows onto Google Maps without a plugin or gem using a provided address and postcode? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Pale Horse wrote: [...]> Installing the plugin from that port causes an error: > > script/plugin install http://github.com/queso/ym4r-gm > + ./opensearch.xml > Plugin not found: ["http://github.com/queso/ym4r-gm"]You may need to tack ".git" on to the end of that URL. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser wrote:> Pale Horse wrote: > [...] >> Installing the plugin from that port causes an error: >> >> script/plugin install http://github.com/queso/ym4r-gm >> + ./opensearch.xml >> Plugin not found: ["http://github.com/queso/ym4r-gm"] > > You may need to tack ".git" on to the end of that URL. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.orgThank you, Marnen. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.