Conditional "Legends"

Banister Trevor TBanister at SpaceImaging.com
Thu Nov 4 19:35:03 EST 1999


The way I would do it is to create a different map and/or template file for
the different zoom levels. If you need both a new map and template, you'll
have to construct a URL with the CGI tags [layers], [mapext] etc. Hopefully
you don't have too many or it might be a lot of work.

Use the maxtemplate and mintemplate functions to automagically change the
map and template without the user noticing.

>From http://mapserver.gis.umn.edu/mapfile.html
maxtemplate [filename|url]: Template file or url to use in presenting the
results to the user when above the maxscale. Useful for nesting interfaces. 

mintemplate [filename|url]: Template file or url to use in presenting the
results to the user when below the minscale. Useful for nesting interfaces. 

Hope this helps.

Trevor

-----Original Message-----
From: Doug Nebert [mailto:ddnebert at usgs.gov]
Sent: Thursday, November 04, 1999 11:58 AM
To: Mapserver Users
Subject: Conditional "Legends"


I have a series of base maps that are being used to present a 
world to local view.  At different levels of zoom (or surrogate 
scale) I would like to display different items in the legend 
as declared in the _template.html file. It would seem that a 
scale variable could be accessible to JavaScript based on the 
current extent, yes? 

Thus I would not even show roads as an option on a global 
view and could switch layers and labels at a high level of 
zoom. I need to not use Zoom level but the derived scale 
being used for the current image.

Example javaScript solutions appreciated!

-- 
Douglas D. Nebert
Clearinghouse Coordinator 
FGDC Secretariat	Phone: +1 703 648 4151	Fax: +1 703 648-5755	
Pager Messaging: 	http://fgdclearhs.er.usgs.gov/dougmsg.html



More information about the mapserver-users mailing list