As a beginner in using the Google Maps API, I have successfully integrated a Google Map into my project. However, I am struggling to figure out how to set specific addresses on the map. I have a list of 2,000 entries in a database, each including an address, and I possess all the necessary data to display these addresses on the map upon loading the description page. Despite this, I am unsure about the process. Can someone provide me with a simple example of setting the address, city, state, zip code, and adding a marker on the map?
Furthermore, I am uncertain if I need to geocode the addresses since I have each component (zip, city, state, etc.) separated. Is geocoding only beneficial for converting complex or unformatted addresses into coordinates, thus facing limitations on the number of geocoding requests allowed by Google Maps? In other words, can't I set an address without being restricted by these geocoding limits if I already have all the address components stored in the database?
For instance, take the following address:
123 Flower Street, Miami, Florida 32826
This is what my current JavaScript looks like:
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
I would greatly appreciate any suggestions or guidance!
Thank you very much in advance!