Configuring Print Scales¶
The fixed scales offered in the print dialog can be set via the
application configuration’s print.scales. The “Scale to fit” options
are always available; when print.scales is omitted a built-in set of
common scales is used.
The configuration is passed to the gm3.Application constructor in your
app.js.
var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
print: {
scales: [
{scale: 50},
{scale: 1000},
{scale: 24000},
{label: "1000 ft / in", metersPerPt: 4.2333}
]
}
});
To offer only the “Scale to fit” options and no fixed scales, set
scales to an empty array:
var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,
print: {
scales: []
}
});
Each entry sets the scale one of two ways:
scale- A1:Nratio (e.g.24000for1:24000). Simplest, and the natural fit for metric printing.metersPerPt- The ground distance, in meters, that one PDF point of paper represents (72 points per inch). For “per inch” scales, divide the per-inch distance by 72:1000 ft / inis1000 * 0.3048 / 72.
label is optional; a 1:N label is derived from the scale when
omitted.
The built-in scales¶
When print.scales is omitted, the engineering scales below are
offered. They cover the US local-government use cases discussed in
geomoose/gm3#999. Set
print.scales to replace the list outright with your own – for
metric printing, or to reach the regional scales (1 mile per inch,
1:100000) that the defaults stop short of.
Because a foot is exactly 12 inches, every “feet per inch” scale is an
exact 1:N ratio, so each can be reproduced with the simpler
scale form:
Scale |
|
Typical use |
|---|---|---|
1 inch = 10 feet |
|
Septic evaluations and permits |
1 inch = 20 feet |
|
Intersection layouts, utility alignments |
1 inch = 40 feet |
|
Residential streets, general utility plans |
1 inch = 50 feet |
|
Grading plans, larger parcels, subdivision layouts |
1 inch = 100 feet |
|
City-wide overviews, long right-of-way maps |
1 inch = 200 feet |
|
Planning and zoning maps |
1 inch = 300 feet |
|
|
1 inch = 400 feet |
|
|
1 inch = 500 feet |
|
USNG and fire maps (a 1 km square fits on letter) |
1 inch = 600 feet |
|
|
1 inch = 2000 feet |
|
7.5 minute USGS topographic quadrangle |
Note
Scales assume a basemap in meters (web mercator) and are true at the map center; like any web-mercator map, scale distorts toward the poles.