次のコード スニペットに問題があります。私の init メソッドは、initializeMapp() と geoListen() を実行する前に、getLocation() 関数を実行して完了する必要があります。リソースとしてリンクされた rsvp.js がありますが、実装方法がよくわかりません。jQuery の $when.done メソッドも試しました。どんな助けでも大歓迎です。
jQuery メソッド:
//initial page load method
function init() {
//get user location then builds map and listens to database
$.when(getLocation()).done.(function () {
//build map now that you have user location
initializeMap();
//Starts listening to database changes
geoListen();
})
}
出欠確認方法:
//initial page load method
function init() {
//get user location then builds map and listens to database
getLocation().then(function () {
//build map now that you have user location
initializeMap();
//Starts listening to database changes
geoListen();
})
}