PointField

Shows a GeoJSON Point from a record on a map as a circle marker, zoomed to maxFitZoom, 18 by default. It is GeoJsonField under the name of a GeoJSON type, so it takes the same props.

Shows a GeoJSON Point from a record on a map as a circle marker, zoomed to maxFitZoom, 18 by default. It is GeoJsonField under the name of a GeoJSON type, so it takes the same props.

Installation

import { PointField } 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.