ALKMaps.Control.DragPan

The DragPan control pans the map with a drag of the mouse.

Inherits from

Summary
ALKMaps.Control.DragPanThe DragPan control pans the map with a drag of the mouse.
Properties
type{ALKMaps.Control.TYPES}
panned{Boolean} The map moved.
interval{Integer} The number of milliseconds that should elapse before panning the map again.
documentDrag{Boolean} If set to true, mouse dragging will continue even if the mouse cursor leaves the map viewport.
kinetic{<ALKMaps.Kinetic>} The ALKMaps.Kinetic object.
enableKinetic{Boolean} Set this option to enable “kinetic dragging”.
kineticInterval{Integer} Interval in milliseconds between 2 steps in the “kinetic scrolling”.
Functions
drawCreates a Drag handler, using panMap and panMapDone as callbacks.
panMapStart
panMap
panMapDoneFinish the panning operation.

Properties

type

{ALKMaps.Control.TYPES}

panned

{Boolean} The map moved.

interval

{Integer} The number of milliseconds that should elapse before panning the map again.  Defaults to 1 millisecond.  In most cases you won’t want to change this value.  For slow machines/devices larger values can be tried out.

documentDrag

{Boolean} If set to true, mouse dragging will continue even if the mouse cursor leaves the map viewport.  Default is false.

kinetic

{<ALKMaps.Kinetic>} The ALKMaps.Kinetic object.

enableKinetic

{Boolean} Set this option to enable “kinetic dragging”.  Can be set to true or to an object.  If set to an object this object will be passed to the {<ALKMaps.Kinetic>} constructor.  Defaults to false.

kineticInterval

{Integer} Interval in milliseconds between 2 steps in the “kinetic scrolling”.  Applies only if enableKinetic is set.  Defaults to 10 milliseconds.

Functions

draw

draw: function()

Creates a Drag handler, using panMap and panMapDone as callbacks.

panMapStart

panMapStart: function()

panMap

panMap: function(xy)

Parameters

xy{ALKMaps.Pixel} Pixel of the mouse position

panMapDone

panMapDone: function(xy)

Finish the panning operation.  Only call setCenter (through panMap) if the map has actually been moved.

Parameters

xy{ALKMaps.Pixel} Pixel of the mouse position
draw: function()
Creates a Drag handler, using panMap and panMapDone as callbacks.
panMap: function(xy)
panMapDone: function(xy)
Finish the panning operation.
panMapStart: function()
Controls affect the display or behavior of the map.
This class represents a screen coordinate, in x and y coordinates
Close