Geolocation Brasil data populate select box based on location


I want to use geolocation and populate the city into a select box based on the actual location from Brasil.

I would create a new sql table to relate the actual with cities table where the cities would have latitude and longitude.

I can not find this data available, i ask if anyone already know where i can get this information (latitude, longitude from brazilina cities).

Also if this is the best way to go.

Thank´s in advance

have you tried OpenStreetMap?

1 Like

i would never store those values because they are static and available through some api.

Easiest way --> pass the current location to google maps api to get the country and complete address --> so you can simply check if the person is in brazil and where :wink:

1 Like

can i populate a select box with cities so the actual city will be populated? that is what i will look for. I will try this tutorial :

Thank´s a lot (obrigado!!)

did not knew about it ! very interesting !