[mapguide-users] Re: Creating and adding layers
ks at geograf.dk
Sat Jan 30 14:07:23 EST 2010
What is the "table of content" ?
Make sure you set "layer.Visible = true"
Make sure your layer is on top (IIRC, Layers.Add() places it at the bottom).
I vaguely recall some issue with the legend not refreshing correctly.
Regards, Kenneth Skovhede, GEOGRAF A/S
Dejan Gregor skrev:
> Dear Kenneth,
> my colleague that has tried to apply your sample code (below) is saying that
> when adding a layer programmatically in MGOS 2.0, he does not get the table
> of content updated. Is there some special 'refresh' or some other parameter
> required somewhere to be checked?
> MgResourceService srvc;
> MgMap map = new MgMap();
> map.Open(srvc, "mapname");
> MgLayer layer = new MgLayer();
> ... set layer properties, such as .LayerDefinition path ...
> map.Save(srvc, "mapname");
> Dejan Gregor, MSc
> GISc Researcher and Consultant
More information about the mapguide-users