[mapguide-users] Re: Creating and adding layers

Ivan Miličević Ivan.Milicevic at supranet.hr
Thu Jan 28 06:58:48 EST 2010


Hello guys,

I can handle this on our local language.

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Dejan Gregor
Sent: Tuesday, January 26, 2010 9:26 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Re: Creating and adding layers


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.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


More information about the mapguide-users mailing list