event class
google.maps
. event
class
Namespace for all public event functions
Access by calling const {event} = await google.maps.importLibrary("core")
.See Libraries in the Maps JavaScript API
.
Static Methods
addListener(instance, eventName, handler)
MapsEventListener
addListenerOnce(instance, eventName, handler)
MapsEventListener
clearInstanceListeners(instance)
-
instance:Object
void
clearListeners(instance, eventName)
-
instance:Object -
eventName:string
void
hasListeners(instance, eventName)
-
instance:Object -
eventName:string
boolean
removeListener(listener)
-
listener:MapsEventListener
void
listener.remove()
.trigger(instance, eventName, eventArgs)
-
instance:Object -
eventName:string -
eventArgs:...?
void
addDomListener(instance, eventName, handler[, capture])
MapsEventListener
addDomListenerOnce(instance, eventName, handler[, capture])
MapsEventListener
MapsEventListener interface
google.maps
. MapsEventListener
interface
An event listener, created by google.maps.event.addListener
()
and friends.
Methods |
|
|---|---|
remove
|
remove()
Parameters: None
Return Value:
void
Removes the listener.
Calling |
MVCObject class
google.maps
. MVCObject
class
Base class implementing KVO.
The MVCObject
constructor is guaranteed to be an empty function, and so you may inherit from MVCObject
by writing MySubclass.prototype = new google.maps.MVCObject();
. Unless otherwise noted, this is not true of other classes in the API, and inheriting from other classes in the API is not supported.
Access by calling const {MVCObject} = await google.maps.importLibrary("core")
.See Libraries in the Maps JavaScript API
.
Constructor |
|
|---|---|
MVCObject
|
MVCObject()
Parameters: None
Creates an
MVCObject
. |
Methods
addListener(eventName, handler)
-
eventName:string -
handler:Function
MapsEventListener
google.maps.event.removeListener
.bindTo(key, target[, targetKey, noNotify])
-
key:string -
target:MVCObject -
targetKey:string optional -
noNotify:boolean optional
get(key)
-
key:string
?
notify(key)
-
key:string
set(key, value)
-
key:string -
value:*
setValues([values])
-
values:Object optional
unbind(key)
-
key:string
unbindAll()
MVCArray class
google.maps
. MVCArray<T>
class
This class extends MVCObject
.
Access by calling const {MVCArray} = await google.maps.importLibrary("core")
.See Libraries in the Maps JavaScript API
.
Methods
clear()
forEach(callback)
-
callback:function(T, number): void
getArray()
Array
<T>
getAt(i)
-
i:number
T
getLength()
number
insertAt(i, elem)
-
i:number -
elem:T
pop()
T
push(elem)
-
elem:T
number
removeAt(i)
-
i:number
T
setAt(i, elem)
-
i:number -
elem:T
Events
function(index)
-
index:number
insertAt()
is called. The event passes the index that was passed to insertAt()
.function(index, removed)
-
index:number -
removed:TThe element removed from the array atindex.
removeAt()
is called. The event passes the index that was passed to removeAt()
and the element that was removed from the array.function(index, previous)
-
index:number -
previous:TThe element that was previously in the array atindex.
setAt()
is called. The event passes the index that was passed to setAt()
and the element that was previously in the array at that index.ErrorEvent interface
google.maps
. ErrorEvent
interface
An event with an associated Error.
Properties |
|
|---|---|
error
|
Type:
Error
The Error related to the event.
|

