0

I seem to have solved pset8, but still have some questions.

First, I want to add city name and state name to my marker. I used the label property, but now the words are in the marker, not around it (i.e. under the marker). It looks like the picture below on my map: enter image description here

Second, in the code below, what does title mean? What is its function?

var marker = new google.maps.Marker({
        position: position,
        map: map,
        icon: image,
        label: label,
        title: ???
    });
3
  • I solved the first problem by using "MarkerWithLabel" and set the labelAnchor. Dec 20 '16 at 21:47
  • Hi, Shao. I'm also doing this part. Could you post the link about the usage of MarkerWithLabel? Thank you!
    – Kevin King
    Dec 23 '16 at 1:53
  • MarkerWithLabel. This webpage contains info about class MarkerWithLabel. Hope it's not too late. Dec 26 '16 at 20:25
0

From the Google Maps APIs Markers doc:

The marker's title will appear as a tooltip.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .