[Users] Users Digest, Vol 31, Issue 33

Viola Anne violaanne at gmail.com
Thu Aug 25 13:53:23 CEST 2011


Thanks Geoffrey, the last button I added is the is the info button with the
code attached earlier. I have pasted this particular code below, kindly let
me know if you can spot the problem. Thanks!
 //attribute Info
 action = new GeoExt.Action({
text: "attribute info",
control: new OpenLayers.Control.WMSGetFeatureInfo(),
            tooltip: 'Info',
            map: map,
            allowDepress: false,
        tooltip: "Click on feature for attribute",
        // check item options
        group: "info",
        iconCls: "info"
        });
 actions["info"] = action;
    toolbarItems.push(action);
toolbarItems.push("-");

On Thu, Aug 25, 2011 at 1:00 PM, <users-request at geoext.org> wrote:

> Send Users mailing list submissions to
>        users at geoext.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://www.geoext.org/cgi-bin/mailman/listinfo/users
> or, via email, send a message with subject or body 'help' to
>        users-request at geoext.org
>
> You can reach the person managing the list at
>        users-owner at geoext.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Users digest..."
>
>
> Today's Topics:
>
>   1. Re: Toolbar doesn't work with MORE than 6 control bottons (gbrun)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 25 Aug 2011 10:35:59 +0200
> From: gbrun <gbrun at myopera.com>
> Subject: Re: [Users] Toolbar doesn't work with MORE than 6 control
>        bottons
> To: users at geoext.org
> Message-ID: <op.v0rgt9gbyqc6xb at asensio.parc.local>
> Content-Type: text/plain; charset=iso-8859-15; format=flowed;
>        delsp=yes
>
> I don't think too much buttons could be a problem. I have actually 8
> GeoExt Action buttons in my mapPanel toolbar! :s
>
> Your problem may come rather from the last button you added, maybe the
> control linked to it?
>
> Geoffrey
>
>
> On Thu, 25 Aug 2011 10:28:35 +0200, Viola Anne <violaanne at gmail.com>
> wrote:
>
> > 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("->");
> >
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/
>
>
> ------------------------------
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
> End of Users Digest, Vol 31, Issue 33
> *************************************
>



-- 
Kind Regards,
Viola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110825/8cf899c7/attachment.htm 


More information about the Users mailing list