[mapserver-users] [scale] template substitution string invalid

John Maurer maurerj at nsidc.org
Mon Feb 25 09:37:29 EST 2008


Hi,
I read on the MapServer Web site in the "Template File Reference" page at:

http://mapserver.gis.umn.edu/docs/reference/templatereference/templatereference/view

that you can use "[scale]" in your HTML template to enable MapServer to 
do a template substitution for the denominator of the scale of the 
currently displayed map, as in the following example:

Scale = 1:[scale]

However, the scale that is reported is obviously wrong in every case 
that I've tried. As I have read elsewhere on this user list, the 
fundamental problem is that using scale ratios (e.g. 1:5015) to express 
the scale of digital maps is meaningless unless you can also specify or 
control the resolution of the output device (screen or printer). Since 
MapServer has no knowledge of the resolution of the user's screen, this 
[scale] parameter is only useful for the developer who needs to set min 
or max scale parameters in the map file but not useful for the end user 
and is in fact misleading for the end user. Or am I missing something? 
If this is correct, then the "Template File Reference" should be updated 
accordingly. I also read somewhere on this user list that MapServer 
assumes a default 72 dpi screen resolution, which would also be good to 
mention in this "Template File Reference." Lastly, it's recommended to 
display the [scale] parameter in the "Beginning MapServer" book (p. 72), 
so there seems to be some confusion surrounding the use of this parameter.

Thanks for any help.
Cheers,
John Maurer

-- 
John Maurer
Web/Database Applications Engineer
National Snow and Ice Data Center (NSIDC)
University of Colorado at Boulder
http://cires.colorado.edu/~maurerj
------------------------------------
"Without geography, you're nowhere!"




More information about the mapserver-users mailing list