Hi Francisco,

autoPanMapOnSelection is not a config of the grid, it is a config of
GeoExt.selection.FeatureModel [1]. So instead of configuring your
selection model by its xtype you can create it yourself and configure
it. Like this (untested):

...
}],   
*selModel: Ext.create('GeoExt.selection.FeatureModel',
{autoPanMapOnSelection: true})**,*
listeners:{
...

Cheers,
Chris

[1]
http://geoext.github.io/geoext2/docs-w-ext/#!/api/GeoExt.selection.FeatureModel-cfg-autoPanMapOnSelection

Am 23.07.2015 um 13:24 schrieb Francisco Salas Rosette:
>
> hi, I have one situation, need that when I select one feature in the
> grid panel , this feature recenter in the map 
>
>  
>
>  
>
> My code:
>
> .
>
> .
>
>  
>
> gridPanel_barcos = Ext.create('Ext.grid.GridPanel', {
>
>         title: "Barcos",
>
>         region: "east",
>
>         store: store_barcos,
>
>         width: '100%',
>
>         height: 490,
>
>             autoPanMapOnSelection: true,
>
>             columns: [
>
>             {text: "País", flex: 0.5, dataIndex:
> 'CodPais',renderer:mostrar},
>
>         {
>
>             header: "Nombre",
>
>             flex: 2,
>
>             dataIndex: "Nombre"
>
>         }],
>
>         selType: 'featuremodel',
>
>         listeners:{
>
>             itemclick: function (View, record) {
>
>            //     alert(record.data.Nombre);
>
>          //   mapPanel.map.recenterToSelectionExtent();
>
>             }
>
>         }
>
>     });
>
> .
>
> .
>
> I use the autoPanMapOnSelection: true, propertie , but don’t work
>
>  What is my problems????
>
>  
>
> Any suggestion,
>
>  
>
> Regards,
>
> Francisco Salas
>
>  
>
>
> ----------------------------------------------------------------------------------------------------
> Anuncie sus servicios en ANDARIEGO… aplicación para celulares sobre mapas de 
> toda Cuba.  
> Visite el sitio http://andariego.geocuba.cu o http://www.andariego.cu, 
> contáctenos por el correo andari...@geosi.geocuba.cu o por el teléfono 
> 8817400. 
> Ponga su información al servicio de todos.
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users@geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to