[mapguide-users] Re: Creating and adding layers

Dejan Gregor dejan.gregor at GMAIL.COM
Tue Jan 26 03:25:58 EST 2010


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?

Thanks!

MgResourceService srvc;
MgMap map = new MgMap();
map.Open(srvc, "mapname");
MgLayer layer = new MgLayer();
... set layer properties, such as .LayerDefinition path ...
map.Layers.Add(layer);
map.Save(srvc, "mapname");

-----

Dejan Gregor, MSc 
GISc Researcher and Consultant 

http://www.linkedin.com/in/dgregor 
-- 
View this message in context: http://n2.nabble.com/Creating-and-adding-layers-tp3941863p4459453.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list