function geocoder(){
console.log('havent');
var geocoder = new AMap.Geocoder();
console.log('will');
geocoder.getLocation(address[0], function(status,result){
console.log(result);
if (status === 'complete' && result.info === 'OK') {
map[0].setZoomAndCenter(16,result);
map[0].addMarker(result);
}else{
alert("您选择地址没有解析到结果!");
}
});
相关分类