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()回調函數中捕獲返回值?