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
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| height | string | number | — | In pixels, or any CSS length. Defaults to 300. |
| latSource | SourceProp<TRecord> | — | The record property holding the latitude. |
| lngSource | SourceProp<TRecord> | — | The record property holding the longitude. |
| mapStyle | MapStyleInput | — | Defaults to the style from `MapsProvider`. |
| record | TRecord | — | Defaults to the ambient record. |
| zoom | number | — |