[Users] add a "sliding msg box" to the mappanel
Matt Priour
mpriour at kestrelcomputer.com
Fri Sep 11 19:11:31 CEST 2009
do you have a global variable named 'mappanel'? If not then you would actually need to find the map panel
for example:
assuming you have some access to the viewport or overall layout container component, we will call it 'layout' here
var mappanel = layout.findByType('gx_mappanel')
if you set an 'id' property in the mappanel config (ex:'map_panel') then you can easily get back to it by
var mappanel = Ext.getCmp('map_panel')
then the below code will work
Matt
From: Steve.Toutant at inspq.qc.ca
Sent: Friday, September 11, 2009 11:32 AM
To: Pierre Giraud
Cc: users at geoext.org
Subject: Re: [Users] add a "sliding msg box" to the mappanel
Pierre,
This gives an error "mappanel is not defined"
msgCt = Ext.DomHelper.insertFirst(mappanel.body, {id:'msg-div'}, true);
In Firebug I don't see a DOM element related to the mappanel.
Here is how I create the mapPanel, it might help...to help me ;-)
...
{
region: 'center',
layout: 'fit',
frame: false,
border: true,
margins: '5 5 5 5',
items:
[{
xtype: 'gx_mappanel',
map: map,
tbar: toolbar,
border: false,
center: new OpenLayers.LonLat(point.x, point.y),
zoom: myzoom2
}]
}
toolbar is an array of GeoExt.Action
Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3
Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant at inspq.qc.ca
http://www.inspq.qc.ca
Pierre Giraud <pierre.giraud at camptocamp.com>
11/09/2009 12:00 PM
A Steve.Toutant at inspq.qc.ca
cc users at geoext.org
Objet Re: [Users] add a "sliding msg box" to the mappanel
What I would do is change the example.js code in 26 like the following :
msgCt.alignTo(theElementToAlignTo, 't-t');
In the menu example, I got it working by replacing theElementToAlignTo by "toolbar".
In your case, replace it by mappanel.body and you should be done.
And what about using a StatusBar ? It probably has the same results and is less intrusive.
Regards,
Pierre
On Fri, Sep 11, 2009 at 4:40 PM, <Steve.Toutant at inspq.qc.ca> wrote:
Hello,
I use the xtype: 'gx_mappanel' in an Ext viewport.
I would like to use the "sliding message box" from this extJS sample. You can see this box When you click on the "Toggle Me" button.
http://www.extjs.com/deploy/dev/examples/menu/menus.html
But in this example the message box appears in the document body, which is behind the mappanel. I would like this message box to appear on the mappanel below the toolbar.
How can I accomplish that please?
thanks
Steve
_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
--
Pierre GIRAUD
Géomaticien, Analyste
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 93
Mail : pierre.giraud at camptocamp.com
http://www.camptocamp.com
--------------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20090911/b8a6dac4/attachment-0001.htm
More information about the Users
mailing list