Skip to main content

ScaleBarInput

What the scale bar needs to know.

This is an interface exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import type { ScaleBarInput } from "@mapcairn/core";

interface ScaleBarInput

Properties​

maxWidthPx​

readonly maxWidthPx: number;

The widest the bar may be, in CSS pixels.

messages​

readonly messages: MessageCatalogue;

The catalogue the visible label is written with: its digits, symbols and order.

metresPerPixel​

readonly metresPerPixel: number;

Ground resolution at the map centre, in metres per pixel.

units​

readonly units: UnitSystem;

Whether the bar is labelled in metric or imperial units.

See also​

Source: packages/core/src/scale/scale.ts:21