How can i know the layers of group, mg 2.1?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How can i know the layers of group, mg 2.1?

alba
Hi all,

How can i know the layers of a group?
or
How can i know the group of  a layer?

thanks Alba
Reply | Threaded
Open this post in threaded view
|

Re: How can i know the layers of group, mg 2.1?

zspitzer
the api docs explain this, here is a good starting point

http://www.google.com.au/?q=mapguide+layer+group+api

On Tue, Mar 2, 2010 at 9:51 PM, alba <[hidden email]> wrote:

>
> Hi all,
>
> How can i know the layers of a group?
> or
> How can i know the group of  a layer?
>
> thanks Alba
> --
> View this message in context: http://n2.nabble.com/How-can-i-know-the-layers-of-group-mg-2-1-tp4660248p4660248.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>



--
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: How can i know the layers of group, mg 2.1?

alba
hi zspitzer,

I use php
...........
$layers = $map->GetLayers();
$layerGroupCollection = $map->GetLayerGroups();
 for ($j = 0; $j < $layerGroupCollection->GetCount(); $j++)
{
   $layerGroup = $layerGroupCollection->GetItem($j);
   for ($i = 0; $i < $layers->GetCount(); $i++){

         $layer = $layers->GetItem($i);
         $piano=$layer->GetName();
               $layer->GetGroup();   // how do I know the group of $layer ??????????????

   }

}