[mapguide-users] RE: Show/Hide Layers and properties pane by script

andrea tiveron (e-metodi) andrea.tiveron at e-metodi.it
Mon Aug 1 03:45:49 EDT 2011


Elliot
you're right
I'm sorry but I do not use the properties visible

I've added the following line of code:
try { xframe.SetPropertyPaneToolbarVisibility(true); } catch (e) { } I used
the command try to ensure compatibility with previous versions to 2.2

so I reviewed the code again:

var xframe = GetMapFrame();
var aryClassElements = new Array();
var objBtn;
function findbtnbytitle(titolo) {
imgs = xframe.parent.frames[0].document.images;
for(i=0;i<imgs.length;i++){
if(imgs[i].title==titolo){
objBtn =imgs[i]
return objBtn;
}
}
}
if(xframe.document.getElementById("InfoBand").style.width ==
'0pt')
{
xframe.minInfoWidth=20;
xframe.ResizeTo(200);
try { xframe.SetPropertyPaneToolbarVisibility(true); } catch (e) { }
xframe.InitialMapView(); objBtn = findbtnbytitle('Apre il pannello dei
layer'); objBtn.src='../stdicons/openButton.gif';
objBtn.title='Chiude il pannello dei layer'; }
    else
{
xframe.minInfoWidth=0;
xframe.ResizeTo(0);
xframe.document.getElementById("LayerCaption").style.width = 0;
xframe.document.getElementById("LegendCtrl").style.width = 0;
xframe.document.getElementById("PropertyCaption").style.width = 0;
xframe.document.getElementById("PropertyCtrl").style.width = 0; try {
xframe.SetPropertyPaneToolbarVisibility(false); } catch (e) { }
xframe.InitialMapView(); objBtn = findbtnbytitle('Chiude il pannello dei
layer'); objBtn.src = '../stdicons/closeButton.gif'; objBtn.title='Apre il
pannello dei layer'; }

will need to pay attention to the replacement of the title text button

with regard to your second request, I do not know if I understood exactly in
my interface, I have the buttons to show and hide the panels just as you say
I enclose a picture attached

regards
andrea


-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of elliott17
Sent: giovedì 28 luglio 2011 15:23
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] RE: Show/Hide Layers and properties pane by script

When hiding the layer and properties pane while objects are selected, the
small window stays visible where the user can select the object type and the
drop down list of objects are accessible.  This is just below the Properties
title.

Also, is there a way to configure a button that can sit at the top of the
layer bread, mush like the arrows that show and hide the taskpane.

--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Show-Hide-Layers-and-properties-pane-
programmatically-tp1809391p6629849.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

--
This message was scanned by ESVA and is believed to be clean.



More information about the mapguide-users mailing list