Namespace: event

geo. event

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.

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

geo.event.baseobject

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

Properties:
Name Type Description
event string

The event type that was triggered.

geo object

A universal event object for controlling propagation.

Events

geo.event.actiondown

Triggered when an action is initiated with mouse down.

Type:
Properties:
Name Type Description
state geo.actionState

The action state.

mouse geo.mouseState

The mouse state.

event jQuery.Event

The triggering jQuery event.

geo.event.actionmove

Triggered when an action is being processed during mouse movement.

Type:
Properties:
Name Type Description
state geo.actionState

The action state.

mouse geo.mouseState

The mouse state.

event jQuery.Event

The triggering event.

geo.event.actionselection

Triggered when an action results in a selection.

Type:
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.

geo.event.actionup

Triggered when an action is ended with a mouse up.

Type:
Properties:
Name Type Description
state geo.actionState

The action state.

mouse geo.mouseState

The mouse state.

event jQuery.Event

The triggering event.

geo.event.actionwheel

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

Type:
Properties:
Name Type Description
state geo.actionState

The action state.

mouse geo.mouseState

The mouse state.

event jQuery.Event

The triggering event.

geo.event.brush

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

Type:

geo.event.brushend

Triggered after a brush selection ends. The event object extends geo.brushSelection.

Type:

geo.event.brushstart

Triggered when a brush selection starts. The event object extends geo.brushSelection.

Type:

geo.event.draw

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

Type:
Properties:
Name Type Description
target geo.map

The current map.

geo.event.drawEnd

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

Type:
Properties:
Name Type Description
target geo.map

The current map.

geo.event.keyaction

Triggered when an action is triggered via the keyboard.

Type:
Properties:
Name Type Description
move object

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

Properties
Name Type Argument 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

geo.event.layerAdd

Triggered when a layer is added to the map.

Type:
Properties:
Name Type Description
target geo.map

The current map.

layer geo.layer

The new layer that was added.

geo.event.layerRemove

Triggered when a layer is removed from the map.

Type:
Properties:
Name Type Description
target geo.map

The current map.

layer geo.layer

The old layer that was removed.

geo.event.mouseclick

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

Type:
Properties:
Name Type Description
buttonsDown geo.mouseButtons

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

geo.event.mousemove

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

Type:

geo.event.pan

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

Type:
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.

geo.event.parallelprojection

Triggered when the parallel projection mode is changes.

Type:
Properties:
Name Type Description
paralellProjection boolean

true if parallel projection is turned on.

geo.event.resize

Triggered when the map's canvas is resized.

Type:
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.

geo.event.rotate

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

Type:
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.

geo.event.select

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

Type:

geo.event.transitioncancel

Triggered if a map navigation animation is canceled.

Type:
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.

geo.event.transitionend

Triggered after a map navigation animation ends.

Type:
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.

geo.event.transitionstart

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.

Type:
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.

geo.event.unzoomselect

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

Type:

geo.event.zoom

Triggered when the map's zoom level is changed.

Type:
Properties:
Name Type Description
zoomLevel number

New zoom level.

screenPosition geo.screenPosition

The screen position of the mouse pointer.

geo.event.zoomselect

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

Type: