Nick
Nick

Reputation: 201

Google maps api v3 infowindow position in custom image

I implemented the v3 of google maps in my site. I created custom images to show points on the map.

One of the custom images is 120px X 120px size and i would like to point the arrow of infowindow in the center of this image and not on the top middle.

How can i do that?

Upvotes: 13

Views: 21061

Answers (1)

Heitor Chang
Heitor Chang

Reputation: 6067

Try using the pixelOffset option in InfoWindowOptions.

    myinfo = new google.maps.InfoWindow({ 
      content: "my content",
      pixelOffset: new google.maps.Size(0, 60)
    });
    myinfo.open(map, marker);

Positive y-offset values send the InfoWindow down.

Upvotes: 43

Related Questions