[Mapserver-users] zoom to user scale

Ed McNierney ed@topozone.com
Thu, 12 Dec 2002 12:33:49 -0500


Kevin -

You need to do the math to calculate the extents they need.  This is quite tricky to do accurately at all.  72 dpi is actually a very poor choice these days - most users are looking at higher resolution screens, and if you're printing from a Web browser then your browser is going to use its OWN value for screen resolution when it generates the output image for printing (usually around 96 dpi, but it varies from one browser to another).

For example, if you assume 96 dpi, then if the user asks for 1:100,000 scale that means that one unit on the screen equals 100,000 units on the ground.  96 dpi means 96 dots per inch, so one unit on the screen = 1 pixel = 1/96 inches.  So 1/96 inches on the screen = 100,000/96 inches on the ground, so each pixel represents 1041.67 inches = 86.81 feet = 26.47 meters.  When you generate a map request to MapServer you specify the spatial (geographic) extent AND the size of the output image.  If the geographic extent in meters is 26.47 times the image size in pixels, you'll get an image that's exactly at 1:100,000 scale....

...IF and only if it's viewed or displayed at 96 dpi.  If the user fiddles with the image size control on the monitor, you're out of luck <g>.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed@topozone.com
(978) 251-4242 

-----Original Message-----
From: Kevin Flanders [mailto:kevinflanders@rcn.com]
Sent: Thursday, December 12, 2002 12:14 PM
To: mapserver-users@lists.gis.umn.edu
Subject: [Mapserver-users] zoom to user scale


Is there a way to setup Mapserver so that the user can input the scale they
wish to zoom to, ie. 100-scale, etc.....thereby enabling them to print a map
at a set scale.  I know there are issues with scale and the dpi settings for
individual monitors, but assuming 72 dpi.....can this be done?  Has this
been done?


Kevin


_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users