How to render current map scale via mapscript?

David Niergarth dn at HDDESIGN.COM
Wed Nov 14 12:50:16 EST 2007


Using an html template, I can render the current map scale using [scale]. How 
can I do this from mapscript?

I'm not using html templates. Instead, I start with a map file, instantiate it 
in Python mapscript, add various layers, then render the map and legend.

I'm trying to tweak my map file (adjusting MAXSCALE, MINSCALE for layers) but 
it's tedious without knowing what mapserver thinks the current map scale is. Is 
there some simple way to calculate the current scale?

Thanks for any suggestions,

--David



More information about the mapserver-users mailing list