[mapserver-users] scale dependent layers
Steve Lime
steve.lime at dnr.state.mn.us
Wed Sep 11 09:04:00 PDT 2002
If I read you right your interested in the layer controls as opposed to
the legend (which already respects scale). Well, there's no super easy
way to do that. You could use javscript to check the map scale (using
[scale]) against the layer scale and based on that write the control.
That would work but would require you to have the layer scale
information in 2 places (in the template and in the mapfile). You could
of course store the layer scales only in the HTML file and pass them to
the mapserver (i.e. map_layername_maxscale, map_layername_minscale). I
think ideally you'd rather gain access to the values as stored in the
mapfile. There's some real value in that so I would propose adding
substitutions like [layername_maxscale/minscale] and then you could use
those in combination with [scale] and javascript. Thoughts folks?
Steve
Stephen Lime
Data & Applications Manager
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Rob Holloway <rholloway_1999 at yahoo.com> 09/11/02 10:34AM >>>
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
More information about the MapServer-users
mailing list