0
<script type="text/javascript">
var geo = new GClientGeocoder();
function showAddress() {
var search = document.getElementById("search").value;
// getLocations has not ret, so wtf!
geo.getLocations(search, function (result) { (result.Status.code == 200) ? alert(result.Placemark[0].Point.coordinates) : alert(result.Status.code); });
}</script>
我需要回调的ret值作为getLocations()返回没有值。我怎样才能做到这一点?如何从我正在使用的result()回调函数中捕获返回值?