It has been a couple of years since I create my first OpenLayers/MapFish
application (http://pitrule.source3.com).  It is time to expand it to a
larger region and I would like to make some changes.  Note: I created my
first application without fully understanding how OpenLayers/MapFish worked.  

Therefore, I am going back to learning the basics as I am not a programmer. 
I was able to create a basic GeoExt/OpenLayers map with a toolbar
(http://saturn.nmt.edu/national/measure.html).  Now I am trying to add the
toolbar to the center region of a three panel layout
(http://saturn.nmt.edu/national/tree.html).  I finally resolved all the
configuration errors.  However, I cannot get the toolbar to render in the
center panel.  

Any help with this is very much appreciated.  

Portion of the tree.js code is:

//Start of javascript for GeoEXT/OpenLayers Tree Example

var mapPanel, tree, map1;
// Toolbar Variables
var ctrl, toolbarItems = [], action, actions = {};

Ext.onReady(function() {
    Ext.QuickTips.init();
    mapPanel = new GeoExt.MapPanel({
        border: true,
        region: "center",        
        map: map1 = new OpenLayers.Map({allOverlays: false}),  // had to add
"map1=" for toolbar
        center: [146.1569825, -41.6109735],
        zoom: 6,
        layers: [
            new OpenLayers.Layer.WMS("Global Imagery",
        ...
        ],
        tbar: [toolbarItems]
        // WHEN items IS USED, MAP DOES NOT DISPLAY
        //  items: [{
        //    xtype: "gx_mappanel",
        //    tbar: [toolbarItems]
        //  }]
    });
...
/********* Create Toobar Buttons   *************/
    // Zoom to extent
    action = new GeoExt.Action({
        control: new OpenLayers.Control.ZoomToMaxExtent(),
        map: map1,
        text: "max extent",
        // toggleGroup: "navControl",  *** Leave off or disables button
after zoom ***
        allowDepress: false,
        group: "navControl",
        tooltip: "zoom to max extent",
        iconCls: "zoomfull"
    });
    actions["max_extent"] = action;
    toolbarItems.push(action);
    toolbarItems.push("-");
...
});

Please recall the full code can be viewed at:
http://saturn.nmt.edu/national/tree.html

Thanks,
aparker1969
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Toolbar-in-GeoEXT-Center-Panel-Not-Rendering-tp5974967p5974967.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