Maps API for JavaScript Developer's Guide

H.mapevents.Event

Class Summary

Extends: H.util.Event

This class represents a custom map event. It contains a list of pointers on the map, a list of changed pointers, and the original event. The class inherits from H.util.Event.

[ For full details, see the Class Details ]

Property Summary

Table 1. Properties
Properties

pointers : {Array<H.mapevents.Pointer>}

This property holds an array of pointers that are currently on the screen.

changedPointers : {Array<H.mapevents.Pointer>}

This property holds an array of pointers that have changed in course of event.

targetPointers : {Array<H.mapevents.Pointer>}

This property holds an array of pointers that are on same target as the current pointer.

currentPointer : {H.mapevents.Pointer}

This property holds the current pointer.

originalEvent : {Event}

This property holds the original event fired by the browser.

target : {(H.map.Object | H.Map)}

This property holds the object which triggered the event. It can be a map object (for example a marker or a polyline) or the map itself.

currentTarget : {(H.map.Object | H.Map)}

This property holds an object with an attached listener.

type : {string}

This property holds the name of the dispatched event.

defaultPrevented : {boolean}

This property holds a value indicating if preventDefault() was called on the current event.

Method Summary

Table 2. Methods
Methods

preventDefault ()

This method sets the value of the property defaultPrevented. The property can be used to prevent default behavior associated with the given event.

stopPropagation ()

This method stops the propagation of the current event.

Class Description

This class represents a custom map event. It contains a list of pointers on the map, a list of changed pointers, and the original event. The class inherits from H.util.Event.

Constructor Details

H.mapevents.Event(type, pointers, changedPointers, targetPointers, currentPointer, target, originalEvent)

Parameters:
 
type:
{string}
 
type of event
pointers:
{Array<H.mapevents.Pointer>}
 
An array of pointers currently on the screen
changedPointers:
{Array<H.mapevents.Pointer>}
 
An array of pointers which changed during event
targetPointers:
{Array<H.mapevents.Pointer>}
 
An array of pointers on the event target
currentPointer:
{H.mapevents.Pointer}
 
A pointer that triggered the event
target:
{(H.Map | H.map.Object)}
 
The target map object which triggered event
originalEvent:
{Event}
 
The original DOM event

Property Details

pointers: {Array<H.mapevents.Pointer>}

This property holds an array of pointers that are currently on the screen.

changedPointers: {Array<H.mapevents.Pointer>}

This property holds an array of pointers that have changed in course of event.

targetPointers: {Array<H.mapevents.Pointer>}

This property holds an array of pointers that are on same target as the current pointer.

currentPointer: {H.mapevents.Pointer}

This property holds the current pointer.

originalEvent: {Event}

This property holds the original event fired by the browser.

target: {(H.map.Object | H.Map)}

This property holds the object which triggered the event. It can be a map object (for example a marker or a polyline) or the map itself.

currentTarget: {(H.map.Object | H.Map)}

This property holds an object with an attached listener.

type: {string}

This property holds the name of the dispatched event.

defaultPrevented: {boolean}

This property holds a value indicating if preventDefault() was called on the current event.

Method Details

preventDefault ()

This method sets the value of the property defaultPrevented. The property can be used to prevent default behavior associated with the given event.

stopPropagation ()

This method stops the propagation of the current event.