On Mon, Dec 13, 2010 at 9:24 PM, percy <[email protected]> wrote:
> Hi,
>
> I'm using a featurestore to populate a grid and map [1], with the
> GeoExt.grid.FeatureSelectionModel linking the two so that when the user
> clicks on a polygon feature the grid hilights the corresponding row, and
> scolls to it.
>
> This works great!
>
> Is there a simple way to get the reverse functionality in the map so
> that when a row is clicked it hilights the map feature (it does that
> now, of course), and ZOOMS to it?
Hi
You can register a listener to the "rowselect" event for that:
new GeoExt.grid.FeatureSelectionModel({
listeners: {
"rowselect": function(sm, rowIdx, rec) {
map.zoomToExtent(rec.getFeature().getBounds());
}
}
});
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users