BaiduMap API is a set of free for developers based on
BaiduThe application interface of the map, including JavaScript, IOS, andriod, static maps, Web services and many other versions, provide basic maps, location search, peripheral search 、...
<script type= "Text/javascript" src= "http://api.map.baidu.com/api?v=2.0&ak= (Baidu Apikey, own application)" ></script ><input type= "text" name= "Address" value= ""/><script type= "Text/javascript" > $ (function () {/** Baidu ground Figure API function **/var mapset = {getlocation:function () {var geolocation = new Bmap.geolocation () ; Geolocation.getcurrentposition (function (r) {if (this.getstatus () = = bmap_status_success) { var rp = new Bmap.point (R.point.lng,r.point.lat); var gc = new Bmap.geocoder (); Gc.getlocation (Rp,function (RS) {var addcomp = rs.addresscomponents; $ ("Input[name= ' address ']"). Val (addcomp.province + "," + addcomp.city + "," + Addcomp.district + "," + Addcomp.street + " "," + addcomp.streetnumber); }); }},{enablehighaccuracy:true}) } }; $ (function () {mapset.getlocation (); }); });</script>
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Baidu API Locator Returns the current detailed location