Hi, Adding the 7th control to my toolbar causes the map not to display i.e the map panel is blank. Any idea how to resolve this. Below is my code just incase someone can spot where am going wrong. Much thanks.
//Begin ToolBar var ctrl, toolbarItems = [], action, actions = {}; action = new GeoExt.Action({ control: new OpenLayers.Control.ZoomToMaxExtent(), map: map, text: "max extent", //toggleGroup: "navControl", //*** Leave off or disables button after zoom *** allowDepress: false, group: "navControl", tooltip: "zoom to max extent", iconCls: "zoomfull", height:"10px" }); actions["max_extent"] = action; toolbarItems.push(action); toolbarItems.push("-"); // Pan Map action = new GeoExt.Action({ // text: "nav", text:"pan", control: new OpenLayers.Control.Navigation(), map: map, // button options toggleGroup: "navControl", allowDepress: false, pressed: true, tooltip: "pan map", // check item options group: "navControl", checked: true, iconCls: "panMap" }); actions["nav"] = action; toolbarItems.push(action); // Zoom In action = new GeoExt.Action({ //text: "zoom box", text:"info", control: new OpenLayers.Control.WMSGetFeatureInfo(), map: map, // button options toggleGroup: "navControl", allowDepress: false, tooltip: "zoom box", // check item options group: "navControl", iconCls: "zoomWindowIn" }); actions["zoom_box"] = action; toolbarItems.push(action); //attribute Info action = new GeoExt.Action({ text: "attribute info", control: new OpenLayers.Control.WMSGetFeatureInfo(), tooltip: 'Info', map: map, allowDepress: false, tooltip: "zoom box", // check item options group: "info", iconCls: "info" }); actions["info"] = action; toolbarItems.push(action); //zoom out action = new GeoExt.Action({ text:"zoom out", control: new OpenLayers.Control.ZoomBox({out:true, displayClass: 'olControlZoomBoxOut'}), map: map, toggleGroup: "navControl", allowDepress: false, tooltip: "larger box, less zoom out", group: "navControl", iconCls: "zoomOut" }); actions["zoom_out"] = action; toolbarItems.push(action); toolbarItems.push("-"); // Navigation history - two "button" controls ctrl = new OpenLayers.Control.NavigationHistory(); map.addControl(ctrl); action = new GeoExt.Action({ text: "previous", control: new OpenLayers.Control.NavigationHistory().previous, disabled: true, tooltip: "previous in history" }); actions["previous"] = action; toolbarItems.push(action); action = new GeoExt.Action({ text: "next", control: new OpenLayers.Control.NavigationHistory().next, disabled: true, tooltip: "next in history" }); actions["next"] = action; toolbarItems.push(action); toolbarItems.push("->"); -- Kind Regards, Viola
_______________________________________________ Users mailing list Users@geoext.org http://www.geoext.org/cgi-bin/mailman/listinfo/users