new CenterTouch(options)
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.
Parameters:
Name | Type | Description |
---|---|---|
options |
olx.interaction.InteractionOptions | Options
|
Extends
- ol.interaction.Interaction
Methods
-
getPosition()
-
Get the position of the target
-
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.