<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Mark,<br>
<br>
The glib answer is "don't measure on the screen". Now for the
long answer....<br>
<br>
I did an evaluation of the scale in GeoMoose v1.6.1 a couple of
years ago and found the same problem as you. Back then (before
OpenLayers), there was a GeoMoose config setting called
MAP_PIXELS_PER_INCH with a default setting of 72. When I adjusted
it to my screen's dpi the scale was fine. I expect there is a
similar setting in OpenLayers (DOTS_PER_INCH?). But the problem is
you can't depend on a monitor having a particular dpi (the browser
can look it up though). Here's some of the chatter from Sept 2009
(it that email archived somewhere?):<br>
<br>
<pre wrap=""> I'm not really too concerned about the map scale on the screen,
but I wanted to make sure I understood how Mapserver/Geommoose/FPDF was scaling
the images (since the printed scale is very important).
So the first step is to get the screen scale close:
Measuring the boxes in the link you provided below (<a class="moz-txt-link-freetext" href="https://gis.ci.stpaul.mn.us/10in-test.html">https://gis.ci.stpaul.mn.us/10in-test.html</a>), I saw that they were 5%
too big (the 10cm box measured 10.5cm). I looked up the "pixel pitch" of my
monitor (0.281 mm/pixel), calculated the dpi (90.391), set that value (it was
originally set to 96 dpi) in the Display (Control
panel->display->settings->advanced->general), rebooted. ... Perfect!
Now to measure my graticule. With "MAP_PIXELS_PER_INCH = 72" in the Geomoose
config.js file, the grid spacing was about 20% too small; not good. I changed
my site settings from "MAP_PIXELS_PER_INCH = 72" to MAP_PIXELS_PER_INCH =
90.391; ... Perfect!
The bottom line is, while most (all?) monitor drivers dpi setting may be off,
Geomoose would be better off doing the calculation as Bob pointed out below,
rather than "hard-coding" it in the site settings.
Now I need to look at the printed map scale process...</pre>
==================================================================<br>
<pre wrap=""> To sum up:
1. Printing to Scale
--------------------
I made some mods to v1.6.1 to pass the value of the ScaleBox to the PHP
printing system, and added some code to re-calc the extents of the map portion
of the page. It seems to work well. If others are interested, I can talk with
Dan to get the changes integrated into geomoose-trunk (AKA v1.6.1+). Some
parts may even be useful for GM v2.
2. Map to Scale on the Screen
-----------------------------
There's no need to adjust your display driver DPI setting, just set the
MAP_PIXELS_PER_INCH value in Geomoose's config.js and you'll get a map displayed
exactly to scale. However, this value will be used for all client screens (and
they likely all have different DPI), so unless one of your users complains,
don't bother.
3. Better Screen Scale
----------------------
A low priority enhancement for GM v2 would be to have the JavaScript
calculate the screen resolution (see Bob's earlier posting in this thread) to
get the screen scale to within 5%-ish (instead of the current 20% to 30%).</pre>
<br>
<br>
<pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
<br>
On 1/12/2012 12:47 PM, Mark Volz wrote:
<blockquote
cite="mid:36CA828A36E29F45B7CF0A1766E5DFA30BA384@swmail01.r8nssis.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Hello,</div>
<div> </div>
<div>I noticed that the text on the scale dropdown is
incorrect. For example, I measured 1 foot on my screen,
which measured out to be 1200 feet on the map; which works
out to be a scale of 1:1200. The stated scale on the
textbox on the bottom of the screen
reported that the scale is 1:864 not 1:1200, which it should
be. I noticed that 864/1200 is .72, which mapserver assumes
a 72 DPI, so I don’t know if that has something to do with
the scale being incorrect.</div>
<div> </div>
<div>This bug / issue is on all of many of the 2.2 sites that
I are out there.</div>
<div> </div>
<div>Thanks</div>
<div> </div>
<div>Mark Volz</div>
<div>GIS Specialist</div>
<div> </div>
<div> </div>
<div> </div>
</span></font>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Geomoose-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Geomoose-users@lists.osgeo.org">Geomoose-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/geomoose-users">http://lists.osgeo.org/mailman/listinfo/geomoose-users</a>
</pre>
</blockquote>
</body>
</html>