Baidu Map API Features
var MP = new Bmap.map (' Map ');
Mp.centerandzoom (New Bmap.point (108.953451, 34.265773), 15);
Mp.addcontrol (New Bmap.scalecontrol ());
Mp.addcontrol (New Bmap.overviewmapcontrol ());
Mp.enablescrollwheelzoom ();
var geo = new Bmap.geocoder ();
$ ("#text"). Val ("");
$ ("#s_btn"). Click (function () {
var S_text = $ ("#text"). Val ();
$ ("#res"). Show ();
Geo.getpoint (S_text, function (point) {
if (point)
{
Alert (point.lng + ":" + Point.lat);
Mp.centerandzoom (Point, 16);
Mp.addoverlay (New Bmap.marker (point));
}
}, "Xian City");
});
GetPoint is Baidu Map API, parameters for target string, callback function, city
The target point of Baidu geographical coordinates is actually POINT.LNG and Point.lat (just beginning to think is x and Y, results good a tangle)
Web Baidu Map Address resolution to get Baidu geographical coordinates