How to call Baidu maps and precisely locate them and display them in a browser ., Precise call locating
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "UTF-8"/>
<Title> Use of Baidu map API </title>
<! -- Baidu map API -->
<Script src = "http://api.map.baidu.com/api? V = 2 & ak = NfwgFTvB6mGSbcIlEHFlfxSZtPlA0xrn "type =" text/javascript "> </script>
<Script type = "text/javascript">
Function initialize (){
// Create a map instance
Var map = new BMap. Map ('map ');
// Create a Coordinate
Var point = new BMap. Point (121.433759, 28.659658 );
// Map initialization, set the coordinates of the center and map level
Map. centerAndZoom (point, 15 );
Map. addControl (new BMap. MapTypeControl ());
// Add controls and map controls
Map. enableScrollWheelZoom ();
// Enable scroll wheel zoom in and out
Map. enableContinuousZoom ();
// Enable map inertial drag.
Var marker = new BMap. Marker (point );
// Create Annotation
Map. addOverlay (marker );
// Add the annotation to the map
Var infoWindow = new BMap. InfoWindow ("I am here ");
// Create information window
Map. openInfoWindow (infoWindow, point );
// Open the Information Window
}
Window. onload = initialize;
</Script>
<Style type = "text/css">
# Map {
Margin: 0 auto;
Height: 600px;
Width: pixel PX;
}
</Style>
</Head>
<Body>
<! -- Baidu map container -->
<Div id = "map"> </div>
</Body>
</Html>