我想用函数调用函数,并将其返回值调用到datatable。并且该值显示在datatable td
中"mData": "address",
"fnRender": function ( obj ) {
var latlng = new google.maps.LatLng(obj.aData['latitude'], obj.aData['longitude']);
geocoder.geocode({
'latLng': latlng
}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
if (results[0]) {
var address = results[0].formatted_address;
console.log(address);
return address;
callback(address);
} else {
alert('No results found');
}
} else {
alert('Geocoder failed due to: ' + status);
}
});
此处地址显示在数据表中。在mData中。如何分配