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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top