Re[mapguide-users] turn all Layers from MapGuide repository

adnan.c adnan.chughtai at keynetix.com
Thu Jun 12 06:16:41 EDT 2008


Hello All,

Currently working with the API for MapGuide OpenSource 2.0 and have a
requirement for returning all layers from the MapGuide repository.

I am able to return all layer names for a particular map using the below C#
code

            map.Open(resService, mapName);

            MgLayerCollection layers = map.GetLayers();

            ArrayList layerNames = new ArrayList();

            for (int i = 0; i < layers.GetCount(); i++)
            {
                MgLayer layer = (MgLayer)layers.GetItem(i);

                string layerType = layer.GetFeatureGeometryName();
              
                    layerNames.Add(layer.GetName());
            }

How would I go about returning all Layers in the MapGuide repository as a
large number of layers won't be associated with a map?

Many Thanks,

Adnan

-- 
View this message in context: http://www.nabble.com/Return-all-Layers-from-MapGuide-repository-tp17796701p17796701.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list