Skip to main content

MapReadoutProps

Props for MapReadout.

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

Signature​

import type { MapReadoutProps } from "@mapcairn/map";

interface MapReadoutProps extends ScaleBarProps, Pick<CursorCoordinatesProps, "latlng">

Properties​

onCursorLeave​

readonly onCursorLeave?: () => void;

Called when the pointer leaves the readout for anything but the map. The map keeps the last position while the pointer moves from it onto the readout, so the coordinates stay put and can be copied; this is where the host clears them.

showZoom​

readonly showZoom?: boolean;

Whether to show the map's zoom level beside the coordinates. Left out, it follows the chrome layout: shown in the side panel layout and left out in the bottom sheet layout, which keeps the readout short on a small screen. Pass true or false to decide it yourself. The credits popover clears the readout either way.

See also​

Source: packages/map/src/chrome/MapReadout/MapReadout.tsx:237