LatLngField

Shows a point held in two record fields, latSource and lngSource, as a marker on a map centred on it. A missing, null, non-numeric or out-of-range coordinate shows a text panel in its place; 0 is a position.

Loading preview…

Shows a point held in two record fields, latSource and lngSource, as a marker on a map centred on it. A missing, null, non-numeric or out-of-range coordinate shows a text panel in its place; 0 is a position.

Installation

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

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

Props

PropTypeDefaultDescription
classNamestring—
heightstring | number—In pixels, or any CSS length. Defaults to 300.
latSourceSourceProp<TRecord>—The record property holding the latitude.
lngSourceSourceProp<TRecord>—The record property holding the longitude.
mapStyleMapStyleInput—Defaults to the style from `MapsProvider`.
recordTRecord—Defaults to the ambient record.
zoomnumber—