[mapserver-users] Getting a list of ALL layers to client

C F gis_consultant at hotmail.com
Tue May 21 17:17:05 EDT 2002


Hello,
With all the great and advanced functionality of MapServer, I'm amazed at 
the basic things that I get stumped by :)
Anyone know how I would get a list of all layers defined in the .map file to 
a web-browser/javascript client (without using MapScript)?  It seems like 
this is would be a token available for use in a template file.  But all I 
see are [layers] and [get_layers] which only return a list of which layers 
that are currently turned on (visible).  At minimum I would want a list of 
ALL layers (on or off) available for viewing at the current scale.  Even 
better would be able get a list of *all* layers in the .map file plus an 
attribute indicating which ones are currently available.
The reason for wanting to do this is so that we don't have to hard code 
layers id's and names into the client and worry about .map/client 
synchronization problems.
I have a feeling I'm overlooking the obvious... but I can't seem to figure 
it out.  I see all kinds of workarounds I can do, but I wanted to first know 
if the capability was built in.

Which brings me to XML... but I'll put that in my next post.

Thanks!!!

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx




More information about the mapserver-users mailing list