<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I have no idea how to do this in fusion, but you will likely have to
run through the layer list when doing a "layer.show()".<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.<br>
<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Tómas Guðmundsson skrev:
<blockquote
cite="mid:FD1AEAFE8595974CADD8952EB37BF8843618E3@askja.snertill.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<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;}
/* 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-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]-->
<div class="Section1">
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Thanks
Kenneth,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">I’m
trying to figure it out how I put multiple GUIDS into
the mapagent request.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Only
way I know how to do it is with layer.show(). I’ll
look more into it but if you<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Have
it on the top of your head, any info would be great thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Tómas.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<div>
<div
style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p class="MsoNormal"><b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">From:</span></b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">
Kenneth Skovhede, GEOGRAF A/S
[<a class="moz-txt-link-freetext" 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 class="moz-txt-link-abbreviated" 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.<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">the "ShowLayers" parameter in the
"GETMAPIMAGE" 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<br>
<br>
<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><o:p> </o:p></pre>
<pre>With some debugging this is what I find:<o:p></o:p></pre>
<pre><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><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 "layer.show()". Now, there is only one mapagent call that displays <o:p></o:p></pre>
<pre>this.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>clientagent Fusion Viewer<o:p></o:p></pre>
<pre>showLayers 119062dc-0000-1000-8000-001b2418ab2d<o:p></o:p></pre>
<pre>operation GETMAPIMAGE<o:p></o:p></pre>
<pre><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 "group.layers[j].visible" <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><o:p> </o:p></pre>
<pre>Regards,<o:p></o:p></pre>
<pre>Tómas<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>-----Original Message-----<o:p></o:p></pre>
<pre>From: <a moz-do-not-send="true"
href="mailto:fusion-users-bounces@lists.osgeo.org">fusion-users-bounces@lists.osgeo.org</a> [<a
moz-do-not-send="true"
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 moz-do-not-send="true"
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><o:p> </o:p></pre>
<pre>Mike,<o:p></o:p></pre>
<pre><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><o:p> </o:p></pre>
<pre>clientagent Fusion Viewer<o:p></o:p></pre>
<pre>showLayers 0f682be6-0000-1000-8000-001b2418ab2d<o:p></o:p></pre>
<pre>operation GETMAPIMAGE<o:p></o:p></pre>
<pre><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><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><o:p> </o:p></pre>
<pre>clientagent Fusion Viewer<o:p></o:p></pre>
<pre>showLayers 0f65c98c-0000-1000-8000-001b2418ab2d<o:p></o:p></pre>
<pre>operation GETMAPIMAGE<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>The delta is only in the first part.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Regards,<o:p></o:p></pre>
<pre>Tómas.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>-----Original Message-----<o:p></o:p></pre>
<pre>From: Mike Adair [<a moz-do-not-send="true"
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 moz-do-not-send="true"
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><o:p> </o:p></pre>
<pre>Tomas,<o:p></o:p></pre>
<pre><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><o:p> </o:p></pre>
<pre>Mike<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Tómas Guðmundsson wrote:<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;">
<pre>Sorry about that. Everything about "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><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><o:p> </o:p></pre>
<pre>Is wrong. So ignore that.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Rgds.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Tómas<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>*From:* <a moz-do-not-send="true"
href="mailto:fusion-users-bounces@lists.osgeo.org">fusion-users-bounces@lists.osgeo.org</a> <o:p></o:p></pre>
<pre>[<a moz-do-not-send="true"
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 moz-do-not-send="true"
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><o:p> </o:p></pre>
<pre>Hi all.<o:p></o:p></pre>
<pre><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 "showing layer", when I check the checkbox again I get <o:p></o:p></pre>
<pre>the debug message "hiding layer" 3 times as well.<o:p></o:p></pre>
<pre><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><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><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><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><o:p> </o:p></pre>
<pre>Kind regards,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Tómas<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>------------------------------------------------------------------------<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>fusion-users mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true"
href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true"
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> <o:p></o:p></pre>
</blockquote>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>fusion-users mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true"
href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true"
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 moz-do-not-send="true"
href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true"
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>
</div>
</blockquote>
</body>
</html>