私は sencha touch を使用したモバイル アプリケーションのプロジェクトで働いていますが、情報を取得するモデルに問題があります。モデルと json ファイルの内容をお見せします
jsonファイル:(テストするだけで非常に簡単になり、ジオメトリラインを削除しました)
{
"type": "FeatureCollection",
"features": [
{
"properties": {"graphic": "img/restaurant.png","Name": "Igor Tihonov", "Country":"Sweden", "City":"Gothenburg"}
}
]
}
私のモデル:
Ext.regModel('Features', {
hasMany: {model: 'Properties', name: 'properties'}
});
Ext.regModel('Properties', {
fields: ['graphic', 'Name', 'Country', 'City'],
associations: [
{type: 'belongsTo', model: 'Features'}
]
});
店 :
Ext.data.Store({
model: 'Features',
proxy: {
type: 'ajax',
url : 'poi2.json',
reader: {
type: 'json',
rootProperty: 'features'
}
},
autoLoad:true
});
ブロックされてから1週間以上経ちました。助けていただければ幸いです。ありがとうございました