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. Commented Dec 20, 2016 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
    Commented Dec 23, 2016 at 1:53
  • MarkerWithLabel. This webpage contains info about class MarkerWithLabel. Hope it's not too late. Commented Dec 26, 2016 at 20:25

1 Answer 1

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 .