2

I just tried creating an Event on EventBrite and they have this nice autocomplete input for cities (start typing "san" and it will bring up "San Francisco, California..." and a list of others).

What's the best way to do that? Do you need to store that in a local database or do people make those ajax calls to something like google maps or yelp?

And is there a component/project for this in Rails??

Matt
  • 22,721
  • 17
  • 71
  • 112
Lance
  • 75,200
  • 93
  • 289
  • 503

1 Answers1

4

I did something like that with this database :

http://www.geonames.org/export/

But you can also use their webservices if you don't want to have a local database.

You won't be able to call google or even geonames with ajax because you can't do cross-domain request, you'll have to do the request on the server-side.

remi bourgarel
  • 9,231
  • 4
  • 40
  • 73