d.bun
unread,Nov 30, 2009, 3:45:16 AM11/30/09Sign 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
I'm trying to have a infowindow anchored to a polygon. This is what
the reference says about opening infowindows:
open(map:Map, anchor?:MVCObject):
Opens this InfoWindow on the given map. Optionally, an InfoWindow can
be associated with an anchor. In the core API, the only anchor is the
Marker class. However, an anchor can be any MVCObject that exposes the
position property and optionally pixelBounds for calculating the
pixelOffset (see InfoWindowOptions).
I don't understand what and how to use an MVCObject. Is it possible
to either add position and pixelBounds properties to a polygon inorder
to anchor an infowindow to the polygon like:
polygon = new google.maps.Polygon(... position: position, pixelBounds:
pixelBounds)
infowindow.open(map, polygon)
- or is there someway of making a polygon out of an MVCObject?
Then the other questions are: the position property is that just
latLng? and pixelBounds, what do they mean and how do I retrieve them?