[Mapserver-users] Drawing groups with perlMapscript

Lowell Filak lfilak at medinaco.org
Wed May 7 10:33:02 EDT 2003


I don't know of a 'group' object which is what I think your looking for here.
However you can emulate a group by selecting all layers then looping through each of them and retrieving the group name ($layer->{group}) then set the layers which belong to the group you wish to draw on.
You can also add/remove layers that belong to a group by changing the value of $layer->{group} which may be a simpler solution depending on what your trying to accomplish.
HTH
Lowell F.

The following message was sent by Eduardo Spremolla <edspremolla at Antel.com.uy> on 07 May 2003 08:44:38 -0300.

> Hi all:
> 
> 	In the CGI version you can set a group on and all the layers in the
> group get draw.
> 	I'm now working with perl Mapscript , and the sequence:
> 
>   	my $layer = $map->getLayerByName('group_name');
>         $layer->draw($map, $img);
>     
> 	fails, since there is no layer with that name.
> 
> 	Is there a way to do it, without stating every layer in the group?
> 
> Thanks in advance
> 
> 
> Eduardo Spremolla
> Montevideo
> Uruguay
> 
> 
> 
> 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list