I am new to JS and the Google API and I am trying to make multiple markers each with a label.
From little snippets I've been looking at, there was no simple way to attach a label to a marker in Google Maps API v3. Between Google and stackoverflow searches, everyone used a roundabout procedure that involved creating or editing the label class.
I just want to figure out how to attach a label to each marker in a simple way since I am just starting to learn JS/ Google API v3.
Thanks
EDIT #3: Okay I finally figured out what was wrong and correctly implemented multiple markers with labels using Lilina's code. Apparently we both defined the var map differently and that itself makes both our codes unable to synchronize well.
I have an additional question now that I am able to use labels for each marker. I want to be able to hide markers and their labels based on the zoom level that the user is at.
Google Maps API v3 - Different markers/labels on different zoom levels
See Question&Answers more detail:os