<DrawCircle />

A button for drawing circles.

Constructor

# <DrawCircle type geometryFunction addInteraction tooltipTitle />

PropTypes:
Name Type Required Description Default
type string No the openlayers draw type
geometryFunction func No A function that creates a openlayers draw interaction box
addInteraction func No a function that adds the draw interaction to the openlayers map on click of the button
tooltipTitle string No a title for the tooltip
Since:
  • 0.18.0

View Source Draw/Circle.js, line 12


Examples

DrawContainer

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 (
  <Map>
    <DrawContainer />
  </Map>
  )
}

export default App