You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you create an instance of GeoExt.data.store.Features with an explicit fields configuration the creation fails in case of connecting a grid with a FeatureRenderer in one of its columns (Mostly like we do in the official FeatureGrid example.
Here is the failing code:
varfeatStore=Ext.create('GeoExt.data.store.Features',{fields: ['city'],layer: vectorLayer,map: olMap});vargrid=Ext.create('Ext.grid.Panel',{border: true,region: 'east',store: featStore,columns: [{xtype: 'widgetcolumn',width: 40,widget: {xtype: 'gx_renderer'},onWidgetAttach: function(column,gxRenderer,record){// update the symbolizer with the related featurevarfeature=record.olObject;gxRenderer.update({feature: feature,symbolizers: featRenderer.determineStyle(record)});}},{text: 'Name',dataIndex: 'city',flex: 2}],width: 250});
In case you remove the fields declaration it works.
A first short look into this topic showed me that the main reason of failing is the fact that the records in the store do not have an olObject. So no feature could be retrieved from the record.
The text was updated successfully, but these errors were encountered:
This ensures that the FeatureStore (GeoExt.data.store.Features) uses the
correct model class in case of beeing instanciated with a 'fields'
configuration. Otherwise an implicit model is generated and the reference
to the OL feature in the record is missing (fixesgeoext#171).
This also adds some tests and adapts the featuregrid example to show the
fixed behaviour.
This ensures that the FeatureStore (GeoExt.data.store.Features) uses the
correct model class in case of beeing instanciated with a 'fields'
configuration. Otherwise an implicit model is generated and the reference
to the OL feature in the record is missing (fixesgeoext#171).
This also adds some tests and adapts the featuregrid example to show the
fixed behaviour.
This ensures that the FeatureStore (GeoExt.data.store.Features) uses the
correct model class in case of beeing instanciated with a 'fields'
configuration. Otherwise an implicit model is generated and the reference
to the OL feature in the record is missing (fixesgeoext#171).
This also adds some tests and adapts the featuregrid example to show the
fixed behaviour.
If you create an instance of
GeoExt.data.store.Features
with an explicitfields
configuration the creation fails in case of connecting a grid with a FeatureRenderer in one of its columns (Mostly like we do in the official FeatureGrid example.Here is the failing code:
In case you remove the
fields
declaration it works.A first short look into this topic showed me that the main reason of failing is the fact that the records in the store do not have an
olObject
. So no feature could be retrieved from the record.The text was updated successfully, but these errors were encountered: