Hi, Ive used this link to create google maps in my rails app. I have a few questions. This example uses a US Geocoder to find the latitude and Longtitude of an address. Is there 1 available for the UK from google or any other service thats free? I takes a couple of seconds to get the latitude and longitude from the geocoder, is it better to hold the latitude and longtitude in the database? Does anyone know where i can find a UK website that will provide me with the latitude and longtitude of a UK address? Ive looked around the internet and streetmap.co.uk gives you the latitude & Longtitude for a particular postcode, not the exact address. Any suggestions would be gretfull. -- 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 -~----------~----~----~----~------~----~------~--~---
njmacinnes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Aug-24 11:37 UTC
[Rails] Re: Google Maps Questions
There is no data on precise co-ordinates of individual addresses, but post codes are pretty accurate... average of 13 addresses per postcode as far as I can remember. A good place to go for co-ordinates is here: http://www.samknows.com/toys/coords.php?output=xml&pc=se270nb,sw47ln,s118th,s101nu You can list the postcodes seperated by commas as I''ve shown, and it gives you a nice XML output of postcodes with their co-ordinates. On 24/08/06, John Butler <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi, > > Ive used this link to create google maps in my rails app. I have a few > questions. > > This example uses a US Geocoder to find the latitude and Longtitude of > an address. > Is there 1 available for the UK from google or any other service thats > free? > > I takes a couple of seconds to get the latitude and longitude from the > geocoder, is it better to hold the latitude and longtitude in the > database? > Does anyone know where i can find a UK website that will provide me with > the latitude and longtitude of a UK address? > > Ive looked around the internet and streetmap.co.uk gives you the > latitude & Longtitude for a particular postcode, not the exact address. > > Any suggestions would be gretfull. > > -- > 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 -~----------~----~----~----~------~----~------~--~---
yes on the question to store the lat and long in the database. that way, geocode is executed once instead of everytime someone accesses the google map. John Butler wrote:> Hi, > > Ive used this link to create google maps in my rails app. I have a few > questions. > > This example uses a US Geocoder to find the latitude and Longtitude of > an address. > Is there 1 available for the UK from google or any other service thats > free? > > I takes a couple of seconds to get the latitude and longitude from the > geocoder, is it better to hold the latitude and longtitude in the > database? > Does anyone know where i can find a UK website that will provide me with > the latitude and longtitude of a UK address? > > Ive looked around the internet and streetmap.co.uk gives you the > latitude & Longtitude for a particular postcode, not the exact address. > > Any suggestions would be gretfull.-- 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 -~----------~----~----~----~------~----~------~--~---
koloa wrote:> yes on the question to store the lat and long in the database. that way, > geocode is executed once instead of everytime someone accesses the > google map.I run a cron job to populate the database with geocode info every night, that way data can be added to the database without the potential lag of a geocode lookup. Any record that doesn''t have long/lat fields does a geocode api query . -- 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 -~----------~----~----~----~------~----~------~--~---
Chris Lowis wrote:> koloa wrote: >> yes on the question to store the lat and long in the database. that way, >> geocode is executed once instead of everytime someone accesses the >> google map. > > I run a cron job to populate the database with geocode info every night, > that way data can be added to the database without the potential lag of > a geocode lookup. Any record that doesn''t have long/lat fields does a > geocode api query .Both Yahoo and Google offer Geocoding. Give those a shot. http://developer.yahoo.com/maps/rest/V1/geocode.html http://www.google.com/apis/maps/documentation/ -- 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 -~----------~----~----~----~------~----~------~--~---
John Butler wrote:> Is there 1 available for the UK from google or any other service thats > free?There is a duscussion about UK codes here http://drupal.org/node/19482 Try these links as well http://gabriel.gironda.org/articles/2005/12/01/geolocation-in-ruby-on-rails http://www.onrails.org/articles/2006/06/01/geoip-data If you have a decent budget, the data can be purchased http://www.datadepot.co.uk/dept.asp?level=2&id=2250 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---