({
showLength = false,
drawError = {
color: "var(--color-destructive)",
},
shapeOptions = {
color: "var(--color-primary)",
opacity: 1,
weight: 2,
},
...props
}: DrawOptions.PolylineOptions)
| 1096 | } |
| 1097 | |
| 1098 | function MapDrawPolyline({ |
| 1099 | showLength = false, |
| 1100 | drawError = { |
| 1101 | color: "var(--color-destructive)", |
| 1102 | }, |
| 1103 | shapeOptions = { |
| 1104 | color: "var(--color-primary)", |
| 1105 | opacity: 1, |
| 1106 | weight: 2, |
| 1107 | }, |
| 1108 | ...props |
| 1109 | }: DrawOptions.PolylineOptions) { |
| 1110 | const mapDrawHandleIcon = useMapDrawHandleIcon() |
| 1111 | |
| 1112 | return ( |
| 1113 | <MapDrawShapeButton |
| 1114 | drawMode="polyline" |
| 1115 | createDrawTool={(L, map) => |
| 1116 | new L.Draw.Polyline(map, { |
| 1117 | ...(mapDrawHandleIcon |
| 1118 | ? { |
| 1119 | icon: mapDrawHandleIcon, |
| 1120 | touchIcon: mapDrawHandleIcon, |
| 1121 | } |
| 1122 | : {}), |
| 1123 | showLength, |
| 1124 | drawError, |
| 1125 | shapeOptions, |
| 1126 | ...props, |
| 1127 | }) |
| 1128 | }> |
| 1129 | <WaypointsIcon /> |
| 1130 | </MapDrawShapeButton> |
| 1131 | ) |
| 1132 | } |
| 1133 | |
| 1134 | function MapDrawCircle({ |
| 1135 | showRadius = false, |
nothing calls this directly
no test coverage detected