A method to add a listener background event.
Parameter |
Value |
---|---|
type: string |
A type of listener to create. See Types. |
function: name |
An asynchronous JavaScript function that implements the logic when the function call returns. |
scope: name (optional) |
Owner of the current object. |
Example:
function zoomChange(map, zoom)
{
//Your code here!
//map.<method>;
}
function mousemoveChange(map, e)
{
//Your code here!
//map.<method>;
}
function markersClick(map, idlist, e)
{
//Your code here!
//map.<method>;
}
map.addListener("zoomchange", zoomChange, this);
map.addListener("mousemove", mousemoveChange, this);
map.addListener("markers_click", markersClick, this);