Baidu Map JS Load
Page Introduction:
Modify the requested key: <script type= "Text/javascript" src= "http://api.map.baidu.com/api?v=2.0&ak= your Key" ></script >
The following JS and CSS are used to click on the created map callout popup information box
<script type= "Text/javascript" src= "http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/ Searchinfowindow_min.js "></script>
<link rel= "stylesheet" href= "Http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css"/>
//Baidu Map latitude and longitude address information functionshowmap (longitude, latitude,address) {setTimeout (function() {//add a delay load. Solve problem map Scaling varMap =NewBmap.map ("Maps"); varMycity =Newbmap.localcity (); Mycity.get (function(res) {map.centerandzoom (Res.center, res.level); }); //Add map labels based on latitude and longitude if(longitude!= "" &&longitude!=NULL&&latitude!=NULL&&latitude!= ""){ varNew_point =NewBmap.point (longitude,latitude); varMarker =NewBmap.marker (New_point);//Create a calloutMap.addoverlay (marker); Map.centerandzoom (New_point,15); //Add click to mark Pop -up window varSEARCHINFOWINDOW3 =NewBmaplib.searchinfowindow (map, address, {title:"Address Information",//titlewidth:290,//widthHEIGHT:40,//HeightPanel: "Panel",//Search Results PanelEnableautopan:true,//Automatic panningsearchtypes: []}); Marker.addeventlistener ("Click",function() {searchinfowindow3.open (marker); }); } map.enablescrollwheelzoom (true); }, 300); }
"Web-side" Baidu Map API