[fusion-users] Problem with layer hiding and showing.

Tómas Guðmundsson tomas at snertill.is
Tue Aug 5 09:52:00 EDT 2008


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: fusion-users-bounces at lists.osgeo.org [mailto:fusion-users-bounces at lists.osgeo.org] On Behalf Of Tómas Guðmundsson
Sent: 5. ágúst 2008 13:36
To: fusion-users at lists.osgeo.org
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fusion-users/attachments/20080805/d11d329c/attachment.html


More information about the fusion-users mailing list