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 thethis
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
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
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
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
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 extendsgeo.brushSelection
.
- Source:
Type:
brushend
- Description:
Triggered after a brush selection ends. The event object extends
geo.brushSelection
.
- Source:
Type:
brushstart
- Description:
Triggered when a brush selection starts. The event object extends
geo.brushSelection
.
- 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
Properties:
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
move |
object | The movement that would happen if the action is passed through. Properties
|
||||||||||||||||||||||||||||||||
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
Properties:
Name | Type | Description |
---|---|---|
target |
geo.map | The current map. |
layer |
geo.layer | The new layer that was added. |
Type:
layerMove
Properties:
Name | Type | Description |
---|---|---|
target |
geo.map | The current map. |
layer |
geo.layer | The old layer that was removed. |
Type:
layerRemove
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 amousedown
event. The event object extendsgeo.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 extendsgeo.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 extendsgeo.mouseState
.
- Source:
Type:
mouseup
- Description:
Triggered on
mouseup
events. The event object extendsgeo.mouseState
.
- 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
|
Type:
parallelprojection
Properties:
Name | Type | Description |
---|---|---|
paralellProjection |
boolean |
|
Type:
resize
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
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
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. Setevent.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
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: