Maps API for JavaScript Developer's Guide

H.map.IInteraction

Interface Summary

This interface represents an interaction with the view port. Interaction reflects view changes, depending on the interaction coordinates and the modifiers which specify the type of interaction.

[ For full details, see the Interface Details ]

Method Summary

Table 1. Methods
Methods

static startInteraction (modifiers, opt_kinetics)

This method starts an interaction with the view port. It should be called every time when a new interaction is started, for example on mouse grab or touch start.

static interaction (x, y, opt_bx, opt_by, opt_timestamp)

This method resolves direct screen (view port) interaction. It modifies the current view using the arguments provided by the caller.

static endInteraction (opt_preventKinetics)

This method ends the interaction and applies a kinetic movement, if it was defined by using the method startInteraction().

Interface Description

This interface represents an interaction with the view port. Interaction reflects view changes, depending on the interaction coordinates and the modifiers which specify the type of interaction.

Method Details

static startInteraction (modifiers, opt_kinetics)

This method starts an interaction with the view port. It should be called every time when a new interaction is started, for example on mouse grab or touch start.

Parameters:
 
modifiers:
{H.math.BitMask}
 
Specifies what operations should performed during every interaction
opt_kinetics:
{H.util.kinetics.IKinetics=} [optional]
 
Specifies the kinetic move at the end of interaction

static interaction (x, y, opt_bx, opt_by, opt_timestamp)

This method resolves direct screen (view port) interaction. It modifies the current view using the arguments provided by the caller.

Parameters:
 
x:
{number}
 
viewport x coordinate
y:
{number}
 
viewport y coordinate
opt_bx:
{number=} [optional]
 
x coordinate for second pointer/touch if present
opt_by:
{number=} [optional]
 
y coordinate for second pointer/touch if present
opt_timestamp:
{number=} [optional]
 
The known timestamp to use

static endInteraction (opt_preventKinetics)

This method ends the interaction and applies a kinetic movement, if it was defined by using the method startInteraction().

Parameters:
 
opt_preventKinetics:
{boolean=} [optional]
 
A Boolean value indicating whether to prevent kinetic behaviour at the end of an interaction (true) or allow it (false)