[mapserver-users] scale dependent layers

Jean-Francois.Doyon@ccrs.nrcan.gc.ca Jean-Francois.Doyon@ccrs.nrcan.gc.ca
Wed, 11 Sep 2002 12:39:27 -0400


Rob,

Well one idea comes to mind, and that would be to write some javascript in
your template that looks at the status of the layers and then generates some
output based on that condition.

This should be easily achieved by using the [layer_check] template tag.  So
you could write something like if ( 'checked' == '[mylayername_check]' ) {
... } ... [mylayername_check] will say 'checked' if the layer is on, and
otherwise nothing.

In the curly braces, maybe you could use some document.writes or something
...

Just an idea, I've never done this myself :)

Hope this helps,
J.F.

-----Original Message-----
From: Rob Holloway [mailto:rholloway_1999@yahoo.com]
Sent: Wednesday, September 11, 2002 11:34 AM
To: mapserver-users@lists.gis.umn.edu
Subject: [mapserver-users] scale dependent layers


Hi

Does anyone know how to keep scale dependent layers
(i.e layers with a maxscale set) from displaying on
the template/html form until the specified scale has
been reached?  For example, in my application a
buildings layer has a maxscale factor of 100 000 but
it still shows up in the list of layers that can be
displayed at full extent.  This would probably be
confusing to users trying to select that layer at
large scale.  Any suggestions?

Cheers

Rob

__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute