ajax({
type: "post",
contentType: "application/x-www-form-urlencoded",
dataType:"jsonp",
url: "https://api.map.baidu.com/geocoder/v2/",
data: {"ak": "6tYzTvGZSOpYB5Oc2YGGOKt8","output":"json","address":addressuri} ,
success: function (result) {
//var lon = data.result.location.lng;
//var lat = data.result.location.lat;
alert(result.result.location.lng);
//alert(lon);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}
type: "post",
contentType: "application/x-www-form-urlencoded",
dataType:"jsonp",
url: "https://api.map.baidu.com/geocoder/v2/",
data: {"ak": "6tYzTvGZSOpYB5Oc2YGGOKt8","output":"json","address":addressuri} ,
success: function (result) {
//var lon = data.result.location.lng;
//var lat = data.result.location.lat;
alert(result.result.location.lng);
//alert(lon);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}