Hello everyone,

 

I'm just now getting back into GeoExt/Ext JS after being away for ~2-3 years
and as a result my skills are somewhat rusty/diminished.  I'm having
difficulty replicating the autoPan functionality that I was using back then.
I tried using the autoPanMapOnSelection option on
GeoExt.selection.FeatureModel but this didn't provide the behavior that I
was seeking.  

 

I had previously used an extension called
Ext.ux.map.grid.AutoPanSelectFeatureCtl (I don't remember if I downloaded
this or wrote it myself) that extends OpenLayers.Control.SelectFeature and
is used for the selectControl option of a GeoExt.grid.FeatureSelectionModel
which is then passed as the sm option on a Ext.grid.GridPanel.  The
functionality provided by AutoPanSelectFeatureCtl is to pan the map only
when the selected feature is not within the current extent.  I find this
much more desirable than the autoPanMapOnSelection behavior of always
centering the selection and this is why I'm trying to reproduce this
functionality.

 

The bottom line is that I've so far been unable to tweak this to get it to
work with GeoExt 2/ExtJS 4.  I thought that before I attempt to describe the
problems I'm having with this effort that I would run it past the list to
see if this is the best strategy for implementing this functionality.

 

I took a look at the code in GeoExt.selection.FeatureModel and was wondering
if it might make more sense to extend this and override
recenterToSelectionExtent or something else similar to this.

 

Thanks,

Gary

_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev

Reply via email to