Class: MeasureButton

MeasureButton()

The MeasureButton

Constructor

new MeasureButton()

Creates the MeasureButton.

Source:

Extends

  • React.Component

Members

defaultProps :Object

The default properties.

Type:
  • Object
Source:

propTypes :Object

The properties.

Type:
  • Object
Source:

Methods

addMeasureStopTooltip(evt)

Adds a tooltip on click where a measuring stop occured.

Parameters:
Name Type Description
evt OlMapBrowserEvent

The event which contains the coordinate for the tooltip.

Source:

cleanup()

Cleans up artifacts from measuring when the button is unpressed.

Source:

cleanupTooltips()

Cleans up tooltips when the button is unpressed.

Source:

componentDidMount()

componentWillMount method of the MeasureButton. Just calls a createMeasureLayer method.

Source:

createDrawInteraction() → {OlInteractionDraw}

Creates a correctly configured OL draw interaction depending on the configured measureType.

Source:
Returns:

The created interaction, which is not yet added to the map.

Type
OlInteractionDraw

createHelpTooltip()

Creates a new help tooltip as OlOverlay.

Source:

createMeasureLayer()

Creates measure vector layer and add this to the map.

Source:

createMeasureTooltip()

Creates a new measure tooltip as OlOverlay.

Source:

drawEnd()

Called whenever measuring stops, this method draws static tooltips with the result onto the map canvas and unregisters various listeners.

Source:

drawStart(evt)

Sets up listeners whenever the drawing of a measurement sketch is started.

Parameters:
Name Type Description
evt OlInteractionDrawEvent

The event which contains the feature we are drawing.

Source:

onDrawInteractionActiveChange()

Adjusts visibility of measurement related tooltips depending on active status of draw interaction.

Source:

onToggle()

Called when the button is toggled, this method ensures that everything is cleaned up when unpressed, and that measuring can start when pressed.

Source:

pointerMoveHandler(evt)

Handle pointer move by updating and repositioning the dynamic tooltip.

Parameters:
Name Type Description
evt OlMapBrowserEvent

The event from the pointermove.

Source:

removeHelpTooltip()

Removes help tooltip from the map if measure button was untoggled.

Source:

removeMeasureTooltip()

Removes measure tooltip from the map if measure button was untoggled.

Source:

render()

The render function.

Source: