Documentation
Reference
2.1.56 (current version)
collection
interactivityModel
Interfaces

layer.tile.CanvasTile

Extends ICanvasTile.

Image canvas tile. Can draw the specified image via the drawImage method for the 2d context of the canvas element.

Constructor | Fields | Events | Methods

Constructor

layer.tile.CanvasTile(url[, options])

Creates an image canvas tile. Accessible in the storage for tile classes by the key "default#canvas".

Parameters:

ParameterDefault valueDescription
url *
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: String

URL of the image.

options

Type: Object

Options.

options.notFoundTile null

Type: String|null

Option that specifies the URL for downloading an image if the tile image didn't load. If the value is null, a standard tile is displayed with a text message. For transparent tiles, the notFoundTile option is not applied, and nothing is shown in place of tiles that didn't load.

options.tileAnimationDuration

Type: Number

Duration of animation of tile transparency. The default value depends on the browser.

* Mandatory parameter/option.

Fields

NameTypeDescription
eventsIEventManager

Tile event manager.

Inherited from ICanvasTile.

Events

NameDescription
ready

Tile ready event.

Inherited from ICanvasTile.

Methods

NameReturnsDescription
destroy()

Destroys the tile.

Inherited from ICanvasTile.

isReady()

Boolean

Checks tile readiness.

Inherited from ICanvasTile.

renderAt(context, canvasSize, bounds[, animate])

Draws an image tile in the canvas object's 2d context.

Inherited from ICanvasTile.