<DrawFreehand />

A button for drawing freehand line strings.


# <DrawFreehand type addInteraction freehand tooltipTitle />

Name Type Required Description Default
type string No the openlayers draw type
addInteraction func No a function that adds the draw interaction to the openlayers map on click of the button
freehand bool No A boolean to check if the button is freehand
tooltipTitle string No a title for the tooltip
  • 0.18.0

View Source Draw/Freehand.js, line 12



The <DrawContainer> component will render a set prebuilt draw and measure tools or child component(s) passed in as the children prop. These tools allow the user to draw features with point, line, and polygon geometries on a map user configurable geometry snap settings. These features can also be styled with perimiter and area measurement labels. Measurements are calculated geodesically using the WGS84 ellipsoid. The user can also label the geometry vertices with their respective coordinates in decimal degrees.

Drop-in example:

This one-liner will render prebuilt draw components in a map.

import React from 'react'
import { Map, DrawContainer } from '@bayer/ol-kit'

const App = () => {
  return (
    <DrawContainer />

export default App