推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
023yangbo

咨询高手 google 的 geocoding 写在函数里面的话,怎么才能够接收返回呢,还是用 promise,如果用 promise 怎么写代码呢

  •  
  •   023yangbo · Jan 18, 2016 · 1694 views
    This topic created in 3776 days ago, the information mentioned may be changed or developed.

    function division(e, f) {
    (new google.maps.Geocoder).geocode({
    location : {
    lat : e,
    lng : f
    }
    }, function(c, d) {
    console.log(c,d)
    //返回这里的结果
    }
    };
    想这样调用的话是肯定不行的
    var a=division(22,102)

    求高手帮下忙啊

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   983 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 22:18 · PVG 06:18 · LAX 15:18 · JFK 18:18
    ♥ Do have faith in what you're doing.