Skip to content

Commit

Permalink
Add shapeOptions prop to MapPreview to allow customizing of shape sty…
Browse files Browse the repository at this point in the history
…les, etc
  • Loading branch information
Ben Adams authored and Ben Adams committed Oct 31, 2023
1 parent dc4aca9 commit 63afb75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/MapPreview/MapPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const MapPreview = ({
fitGeoJson = true,
label = 'Area of Interest',
showGeometryType = true,
shapeOptions,
mapRef,
useMapEffect,
disableDraw = true,
Expand Down Expand Up @@ -184,6 +185,7 @@ const MapPreview = ({
onEdited={handleOnEditDraw}
featureRef={featureRef}
controlOptions={drawControlOptions}
shapeOptions={shapeOptions}
>
{!emptyMap && features.map((feature) => {
const { geometry, properties } = feature;
Expand Down Expand Up @@ -309,6 +311,7 @@ MapPreview.propTypes = {
showGeometryType: PropTypes.bool,
mapRef: PropTypes.object,
useMapEffect: PropTypes.func,
shapeOptions: PropTypes.object,
disableDraw: PropTypes.bool,
drawControlOptions: PropTypes.object,
onDrawCreated: PropTypes.func,
Expand Down

0 comments on commit 63afb75

Please sign in to comment.