MultiPolygonField
Shows a GeoJSON MultiPolygon from a record on a map, one filled part per polygon. It is GeoJsonField under the name of a GeoJSON type, so it takes the same props.
Shows a GeoJSON MultiPolygon from a record on a map, one filled part per polygon. It is GeoJsonField under the name of a GeoJSON type, so it takes the same props.
Installation
import { MultiPolygonField } from "@chelone/react/maps";See the maps guide for the subpaths, the optional packages and MapsProvider.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| defaultValue | unknown | — | Used when the property is `undefined`. |
| emptyText | string | — | Replaces the translation of `chelone.map.no_geometry`. |
| fitBounds | boolean | — | Frame the map around the data. Defaults to true. |
| fitPadding | number | — | Pixels kept free around the fitted box. Defaults to 20. |
| height | string | number | — | In pixels, or any CSS length. Defaults to 300. |
| mapStyle | MapStyleInput | — | Defaults to the style from `MapsProvider`. |
| maxFitZoom | number | — | The highest zoom a fit may reach, which also sets a single Point's zoom. Defaults to 18. |
| record | RecordType | — | Defaults to the ambient record. |
| scrollZoom | boolean | — | Zoom with the mouse wheel. Defaults to false so the page still scrolls. |
| shapeStyle | ShapeStyle | — | Partial over `DEFAULT_SHAPE_STYLE`. |
| source | SourceProp<RecordType> | — | The record property holding the GeoJSON value. |