v2 infoWindowAnchor alternative in v3

844 views
Skip to first unread message

Jan

unread,
Feb 10, 2012, 10:55:27 AM2/10/12
to Google Maps JavaScript API v3
I want my InfoWindow to open on a specific point of my custom Marker.
In v2 this was easy by using the infoWindowAnchor property of GIcon();

I searched for a way to do this in v3 but so for no success :
MarkerImage doesn't have this property nor any other with a similar
functionality.

I want the InfoWindow to point at the anchor of the MarkerImage
(middle bottom) but there seems no way to get this value from the
Marker. marker.getIcon(). ... ? (anchor property seems not
accessible)

Is there another way to do this or will an InfoWindow always open with
the tip just above the marker?

Thanks in advance!

Dave Medlicott

unread,
Feb 10, 2012, 6:25:03 PM2/10/12
to google-map...@googlegroups.com
Look at the InfoWindowsOptions object for the pixelOffset. A positive number in the height of the Size will move it down the y axis. e.g.

info = new google.maps.InfoWindow({content: "here is my info text",pixelOffset: new google.maps.Size(0,30)});

Dave
Reply all
Reply to author
Forward
0 new messages