ALKMaps.Handler.Box

Handler for dragging a rectangle across the map.  Box is displayed on mouse down, moves on mouse move, and is finished on mouse up.

Inherits from

Summary
ALKMaps.Handler.BoxHandler for dragging a rectangle across the map.
Properties
dragHandler{ALKMaps.Handler.Drag}
boxDivClassName{String} The CSS class to use for drawing the box.
boxOffsets{Object} Caches box offsets from css.
Constructor
ALKMaps.Handler.Box
Functions
destroy
setMap
startBox
moveBox
endBox
removeBoxRemove the zoombox from the screen and nullify our reference to it.
activate
deactivate
getBoxOffsetsDetermines border offsets for a box, according to the box model.

Properties

boxDivClassName

{String} The CSS class to use for drawing the box.  Default is olHandlerBoxZoomBox

boxOffsets

{Object} Caches box offsets from css.  This is used by the getBoxOffsets method.

Constructor

ALKMaps.Handler.Box

Parameters

control{ALKMaps.Control}
callbacks{Object} An object with a properties whose values are functions.  Various callbacks described below.
options{Object}

Named callbacks

startCalled when the box drag operation starts.
doneCalled when the box drag operation is finished.  The callback should expect to receive a single argument, the box bounds or a pixel.  If the box dragging didn’t span more than a 5 pixel distance, a pixel will be returned instead of a bounds object.

Functions

destroy

destroy: function()

setMap

setMap: function (map)

startBox

startBox: function (xy)

Parameters

xy{ALKMaps.Pixel}

moveBox

moveBox: function (xy)

endBox

endBox: function(end)

removeBox

removeBox: function()

Remove the zoombox from the screen and nullify our reference to it.

activate

activate: function ()

deactivate

deactivate: function ()

getBoxOffsets

getBoxOffsets: function()

Determines border offsets for a box, according to the box model.

Returns

{Object} an object with the following offsets:

  • left
  • right
  • top
  • bottom
  • width
  • height
The drag handler is used to deal with sequences of browser events related to dragging.
destroy: function()
setMap: function (map)
startBox: function (xy)
moveBox: function (xy)
endBox: function(end)
removeBox: function()
Remove the zoombox from the screen and nullify our reference to it.
activate: function ()
deactivate: function ()
getBoxOffsets: function()
Determines border offsets for a box, according to the box model.
Base class to construct a higher-level handler for event sequences.
Controls affect the display or behavior of the map.
This class represents a screen coordinate, in x and y coordinates
Close