BBoxField

Shows a BBox value from a record, [west, south, east, north], as a rectangle on a map. A value that is not four finite numbers shows the empty text panel. It is GeoJsonField over a box, so it takes the same props.

Loading preview…

Shows a BBox value from a record, [west, south, east, north], as a rectangle on a map. A value that is not four finite numbers shows the empty text panel. It is GeoJsonField over a box, so it takes the same props.

Installation

import { BBoxField } from "@chelone/react/maps";

See the maps guide for the subpaths, the optional packages and MapsProvider.

Props

PropTypeDefaultDescription
classNamestring—
defaultValueunknown—Used when the property is `undefined`.
emptyTextstring—Replaces the translation of `chelone.map.no_geometry`.
fitBoundsboolean—Frame the map around the data. Defaults to true.
fitPaddingnumber—Pixels kept free around the fitted box. Defaults to 20.
heightstring | number—In pixels, or any CSS length. Defaults to 300.
mapStyleMapStyleInput—Defaults to the style from `MapsProvider`.
maxFitZoomnumber—The highest zoom a fit may reach, which also sets a single Point's zoom. Defaults to 18.
recordRecordType—Defaults to the ambient record.
scrollZoomboolean—Zoom with the mouse wheel. Defaults to false so the page still scrolls.
shapeStyleShapeStyle—Partial over `DEFAULT_SHAPE_STYLE`.
sourceSourceProp<RecordType>—The record property holding the GeoJSON value.