I am trying to add a zoombox control (tried both zoom in defaults and
out:true) to a toolbar attached to my mappanel. Unfortunately the zoom box
does not appear to be working. If I change the Zoombox control to a ZoomIn()
it works fine. Not sure what is different or if I am missing something and I
appreciate assistance to get the zoombox working. Tried holding down shift
etc and zooming after but as soon as I click the button its like nothing is
happening. Appreciate any assistance.


//Begin ToolBar
                var ctrl, toolbarItems = [], action, actions = {};
                
                // ZoomToMaxExtent control, a "button" control
                action = new GeoExt.Action({
                control: new OpenLayers.Control.ZoomBox(),
                map: map,
                text: "Zoom In",
                tooltip: "Zoom In"
                });
                actions["zoom_in"] = action;
                toolbarItems.push(action);             


           //Define MapPanel for use with GeoExt
            
            var mapPanel = new GeoExt.MapPanel({
            collapsed: false,
            height: 800,
            renderTo: '',
            map: map,
            center: lonLat,
            zoom: startupLevel,
            tbar: toolbarItems
            });
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/ZoomBox-not-working-when-using-Ext-toolbar-and-GeoExt-Action-tp5591918p5591918.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to