This class lets you add an info window to the map which mimics
GInfoWindow
and allows for users to skin it via CSS.
Additionally it has options to pull in HTML content from an ajax request,
triggered when a user clicks on the associated marker.
This class is used to create a custom info window that will mimic the
behavior of the standard GInfoWindow
. Additionally this class
lets you easily theme your GInfoWindow
through CSS id attributes
and even asynchronously pull content from a supplied url in the
constructor options, giving the user a more control over every aspect of
the GInfoWindow
. ExtInfoWindow
has no constructor. It is
created by GMarker.openExtInfoWindow
.
Methods | Return Value | Description |
---|---|---|
resize() |
None |
Recalculate the size of the info window and reposition the map if required.
This method is important to use if you are doing any kind of manipulation
on the contents of an ExtInfoWindow prior to it opening or
updating via ajax. |
This class represents optional arguments to the ExtInfoWindow
constructor. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties | Type | Description |
---|---|---|
ajaxUrl |
String |
A string of the url where the
ExtInfoWindow should request HTML data. Notice that, since the
XmlHttpRequest object is used to execute the request, it is subject to
the same-origin restriction of cross-site scripting, i.e. the URL must
refer to the same server as the URL of the current document that executes
this code. NOTE: content returned is assumed to be valid HTML content. |
beakOffset |
Number |
The number of pixels a the beak, or pointer
end, of the ExtInfoWindow should be moved up vertically. This is
useful when working with an ExtInfoWindow with a border. The default value is 0 . |
paddingX |
Number |
The number, in pixels, that
ExtInfoWindow should pad on the left and right sides when
positioning itself inside the viewable map region. The default value is 0 . |
paddingY |
Number |
The number, in pixels, that
ExtInfoWindow should pad on the top and bottom sides when
positioning itself inside the viewable map region. The default value is 0 . |
These are the new methods added on to the GMap2
class. For
further details on the GMap2
class please visit the official
Google Maps API documents.
Methods | Return Value | Description |
---|---|---|
closeExtInfoWindow() |
None |
Closes the ExtInfoWindow currently open on the map. |
getExtInfoWindow() |
ExtInfoWindow |
Returns the instance ExtInfoWindow currently open on the map, or
null if none exists. |
Events | Arguments | Description |
---|---|---|
extinfowindowbeforeclose |
None |
This event is fired before the ExtInfoWindow closes. |
extinfowindowclose |
None |
This event is fired when the ExtInfoWindow closes. The event
extinfowindowbeforeclose is fired before this event. |
extinfowindowopen |
None |
This event is fired when the ExtInfoWindow opens. |
extinfowindowupdate |
None |
This event is fired when the ExtInfoWindow is done pulling in new content from its ajax request. |
These are the new methods added on to the GMarker
class. For
further details on the GMarker
class please visit the official
Google Maps API documents.
Methods | Return Value | Description |
---|---|---|
closeExtInfoWindow(map) |
None |
Closes the ExtInfoWindow . |
openExtInfoWindow(map, cssId, html, opt_opts?) |
None |
Opens the ExtInfoWindow over the icon of the marker. The content of
the info window is given as a string that contains HTML text.
Additionally, if an optional ajax url is passed, process that request to
get the new contents of info window. |