Help: Center map on address and import database of markers

I want to have a section of my app that has a search by city option. Once the lua page loads I have a picker widget for displaying states, then if a state is chose it removes itself and loads a city widget based on that state. From there I currently am hard coding every major city’s GPS coordinates… there has to be a better way of doing this and I need more functionality. I’m a network engineer by trade so the software side is pretty new to me. 

 

 

Here is what I need… if someone can point me in the right direction:

 

-Choose state > choose city based on state

-Take the ‘state’+‘city’ and get a gps coordinate, unless this can be done another way

-clears widgets, then create a map that centers on this location

-imports a database of addMarkers to be displayed within the view, but option to move around map and click a button, which repopulates the map pulled from the external sql database.

 

 

I found documentation regarding openUrl for google maps, but wasn’t sure if I can populate it with specific markers. On top of this once the markers are clicked it will load a page for that specific location.

 

Justin Breed

I found sql databases for all states and cities I could use. I figure this would be better if I had the databases local to the phone instead of pulling from the server every time a user uses this section of the app. What is a good way to convert these cities.sql and states.sql to a sqllite database I can use in corona?

The sql file has the lat/long for each city.

I found sql databases for all states and cities I could use. I figure this would be better if I had the databases local to the phone instead of pulling from the server every time a user uses this section of the app. What is a good way to convert these cities.sql and states.sql to a sqllite database I can use in corona?

The sql file has the lat/long for each city.