[mapguide-users] [ZS1] Drawing order of layers in a map

m.karam m21384k at yahoo.com
Tue Oct 30 21:14:05 EDT 2007


thanks for your reply
I tried that ..
but sometimes, the features of the layer that i remove, don't appear unless
i refresh that layer from the legend


i tried another solution ..
to change the layers order in the map definition and save it in the session.
And also, update the web layout by changing the ResourceId of the map.
Now, I have a map definition and web layout in the session

but when i pass the new web layout to the viewer, it gives me an error
message:
"MgInvalidMapDefinitionException"

what will i do for this error?
Is that any error in the XML of the map definition?
please help ...
Karam



Kenneth, GEOGRAF A/S wrote:
> 
> Hmm, I see... For some reason this property is not avalible in the API.
> 
> You can remove it from the layers collection (code in C#):
> MgMap map = ......;
> MgMapLayerCollection col = map.GetLayers();
> MgMapLayer layer= (MgMapLayer)col[0];
> col.RemoveAt(0);
> col.Insert(col.Count - 1, layer)
> map.Save(...);
> 
> That will move the first layer down to the last position.
> 
> 
> 
> Regards, Kenneth, GEOGRAF A/S
> 
> 
> 
> m.karam skrev:
>> the layers don't have a "DisplayOrder" property...
>>
>>
>>
>> Kenneth, GEOGRAF A/S wrote:
>>   
>>> I belive that the layers have a "DisplayOrder" property.
>>> So do:
>>>
>>> 1. Load runtime map
>>> 2. Change "DisplayOrder" property of layers
>>> 3. Save runtime map
>>> 4. Refresh client display
>>>
>>> Regards, Kenneth, GEOGRAF A/S
>>>
>>>
>>>
>>> m.karam skrev:
>>>     
>>>> Hi everybody
>>>>
>>>> I want to change the (Drawing Order) of the Map Layers at run-time
>>>> according
>>>> to a specific conditions
>>>> How can i do it?
>>>>
>>>> Thanks in advance
>>>> Karam
>>>>   
>>>>       
>>> _______________________________________________
>>> mapguide-users mailing list
>>> mapguide-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>
>>>
>>>     
>>
>>   
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Drawing-order-of-layers-in-a-map-tf4717405s16610.html#a13501182
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list