From: http://hi.baidu.com/xfm_zhr/blog/item/c3fcac13d44996876438db48.html
1.Ginfowindow object
Objects that provide information. Compared with the title attribute of the gmarker object, ginfowindow not only displays information on the gmarker object, but also displays information at any point on the map. The displayed content can be simple text or HTML.
2.Ginfowindowtab object
Supports information windows with multiple tags.
Declaration method: New ginfowindowtab (Label, content );
Content: HTML string or DOM object.
Typical examplesCode:
// Create a ginfowindowtab Array
VaR tabs = [New ginfowindowtab ("tab1", "<Div style = 'width: 400px '> This is tab1 </div> "),
New ginfowindowtab ("tab2", "<Div style = 'width: 400px '> This is tab2 </div> "),
New ginfowindowtab ("tab3", "<Div style = 'width: 400px '> This is tab3 </div>")];
3.About Removing inactive objects
Information window:
Ginfowindow and ginfowindowtab are both gmap2.closeinfowindow (). In googlemapsapi, only one window can be activated.
Gcontol Control
Gmap2.removecontrol (Control)
Control: the gcontol control to be removed.
Gmarker landmarks
Gmap2.removeoverlay (overlay ).
Overlay: The gmarker landmark to be removed.
Gmap2.removeoverlays ()
Remove all landmarks.
4.Gxmlhttp object
Creating gxmlhttp objects there is basically no difference between Ajax and xmlhttprequst objects, but browser compatibility is not required.
Sample Code:
// Create a gxmlhttp object
VaR request = gxmlhttp. Create ();
// Open gxmlhttp. Three parameters can be set here.
// 1: Obtain method and determine whether to use the get or POST method.
// 2: file name to be obtained
// 3: the retrieval mode. The asynchronous mode is true, and the synchronous mode is false.
Request.open(getask,myfile.txt ", true );
// Callback function. function () {…} can be used (){...} This API is called directly here.
// You can also pre-define the function XXX (), and assign the value request. onreadystatechange = xxx here
Request. onreadystatechange = function ()
{
Alert (request. responsetext );
}
// Send information
Request. Send (null );
5.Gdownloadurl () function
A simplified asynchronous processing function. You can only use the get method without judging the loading status, but only call the callback function after full loading. Call method:
Gdownloadurl (URL, onload );
Http://hi.baidu.com/fc/editor/get get URL
Onload: the fully loaded callback function.