Question

Is there a way to geocode a MySQL database, then display results on a Google Map? Tables are stored as zipcode, name, state, and address. I'm looking to see if there's a way to convert these to coordinates and display them on a map automatically using some sort of API or code.

Was it helpful?

Solution

https://developers.google.com/maps/documentation/javascript/geocoding

Essentially, you would pass the zipcode/some kind of concatenation of the address to the Geocode API, which would return you a result as a LatLng object/some address components. You can then use the marker object to display those results.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top