<DrawPoint />

A button for drawing points.

Constructor

# <DrawPoint type addInteraction tooltipTitle />

PropTypes:
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
tooltipTitle string No a title for the tooltip
Since:
  • 0.18.0

View Source Draw/Point.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