event

geo. Namespace

event

Description:
  • Common object containing all event types that are provided by the GeoJS API. Each property contained here is a valid target for event handling via geo.object#geoOn. The event object provided to handlers is different for each event type. Each handler is generally called with the this context being the class that caused the event.

Source:
Example
map.geoOn(geo.event.layerAdd, function (event) {
  // event is an object with type: geo.event.layerAdd
});

Namespaces

annotation
camera
feature
pixelmap
screenshot
svg

Type Definitions

base

Description:
  • All events are sent an object that are an extension of this type.

Source:
Properties:
Name Type Description
event string

The event type that was triggered.

geo object

A universal event object for controlling propagation.

All events are sent an object that are an extension of this type.

Type:
  • object

Events

actiondown

Description:
  • Triggered when an action is initiated with mouse down.

Source:
Properties:
Name Type Description
state geo.actionState

The action state.

mouse geo.mouseState

The mouse state.

event jQuery.Event

The triggering jQuery event.

Type:

actionmove

Description:
  • Triggered when an action is being processed during mouse movement.

Source:
Properties:
Name Type Description
state geo.actionState

The action state.

mouse geo.mouseState

The mouse state.

event jQuery.Event

The triggering event.

Type:

actionselection

Description:
  • Triggered when an action results in a selection.

Source:
Properties:
Name Type Description
state geo.actionState

The action state.

mouse geo.mouseState

The mouse state.

event jQuery.Event

The triggering event.

lowerLeft geo.screenPosition

Lower left of selection in screen coordinates.

upperRight geo.screenPosition

Upper right of selection in screen coordinates.

Type:

actionup

Description:
  • Triggered when an action is ended with a mouse up.

Source:
Properties:
Name Type Description
state geo.actionState

The action state.

mouse geo.mouseState

The mouse state.

event jQuery.Event

The triggering event.

Type:

actionwheel

Description:
  • Triggered when an action is triggered with a mouse wheel event.

Source:
Properties:
Name Type Description
state geo.actionState

The action state.

mouse geo.mouseState

The mouse state.

event jQuery.Event

The triggering event.

Type:

brush

Description:
  • Triggered on every mousemove during a brushing selection. The event object extends geo.brushSelection.

Source:
Type:

brushend

Description:
Source:
Type:

brushstart

Description:
Source:
Type:

draw

Description:
  • Triggered on every call to geo.map#draw before the map is rendered.

Source:
Properties:
Name Type Description
target geo.map

The current map.

Type:

drawEnd

Description:
  • Triggered on every call to geo.map#draw after the map is rendered.

Source:
Properties:
Name Type Description
target geo.map

The current map.

Type:

hidden

Description:
  • Triggered when the map is hidden (the browser tab is no longer visible)

Source:
Properties:
Name Type Description
target geo.map

The current map.

Type:

keyaction

Description:
  • Triggered when an action is triggered via the keyboard.

Source:
Properties:
Name Type Description
move object

The movement that would happen if the action is passed through.

Properties
Name Type Attributes Description
zoomDelta number <optional>

A change in the zoom level.

zoom number <optional>

A new zoom level.

rotationDelta number <optional>

A change in the rotation in radians.

rotation number <optional>

A new absolute rotation in radians.

panX number <optional>

A horizontal shift in display pixels.

panY number <optional>

A vertical shift in display pixels.

cancel boolean <optional>

Set to true to cancel the entire movement.

action string

Action based on key

factor number

Factor based on metakeys [0-2]. 0 means a small movement is preferred, 1 a medium movement, and 2 a large movement.

event jQuery.Event

The triggering event

Type:

layerAdd

Description:
  • Triggered when a layer is added to the map.

Source:
Properties:
Name Type Description
target geo.map

The current map.

layer geo.layer

The new layer that was added.

Type:

layerMove

Description:
  • Triggered when a layer z-index is changed.

Source:
Properties:
Name Type Description
target geo.map

The current map.

layer geo.layer

The old layer that was removed.

Type:

layerRemove

Description:
  • Triggered when a layer is removed from the map.

Source:
Properties:
Name Type Description
target geo.map

The current map.

layer geo.layer

The old layer that was removed.

Type:

mouseclick

Description:
  • Triggered on mouseup events that happen soon enough and close enough to a mousedown event. The event object extends geo.mouseState.

Source:
Properties:
Name Type Description
buttonsDown geo.mouseButtons

The buttons that were down at the start of the click action.

Type:

mousedown

Description:
  • Triggered on mousedown events. The event object extends geo.mouseState.

Source:
Properties:
Name Type Description
buttonsDown geo.mouseButtons

The buttons that were down at the end of the down action.

Type:

mousemove

Description:
  • Triggered on every mousemove over the map's DOM element unless a click might occur. The event object extends geo.mouseState.

Source:
Type:

mouseup

Description:
Source:
Properties:
Name Type Description
buttonsDown geo.mouseButtons

The buttons that were down at the start of the up action.

Type:

pan

Description:
  • Triggered when the map is panned either by user interaction or map transition.

Source:
Properties:
Name Type Description
screenDelta object

The number of pixels of the pan.

Properties
Name Type Description
x number

Horizontal pan distance in pixels.

y number

Vertical pan distance in pixels.

Type:

parallelprojection

Description:
  • Triggered when the parallel projection mode is changes.

Source:
Properties:
Name Type Description
paralellProjection boolean

true if parallel projection is turned on.

Type:

resize

Description:
  • Triggered when the map's canvas is resized.

Source:
Properties:
Name Type Description
target geo.map

The map that was resized.

width number

The new width in pixels.

height number

The new height in pixels.

Type:

rotate

Description:
  • Triggered when the map is rotated around the current map center (pointing downward so that positive angles are clockwise rotations).

Source:
Properties:
Name Type Description
rotation number

The angle of the rotation in radians. This is the map's complete rotation, not a delta.

screenPosition geo.screenPosition

The screen position of the mouse pointer.

Type:

select

Description:
  • Triggered when brushing results in a selection. The event object extends geo.brushSelection.

Source:
Type:

transitioncancel

Description:
  • Triggered if a map navigation animation is canceled.

Source:
Properties:
Name Type Description
center geo.geoPosition

The target center.

zoom number

The target zoom level.

duration number

The duration of the transition in milliseconds.

ease function

The easing function.

Type:

transitionend

Description:
  • Triggered after a map navigation animation ends.

Source:
Properties:
Name Type Description
center geo.geoPosition

The target center.

zoom number

The target zoom level.

duration number

The duration of the transition in milliseconds.

ease function

The easing function.

Type:

transitionstart

Description:
  • Triggered before a map navigation animation begins. Set event.geo.cancelAnimation to cancel the animation of the navigation. This will cause the map to navigate to the target location immediately. Set event.geo.cancelNavigation to cancel the navigation completely. The transition options can be modified in place.

Source:
Properties:
Name Type Description
center geo.geoPosition

The target center.

zoom number

The target zoom level.

duration number

The duration of the transition in milliseconds.

ease function

The easing function.

Type:

unhidden

Description:
  • Triggered when the map is shown (the browser tab is made visible)

Source:
Properties:
Name Type Description
target geo.map

The current map.

Type:

unzoomselect

Description:
  • Triggered when brushing results in a zoom-out selection. The event object extends geo.brushSelection.

Source:
Type:

zoom

Description:
  • Triggered when the map's zoom level is changed.

Source:
Properties:
Name Type Description
zoomLevel number

New zoom level.

screenPosition geo.screenPosition

The screen position of the mouse pointer.

Type:

zoomselect

Description:
  • Triggered when brushing results in a zoom selection. The event object extends geo.brushSelection.

Source:
Type: