<!DOCTYPE HTML><HTML><Head> <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /> <Metaname= "Viewport"content= "initial-scale=1.0, User-scalable=no" /> <styletype= "Text/css">body, HTML, #allmap{width:100%;Height:100%;margin:0;font-family:"Microsoft Jas Black";font-size:14px;}#l-map{Height:500px;width:100%;}#r-result{width:100%;} </style> <Scripttype= "Text/javascript"src= "http://api.map.baidu.com/api?v=2.0&ak= your Key"></Script> <title>Get information about the information window</title></Head><Body> <DivID= "L-map"></Div> <DivID= "R-result"></Div></Body></HTML><Scripttype= "Text/javascript"> //Baidu Map API features varscontent="Tiananmen Square is located in the center of Beijing, China, the south side of the Forbidden City, and Tiananmen Square across Changan Street, the Qing Dynasty Imperial Gate ..."; varMap= NewBmap.map ("L-map"); var Point= NewBmap.point (116.404, 39.915); Map.centerandzoom (Point, the); varInfowindow= NewBmap.infowindow (scontent); //Create an Information window objectMap.openinfowindow (infowindow,point);//Open Information windowmap.enablescrollwheelzoom ();//Start mouse wheel zoom mapdocument.getElementById ("R-result"). InnerHTML= "the contents of the Information window are: <br/>" +infowindow.getcontent ();</Script>
JS call Baidu Map API Tag Location