Dougx
unread,Sep 25, 2010, 11:52:30 PM9/25/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Maps JavaScript API v3
Hi,
I'm having some trouble with the maps api; specifically, I can't get
my InfoWindows to appear correctly.
This is the code I'm using presently:
google.maps.event.addListener(marker, 'mousedown', function()
{
var content = "Hello World";
var info = new google.maps.InfoWindow({
'content' : content,
'position' : pos
});
info.open(map);
info.setZIndex(10);
});
That works perfectly, but the info window is appearing bound to the
bottom of the marker, which looks bad; I want it to appear above the
marker.
So, I've tried a couple of variations like:
info.open(marker);
and:
var info = new google.maps.InfoWindow({
'content' : content,
'position' : pos,
'pixelOffset' : 10
});
and:
var info = new google.maps.InfoWindow({
'content' : content,
'position' : pos,
'pixelOffset' : new google.maps.Size(10,0)
});
...but, in all of the above cases, my InfoWindow simply never shows
up.
To be clear; it _does_ show up with the default options; but that's
all.
Anyone know what I might be doing wrong here?
cheers,
Doug.