<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Palatino Linotype";
        panose-1:2 4 5 2 5 5 5 3 3 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thank you for that Brian.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>But I managed to finally solve this problem. I&#8217;m not sure
if anyone else has countered it but at least, calling layer.show for many
layers, that is wanting to display many layers at one time resulted in faulty
behavior and not all layers were shown. So on line 879  in Mapguide.js (fusion/Mapguide/Mapguide.js)
I added this function:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                /** function : sneShowLayers()<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                  * This function takes in an array of layers<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                  * so that multiple layers can be displayed at
once<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                  * instead of just one at a time<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                  */<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                sneShowLayers: function(layers, noDraw) {<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                                for (var i = 0; i &lt;
layers.length; i++) {<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                                                this.processLayerEvents(layers[i],
true);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                                                this.aShowLayers.push(layers[i].uniqueId);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                                }<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt;text-indent:36.0pt'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>iif
(!noDraw) {<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:72.0pt;text-indent:36.0pt'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> this.drawMap();<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                                }                              <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                },<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                /** function : sneHideLayers()<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                  * This function takes in an array of layers<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                  * so that multiple layers can be hidden at
once<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                  * instead of just one at a time<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                  */<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                sneHideLayers: function( layers, noDraw ) {<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                                for (var i = 0; i &lt;
layers.length; i++) {<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                                                this.processLayerEvents(layers[i],
false);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                                                this.aHideLayers.push(layers[i].uniqueId);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                                }<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>                if (!noDraw)
{<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                                                 this.drawMap();<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                                 }<o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'> },<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Very similar to the showLayer function it has been altered to
take in an array of layers instead of just a single array. This way they will
all be pushed into the array that will be shown for the next draw of the map. So
to fully allow for let&#8217;s say displaying all layers or hiding them all you
have to traverse through the layer tree / layer legend and add every layer to a
temporary array and then send it to this function  with &#8220;map.sneHideLayers(layersToHideArray)&#8221;
and / or &#8220;map.sneShowLayers(layersToShowArray)&#8221;. Hope this helps as
most people out there.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Kind regards,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Tómas.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> Berdel, Brian
[mailto:brian.berdel@mcmtrans.com] <br>
<b>Sent:</b> 6. ágúst 2008 14:46<br>
<b>To:</b> Tómas Guðmundsson; Kenneth Skovhede, GEOGRAF A/S<br>
<b>Cc:</b> fusion-users@lists.osgeo.org<br>
<b>Subject:</b> RE: [fusion-users] Problem with layer hiding and showing.<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Here is code to show a layer (just replace layerName)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:blue'>&nbsp;&nbsp;&nbsp; var</span><span
style='font-size:10.0pt;font-family:"Courier New";color:windowtext'> mapWidget
= Fusion.getWidgetById(</span><span style='font-size:10.0pt;font-family:"Courier New";
color:#A31515'>'Map'</span><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>);<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:windowtext'>&nbsp;&nbsp;&nbsp; </span><span
style='font-size:10.0pt;font-family:"Courier New";color:blue'>var</span><span
style='font-size:10.0pt;font-family:"Courier New";color:windowtext'> layer =
mapWidget.aMaps[0].getLayerByName(layerName);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:windowtext'>&nbsp;&nbsp;&nbsp; layer.show();</span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div>

<p class=MsoNormal><span style='font-family:"Palatino Linotype","serif";
color:#1F497D'>Brian </span><span style='color:#1F497D'><o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Palatino Linotype","serif";
color:#009933'>&nbsp;</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p></o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> fusion-users-bounces@lists.osgeo.org
[mailto:fusion-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Tómas
Guðmundsson<br>
<b>Sent:</b> Wednesday, August 06, 2008 10:18 AM<br>
<b>To:</b> Kenneth Skovhede, GEOGRAF A/S<br>
<b>Cc:</b> fusion-users@lists.osgeo.org<br>
<b>Subject:</b> RE: [fusion-users] Problem with layer hiding and showing.<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I am trying to use map.showLayers() but I&#8217;m not sure what
parameters it needs.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Does anyone know where the definition of layer.show() and
layer.hide() as well as<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>map.showLayers() and map.hideLayers().<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Tómas.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> Kenneth Skovhede, GEOGRAF A/S
[mailto:ks@geograf.dk] <br>
<b>Sent:</b> 6. ágúst 2008 13:47<br>
<b>To:</b> Tómas Guðmundsson<br>
<b>Cc:</b> Mike Adair; fusion-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [fusion-users] Problem with layer hiding and showing.<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>I have no idea how to do this
in fusion, but you will likely have to run through the layer list when doing a
&quot;layer.show()&quot;.<br>
I think there is a call that updates the map without returning the image. You
can use that, but it will require multiple server calls over http.<o:p></o:p></p>

<pre>Regards, Kenneth Skovhede, GEOGRAF A/S<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
Tómas Guðmundsson skrev: <o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks Kenneth,</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I&#8217;m trying to figure it out how I put multiple GUIDS into
the mapagent request.</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Only way I know how to do it is with layer.show(). I&#8217;ll
look more into it but if you</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Have it on the top of your head, any info would be great thanks.</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards,</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Tómas.</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<div>

<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;
border-color:-moz-use-text-color -moz-use-text-color'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> Kenneth Skovhede, GEOGRAF A/S [<a
href="mailto:ks@geograf.dk">mailto:ks@geograf.dk</a>] <br>
<b>Sent:</b> 6. ágúst 2008 10:57<br>
<b>To:</b> Tómas Guðmundsson<br>
<b>Cc:</b> Mike Adair; <a href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [fusion-users] Problem with layer hiding and showing.</span><o:p></o:p></p>

</div>

</div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>the &quot;ShowLayers&quot;
parameter in the &quot;GETMAPIMAGE&quot; call, can take multiple GUIDs, so you
should send:<br>
SHOWLAYERS=118e0096-0000-1000-8000-001b2418ab2d,1192c52c-0000-1000-8000-001b2418ab2d,119062dc-0000-1000-8000-001b2418ab2d<o:p></o:p></p>

<pre>Regards, Kenneth Skovhede, GEOGRAF A/S<o:p></o:p></pre>

<p class=MsoNormal><br>
<br>
Tómas Guðmundsson skrev: <o:p></o:p></p>

<pre>Mike, all.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>With some debugging this is what I find:<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>console.log('showing :', group.layers[j], ' - ', group.layers[j].layerName);<o:p></o:p></pre><pre>showing : Object uniqueId=118e0096-0000-1000-8000-001b2418ab2d - HV_loki<o:p></o:p></pre><pre>showing : Object uniqueId=1192c52c-0000-1000-8000-001b2418ab2d - HV_brunnar<o:p></o:p></pre><pre>showing : Object uniqueId=119062dc-0000-1000-8000-001b2418ab2d - HV_lagnir<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>This is normal, this is what it should do. And this is printed out when each layer <o:p></o:p></pre><pre>calls a method &quot;layer.show()&quot;. Now, there is only one mapagent call that displays <o:p></o:p></pre><pre>this.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>clientagent&nbsp;&nbsp;&nbsp; Fusion Viewer<o:p></o:p></pre><pre>showLayers&nbsp;&nbsp;&nbsp;&nbsp; 119062dc-0000-1000-8000-001b2418ab2d<o:p></o:p></pre><pre>operation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GETMAPIMAGE<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>And evidently on my map, the only layer that get's displayed is HV_lagnir. If I change <o:p></o:p></pre><pre>the order, the last one always appears. However, the legend and &quot;group.layers[j].visible&quot; <o:p></o:p></pre><pre>all result in true. It would be kind of silly to wait for 3 images to display 3 layers, <o:p></o:p></pre><pre>so I'm wondering how this can be solved. <o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Regards,<o:p></o:p></pre><pre>Tómas<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>-----Original Message-----<o:p></o:p></pre><pre>From: <a
href="mailto:fusion-users-bounces@lists.osgeo.org">fusion-users-bounces@lists.osgeo.org</a> [<a
href="mailto:fusion-users-bounces@lists.osgeo.org">mailto:fusion-users-bounces@lists.osgeo.org</a>] On Behalf Of Tómas Guðmundsson<o:p></o:p></pre><pre>Sent: 6. ágúst 2008 09:05<o:p></o:p></pre><pre>To: Mike Adair<o:p></o:p></pre><pre>Cc: <a
href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><o:p></o:p></pre><pre>Subject: RE: [fusion-users] Problem with layer hiding and showing.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Mike,<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>I'm afraid that all I found was the 'showlayers' parameter. And it <o:p></o:p></pre><pre>was some kind of a hash,<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>clientagent&nbsp;&nbsp;&nbsp; Fusion Viewer<o:p></o:p></pre><pre>showLayers&nbsp;&nbsp;&nbsp;&nbsp; 0f682be6-0000-1000-8000-001b2418ab2d<o:p></o:p></pre><pre>operation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GETMAPIMAGE<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>I don't quite know how to decrypt that but any help would be appreciated.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>F.y.i. this is the kind of hash that would be correct with the layers<o:p></o:p></pre><pre>appropriately displayed.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>clientagent&nbsp;&nbsp;&nbsp; Fusion Viewer<o:p></o:p></pre><pre>showLayers&nbsp;&nbsp;&nbsp;&nbsp; 0f65c98c-0000-1000-8000-001b2418ab2d<o:p></o:p></pre><pre>operation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GETMAPIMAGE<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>The delta is only in the first part.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Regards,<o:p></o:p></pre><pre>Tómas.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>-----Original Message-----<o:p></o:p></pre><pre>From: Mike Adair [<a
href="mailto:madair@dmsolutions.ca">mailto:madair@dmsolutions.ca</a>] <o:p></o:p></pre><pre>Sent: 5. ágúst 2008 19:20<o:p></o:p></pre><pre>To: Tómas Guðmundsson<o:p></o:p></pre><pre>Cc: <a
href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><o:p></o:p></pre><pre>Subject: Re: [fusion-users] Problem with layer hiding and showing.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Tomas,<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>You should check the value of the 'showlayers' and 'hidelayers' <o:p></o:p></pre><pre>parameters in the sequence of mapagent calls to GETMAPIMAGE. Those are <o:p></o:p></pre><pre>the parameters that turn layers on or off. If they are what you are <o:p></o:p></pre><pre>expecting, then it's possible that there is a problem with specifying <o:p></o:p></pre><pre>those params, e.g. they should be comma-separated and they are not, or <o:p></o:p></pre><pre>vice versa.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Mike<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Tómas Guðmundsson wrote:<o:p></o:p></pre><pre>&nbsp; <o:p></o:p></pre>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Sorry about that. Everything about &quot;If I do nothing else but reload <o:p></o:p></pre><pre>the map (i.e. pan the map, zoom or refresh it) the correct layers are <o:p></o:p></pre><pre>displayed on the map (all 3 or none at all).<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>So I figure this has something to do with timing or something like <o:p></o:p></pre><pre>that, of the fetching of the map itself?&quot;<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Is wrong. So ignore that.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Rgds.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Tómas<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>*From:* <a
href="mailto:fusion-users-bounces@lists.osgeo.org">fusion-users-bounces@lists.osgeo.org</a> <o:p></o:p></pre><pre>[<a
href="mailto:fusion-users-bounces@lists.osgeo.org">mailto:fusion-users-bounces@lists.osgeo.org</a>] *On Behalf Of *Tómas <o:p></o:p></pre><pre>Guðmundsson<o:p></o:p></pre><pre>*Sent:* 5. ágúst 2008 13:36<o:p></o:p></pre><pre>*To:* <a
href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><o:p></o:p></pre><pre>*Subject:* [fusion-users] Problem with layer hiding and showing.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Hi all.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>I currently have function that I am using that systematically goes <o:p></o:p></pre><pre>through an array it's passed and walks through the layer legend to see <o:p></o:p></pre><pre>if it finds a layer. So for every layername in a layerarray, I check <o:p></o:p></pre><pre>if that layer exists and then if the checkbox is checked I show it, <o:p></o:p></pre><pre>else I hide it. Now I've been debugging this and for an array of 3 <o:p></o:p></pre><pre>layers (this also happens for layers more than 1), I get 3 times the <o:p></o:p></pre><pre>debug message &quot;showing layer&quot;, when I check the checkbox again I get <o:p></o:p></pre><pre>the debug message &quot;hiding layer&quot; 3 times as well.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>So I know this is working properly, however Mapguide Server does not <o:p></o:p></pre><pre>think so. Or at least the images I get back from the server are <o:p></o:p></pre><pre>missing one layer (the first one, every time). So according to the <o:p></o:p></pre><pre>legend all 3 layers are visible. However, the map shows everyone <o:p></o:p></pre><pre>except the first one. Now I figured this was weird, especially since <o:p></o:p></pre><pre>when I try to hide them, they all are hidden except the first one <o:p></o:p></pre><pre>which is now visible. And now for the final twist.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>If I do nothing else but reload the map (i.e. pan the map, zoom or <o:p></o:p></pre><pre>refresh it) the correct layers are displayed on the map (all 3 or none <o:p></o:p></pre><pre>at all).<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>So I figure this has something to do with timing or something like <o:p></o:p></pre><pre>that, of the fetching of the map itself?<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Please let me know if this is not clear to you and I'll try to explain <o:p></o:p></pre><pre>better, but I find it weird I can not hide more than 2 layers at a time.<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Kind regards,<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>Tómas<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>------------------------------------------------------------------------<o:p></o:p></pre><pre>&nbsp;<o:p></o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>fusion-users mailing list<o:p></o:p></pre><pre><a
href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><o:p></o:p></pre><pre><a
href="http://lists.osgeo.org/mailman/listinfo/fusion-users">http://lists.osgeo.org/mailman/listinfo/fusion-users</a><o:p></o:p></pre><pre>&nbsp; <o:p></o:p></pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;<o:p></o:p></pre></blockquote>

<pre>_______________________________________________<o:p></o:p></pre><pre>fusion-users mailing list<o:p></o:p></pre><pre><a
href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><o:p></o:p></pre><pre><a
href="http://lists.osgeo.org/mailman/listinfo/fusion-users">http://lists.osgeo.org/mailman/listinfo/fusion-users</a><o:p></o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>fusion-users mailing list<o:p></o:p></pre><pre><a
href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><o:p></o:p></pre><pre><a
href="http://lists.osgeo.org/mailman/listinfo/fusion-users">http://lists.osgeo.org/mailman/listinfo/fusion-users</a><o:p></o:p></pre><pre>&nbsp; <o:p></o:p></pre></div>

</body>

</html>