[mapserver-users] How to group layers

Seamus Thomas Carroll carrolls at unbc.ca
Thu Jul 25 14:40:18 EDT 2002


Use the group key word.

EX

LAYER
  NAME "rail_1"
  GROUP "rail"
  ...
END

LAYER
  NAME "rail_2"
  GROUP "rail"
  ...
END

Now you can refer to an individual layer or a group of layers.

Seamus

On Thu, 25 Jul 2002, randy james wrote:

> I found that if you give the layers the same name you
> can turn them on and off using the name. But its not
> the correct way :-) Like this:
>  
>  
>  LAYER
>    NAME "rail"
>    DATA "Rail/rail_line_t2_polyline"
>    STATUS OFF
>    Type LINE
>    CLASS
>      Name "MTR KCR"
>      Color 0 0 0
> #   END #end of class object
> # END #end of layer object
>  
>  LAYER
>    NAME "rail"
>    DATA "Rail/rail_line_t3_polyline"
>    STATUS OFF
>    Type LINE
>    CLASS
>      Name "MTR KCR"
>      Color 0 0 0
>    END #end of class object
>  END #end of layer object
> 
> than in the template file
> 
> <input type="checkbox" name="rail" value="rail"
> [rail_check]>MTR KCR
> 
> Randy
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
> 




More information about the mapserver-users mailing list