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
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
-
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.
-
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.
-
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.
-
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.
-
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.
-
Triggered on every
mousemove
during a brushing selection. The event object extendsgeo.brushSelection
.Type:
-
Triggered after a brush selection ends. The event object extends
geo.brushSelection
.Type:
-
Triggered when a brush selection starts. The event object extends
geo.brushSelection
.Type:
-
Triggered on every call to
geo.map#draw
before the map is rendered.Type:
Properties:
Name Type Description target
geo.map The current map.
-
Triggered on every call to
geo.map#draw
after the map is rendered.Type:
Properties:
Name Type Description target
geo.map The current map.
-
Triggered when the map is hidden (the browser tab is no longer visible)
Type:
Properties:
Name Type Description target
geo.map The current map.
-
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
-
Triggered when a layer is added to the map.
Type:
-
Triggered when a layer z-index is changed.
Type:
-
Triggered when a layer is removed from the map.
Type:
-
Triggered on
mouseup
events that happen soon enough and close enough to amousedown
event. The event object extendsgeo.mouseState
.Type:
Properties:
Name Type Description buttonsDown
geo.mouseButtons The buttons that were down at the start of the click action.
-
Triggered on every
mousemove
over the map's DOM element unless a click might occur. The event object extendsgeo.mouseState
.Type:
-
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.
-
Triggered when the parallel projection mode is changes.
Type:
Properties:
Name Type Description paralellProjection
boolean true
if parallel projection is turned on. -
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.
-
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.
-
Triggered when brushing results in a selection. The event object extends
geo.brushSelection
.Type:
-
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.
-
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.
-
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. Setevent.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.
-
Triggered when the map is shown (the browser tab is made visible)
Type:
Properties:
Name Type Description target
geo.map The current map.
-
Triggered when brushing results in a zoom-out selection. The event object extends
geo.brushSelection
.Type:
-
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.
-
Triggered when brushing results in a zoom selection. The event object extends
geo.brushSelection
.Type: