SiteWatch API Help

addCustomCanvas

addCustomCanvas

Previous topic Next topic  

addCustomCanvas

Previous topic Next topic  

A method to add a custom canvas with specific drawHandler to a map location.

 

Parameter

Value

id: string

Identity of object.

function: name

An asynchronous JavaScript function that implements the logic when the function call returns.

scope: name (optional)

Owner of the current object.

config:

Configuration.

 animated: boolean (default=false)

Defines whether the custom canvas is animated or not.

If it is set as true then the canvas will be animated and the drawHandler of the custom canvas will be called for every frame.

 zIndex: integer

Defines the z-index of the canvas.

repaint: boolean (optional) (default=true)

Redraw line on map.

 

Return

Value

object:

A custom canvas object.

 

Example:

var customCanvas = map.addCustomCanvas("canvas", drawHandler);