[Users] zoom in, but not too far!!

Robert Buckley robertdbuckley at yahoo.com
Thu Sep 2 15:19:03 CEST 2010


 Hi,

I have a button to zoom into selected features in a grid. I would like to only 
zoom into zoom level 5 though, and not right into the point. Does anyone know 
how I could restrict the zoom up to a certain level?


Here is the code for the button,


bbar: [{
                text:"<h1>an Auswahl heranzoomen</h1>",
                cls: 'x-btn-text-icon',
                  icon: '../styles/magnifier.png',
                handler:function()
                    {
                    attribgridPanel_wea.getSelectionModel().each(function(rec){
                        var feature = rec.get("feature");
                        mapPanel.map.zoomToExtent(feature.geometry.getBounds());
                        
                        })
                    }    
                }]

            });    




Thanks for any help,

Yours,

Rob





More information about the Users mailing list