Class: CenterTouch

ol.interaction. CenterTouch

Handles coordinates on the center of the viewport. It can be used as abstract base class used for creating subclasses. The CenterTouch interaction modifies map browser event coordinate and pixel properties to force pointer on the viewport center to any interaction that them. Only pointermove pointerup are concerned with it.


new CenterTouch(options)

Parameters:
Name Type Description
options olx.interaction.InteractionOptions

Options

Properties
Name Type Description
targetStyle ol.style.Style | Array.<ol.style.Style>

a style to draw the target point, default cross style

composite string

composite operation for the target : difference|multiply|xor|screen|overlay|darken|lighter|lighten|...

Extends

  • ol.interaction.Interaction

Methods


getPosition()

Get the position of the target

Returns:
Type
ol.coordinate

setActive(active)

Activate or deactivate the interaction.

Parameters:
Name Type Description
active boolean

Active.


setMap(map)

Remove the interaction from its current map, if any, and attach it to a new map, if any. Pass null to just remove the interaction from the current map.

Parameters:
Name Type Description
map _ol_Map_

Map.