I have a problem with OpenLayers + GeoExt2: I created a FeatureStore which features (downloaded via an API) contain an id attribute. When I try to represent the features in a grid panel, all the other attributes are properly represented (name, description, etc.) but the id is somehow overridden by the OpenLayers object's id, for instance "OpenLayers_Feature_Vector_363", instead of the "original" int id.
My store is defined as follows:
areaStore = Ext.create('GeoExt.data.FeatureStore', {
layer: areaLayer,
fields: [
{type:'string', name: 'note'},
{type:'int', name: 'node' },
{type:'string', name: 'description'},
{type:'bool', name: 'enabled'},
{type:'int', name: 'id'}
],
autoLoad: false,
});
The columns that I put into my grid panel are defined as follows:
var areaColumns = [
{ dataIndex: 'id', header: 'ID', flex:1 },
{ dataIndex: 'description', flex: 1, header: 'Description' },
{ dataIndex: 'node', flex: 1, header: 'Node' },
{ dataIndex: 'enabled', flex: 1, header: 'Enabled'},
{ dataIndex: 'note', flex: 1, header: 'Note' }
]
Has anyone got the same problem when downloading features from a database via API? Thank you!