// author:1
*GMarker [class]
http://www.google.com/apis/maps/documentation/
**Version 2 (2006.4)
>A GMarker marks a position on the map. It implements the GOverlay interface and thus is added to the map using the GMap2.addOverlay() method.
>A marker object has a point, which is the geographical position where the marker is anchored on the map, and an icon. If the icon is not set in the constructor, the default icon G_DEFAULT_ICON is used.
>After it is added to a map, the info window of that map can be opened through the marker. The marker object will fire mouse events and infowindow events.
***Constructor
|TLEFT||c
|Constructor|Description|h
|GMarker(point, icon?, inert?)|Creates a marker at point with icon or the G_DEFAULT_ICON. If the inert flag is true, then the marker is not clickable and will not fire any events.&font(Red){(Deprecated since 2.50)};|
|GMarker(point, &font(Red){opts?};)|Creates a marker at point with options specified in &font(Red){GMarkerOptions};. By default markers are clickable & have the default icon G_DEFAULT_ICON. (Since 2.50)|
Rivision 2.50a 以降、上段( GMarker(point, icon?, inert?) )の引数は非推奨になる。(2006.5.15現在、API v2 Current: 2.50a ・ Default: 2.48)~
[[GMarkerOptions>GoogleMaps/API/doc/ClassReference/24.1-GMarkerOptions]]~
***Methods
>Before these methods can be invoked, the marker must be added to a map.
|TLEFT||c
|Methods|Return Value|Description|h
|openInfoWindow(content, opts?)|none|Opens the map info window over the icon of the marker. The content of the info window is given as a DOM node. Only option GInfoWindowOptions.maxWidth is applicable.|
|openInfoWindowHtml(content, opts?)|none|Opens the map info window over the icon of the marker. The content of the info window is given as a string that contains HTML text. Only option GInfoWindowOptions.maxWidth is applicable.|
|&font(Red){openInfoWindowTabs(tabs, opts?)};|none|Opens the tabbed map info window over the icon of the marker. The content of the info window is given as an array of tabs that contain the tab content as DOM nodes. Only options GInfoWindowOptions.maxWidth and InfoWindowOptions.selectedTab are applicable.|
|&font(Red){openInfoWindowTabsHtml(tabs, opts?)};|none|Opens the tabbed map info window over the icon of the marker. The content of the info window is given as an array of tabs that contain the tab content as Strings that contain HTML text. Only options InfoWindowOptions.maxWidth and InfoWindowOptions.selectedTab are applicable.|
|showMapBlowup(opts?)|none|Opens the map info window over the icon of the marker. The content of the info window is a closeup map around the marker position. Only options InfoWindowOptions.zoomLevel and InfoWindowOptions.mapType are applicable.|
|&font(Red){getIcon};()|GIcon |Returns the icon of this marker, as set by the constructor.|
|&font(Red){getPoint};()|GLatLng |Returns the geographical coordinates of the point at which this marker is anchored, as set by the constructor or by setPoint().|
|&font(Red){setPoint};(point)|none|Sets the geographical coordinates of the point at which this marker is anchored.|
***Events
>All these events fire only if the marker is not inert (see constructor).
|TLEFT||c
|Events|Arguments|Description|h
|click|none|This event is fired when the marker icon was clicked. Notice that this event will also fire for the map, with the marker passed as the first argument to the event handler there.|
|&font(Red){dblclick};|none|This event is fired when the marker icon was double-clicked. Notice that this event will not fire for the map, because the map centers on double-click as a hardwired behavior.|
|&font(Red){mousedown};|none|This event is fired when the DOM mousedown event is fired on the marker icon. Notice that the marker will stop the mousedown DOM event, so that it doesn't cause the map to start dragging.|
|&font(Red){mouseup};|none|This event is fired for the DOM mouseup on the marker. Notice that the marker will not stop the mousedown DOM event, because it will not confuse the drag handler of the map.|
|&font(Red){mouseover};|none|This event is fired when the mouse enters the area of the marker icon.|
|&font(Red){mouseout};|none|This event is fired when the mouse leaves the area of the marker icon.|
|infowindowopen|none|This event is fired when the info window of the map was opened through this marker.|
|infowindowclose|none|This event is fired when the info window of the map that was opened through this marker is closed again. This happens when either the info window was closed, or when it was opened on another marker, or on the map.|
|&font(Red){remove};|none|This event is fired when the marker is removed from the map, using GMap2.removeOverlay() or GMap2.clearOverlays().|
**Version 1
>GMarker is a type of map overlay that shows an icon at a single point on the map. The constructor takes an instance of GIcon, which can be shared among many markers, and the point at which it should be displayed. GMarker also includes some convenience methods to open info windows over the marker, which is common for Google Maps hacks.
***Constructor
|TLEFT:90%||c
|Constructor|Description|h
|GMarker(point, icon?) |Creates a marker with the given icon at the given point. If no icon is given, we use the default Google Maps icon.|
***Methods
|TLEFT:90%||c
|Method|Description|h
|openInfoWindow(htmlElem) |Opens an info window with the given HTML content over this marker. htmlElem should be an HTML DOM element. |
|openInfoWindowHtml(htmlStr) |Like openInfoWindow, but takes an HTML string rather than an HTML DOM element |
|openInfoWindowXslt(xmlElem, xsltUri) |Like openInfoWindow, but takes an XML element and the URI of an XSLT document to produce the content of the info window. The first time a URI is given, it is downloaded with GXmlHttp and subsequently cached. |
|showMapBlowup(zoomLevel?, mapType?) |Shows a blowup of the map over this marker. We use a default zoom level of 1 and the current map type if the zoomLevel and mapType parameters are not given. |
***Events
|TLEFT:90%|||c
|Event |Arguments |Description |h
|click |none |Triggered when the user clicks on this marker |
|infowindowopen |none |Triggered when the info window is opened above this marker with one of the methods above |
|infowindowclose |none |Triggered when the info window above this marker is closed |