<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Tómas Guðmundsson skrev:
<blockquote
cite="mid:FD1AEAFE8595974CADD8952EB37BF8843618DF@askja.snertill.local"
type="cite">
<pre wrap="">Mike, all.
With some debugging this is what I find:
console.log('showing :', group.layers[j], ' - ', group.layers[j].layerName);
showing : Object uniqueId=118e0096-0000-1000-8000-001b2418ab2d - HV_loki
showing : Object uniqueId=1192c52c-0000-1000-8000-001b2418ab2d - HV_brunnar
showing : Object uniqueId=119062dc-0000-1000-8000-001b2418ab2d - HV_lagnir
This is normal, this is what it should do. And this is printed out when each layer
calls a method "layer.show()". Now, there is only one mapagent call that displays
this.
clientagent        Fusion Viewer
showLayers        119062dc-0000-1000-8000-001b2418ab2d
operation        GETMAPIMAGE
And evidently on my map, the only layer that get's displayed is HV_lagnir. If I change
the order, the last one always appears. However, the legend and "group.layers[j].visible"
all result in true. It would be kind of silly to wait for 3 images to display 3 layers,
so I'm wondering how this can be solved.
Regards,
Tómas
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:fusion-users-bounces@lists.osgeo.org">fusion-users-bounces@lists.osgeo.org</a> [<a class="moz-txt-link-freetext" href="mailto:fusion-users-bounces@lists.osgeo.org">mailto:fusion-users-bounces@lists.osgeo.org</a>] On Behalf Of Tómas Guðmundsson
Sent: 6. ágúst 2008 09:05
To: Mike Adair
Cc: <a class="moz-txt-link-abbreviated" href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a>
Subject: RE: [fusion-users] Problem with layer hiding and showing.
Mike,
I'm afraid that all I found was the 'showlayers' parameter. And it
was some kind of a hash,
clientagent        Fusion Viewer
showLayers        0f682be6-0000-1000-8000-001b2418ab2d
operation        GETMAPIMAGE
I don't quite know how to decrypt that but any help would be appreciated.
F.y.i. this is the kind of hash that would be correct with the layers
appropriately displayed.
clientagent        Fusion Viewer
showLayers        0f65c98c-0000-1000-8000-001b2418ab2d
operation        GETMAPIMAGE
The delta is only in the first part.
Regards,
Tómas.
-----Original Message-----
From: Mike Adair [<a class="moz-txt-link-freetext" href="mailto:madair@dmsolutions.ca">mailto:madair@dmsolutions.ca</a>]
Sent: 5. ágúst 2008 19:20
To: Tómas Guðmundsson
Cc: <a class="moz-txt-link-abbreviated" href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a>
Subject: Re: [fusion-users] Problem with layer hiding and showing.
Tomas,
You should check the value of the 'showlayers' and 'hidelayers'
parameters in the sequence of mapagent calls to GETMAPIMAGE. Those are
the parameters that turn layers on or off. If they are what you are
expecting, then it's possible that there is a problem with specifying
those params, e.g. they should be comma-separated and they are not, or
vice versa.
Mike
Tómas Guðmundsson wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Sorry about that. Everything about "If I do nothing else but reload
the map (i.e. pan the map, zoom or refresh it) the correct layers are
displayed on the map (all 3 or none at all).
So I figure this has something to do with timing or something like
that, of the fetching of the map itself?"
Is wrong. So ignore that.
Rgds.
Tómas
*From:* <a class="moz-txt-link-abbreviated" href="mailto:fusion-users-bounces@lists.osgeo.org">fusion-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:fusion-users-bounces@lists.osgeo.org">mailto:fusion-users-bounces@lists.osgeo.org</a>] *On Behalf Of *Tómas
Guðmundsson
*Sent:* 5. ágúst 2008 13:36
*To:* <a class="moz-txt-link-abbreviated" href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a>
*Subject:* [fusion-users] Problem with layer hiding and showing.
Hi all.
I currently have function that I am using that systematically goes
through an array it's passed and walks through the layer legend to see
if it finds a layer. So for every layername in a layerarray, I check
if that layer exists and then if the checkbox is checked I show it,
else I hide it. Now I've been debugging this and for an array of 3
layers (this also happens for layers more than 1), I get 3 times the
debug message "showing layer", when I check the checkbox again I get
the debug message "hiding layer" 3 times as well.
So I know this is working properly, however Mapguide Server does not
think so. Or at least the images I get back from the server are
missing one layer (the first one, every time). So according to the
legend all 3 layers are visible. However, the map shows everyone
except the first one. Now I figured this was weird, especially since
when I try to hide them, they all are hidden except the first one
which is now visible. And now for the final twist.
If I do nothing else but reload the map (i.e. pan the map, zoom or
refresh it) the correct layers are displayed on the map (all 3 or none
at all).
So I figure this has something to do with timing or something like
that, of the fetching of the map itself?
Please let me know if this is not clear to you and I'll try to explain
better, but I find it weird I can not hide more than 2 layers at a time.
Kind regards,
Tómas
------------------------------------------------------------------------
_______________________________________________
fusion-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/fusion-users">http://lists.osgeo.org/mailman/listinfo/fusion-users</a>
</pre>
</blockquote>
<pre wrap=""><!---->_______________________________________________
fusion-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/fusion-users">http://lists.osgeo.org/mailman/listinfo/fusion-users</a>
_______________________________________________
fusion-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/fusion-users">http://lists.osgeo.org/mailman/listinfo/fusion-users</a>
</pre>
</blockquote>
</body>
</html>