【发布时间】:2014-07-23 03:32:13
【问题描述】:
我在这里使用教程:http://docs.sencha.com/architect/3/tutorials/first_mobile_application.html#The_Controller
getBusinesses: function(location, callback) {
// Note: Obtain a Yelp API key by registering (for free)
// with Yelp at http://www.yelp.com/developers/getting_started/api_overview
// (in this app, we use the Review Search API v1.0)
var store = Ext.data.StoreManager.lookup('BusinessStore'),
yelpKey = '', // Enter your Yelp API key here
url = 'http://api.yelp.com/business_review_search' +
'?ywsid=' + yelpKey +
'&term=Bars' +
'&lat=' + location.coords.latitude +
'&long=' + location.coords.longitude;
store.getProxy().setUrl(url);
store.load(function() {
callback(store);
});
}
我在 Yelp 上申请了一个 API 密钥,结果如下:
我不确定该使用哪一个。教程代码有一个占位符,如上面的代码所示
已完成的应用显示错误:Uncaught TypeError: Cannot read property 'setStore' of undefined at:
me.getBusinesses(location, function (store) {
// Bind data to the list and display it
me.getDataList().setStore(store);
【问题讨论】:
标签: extjs sencha-touch sencha-architect