Hey Doug,

Have you tried:
info.open(map, marker);

The infowindow open function takes a optional second paramater which defines
the anchor, you can read more on the reference:
http://code.google.com/apis/maps/documentation/javascript/reference.html#InfoWindow

-- Luke


On Sun, Sep 26, 2010 at 1:52 PM, Dougx <[email protected]> wrote:

> 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.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to