Class: CanvasTiles

og/layer/CanvasTiles~CanvasTiles

Layer used to rendering each tile as a separate canvas object.

new CanvasTiles(name, options:)

Name Type Default Description
name String "noname" optional Layer name.
options: Object
options.opacity number 1.0 optional Layer opacity.
options.transparentColor Array.<number, number, number> [-1,-1,-1] optional RGB color that defines transparent color.
options.minZoom number 0 optional Minimal visibility zoom level.
options.maxZoom number 0 optional Maximal visibility zoom level.
options.attribution string optional Layer attribution that displayed in the attribution area on the screen.
options.isBaseLayer boolean false optional Base layer flag.
options.visibility boolean true optional Layer visibility.
options.drawTile og.layer.CanvasTiles~drawTileCallback optional Draw tile callback.
Fires:
  • - Triggered when current tile image has loaded before rendereing.
  • - Triggered when all tiles have loaded or loading has stopped.

Extends

Members

protected_counternumber

Current creating tiles couter.

protected_pendingsQueueArray.<og.planetSegment.Material>

Tile pending queue that waiting for create.
Draw tile callback.

Methods

protected_exec(material)

Loads material image and apply it to the planet segment.
Name Type Description
material og.planetSegment.Material Loads material image.
Abort loading tiles.

abortMaterialLoading(material)

Abort exact material loading.
Name Type Description
material og.planetSegment.Material Segment material.

abstractloadMaterial(material)

Start to load tile material.
Name Type Description
material og.planetSegment.Material -

setVisibility(visibility)

Sets layer visibility.
Name Type Description
visibility boolean Layer visibility.

Events

Triggered when layer has added to the planet.
Triggered layer has double touched.
Mouse left button clicked.
Mouse left button double click.
Mouse left button is just pressed down(start pressing).
Mouse left button is pressing.
Mouse left button up(stop pressing).
Mouse right button clicked.
Mouse middle button double click.
Mouse middle button is just pressed down(start pressing).
Mouse middle button is pressing.
Triggered when mouse has entered over the layer.
Triggered when mouse moves over the layer.
Mouse wheel is rotated.
Mouse middle button up(stop pressing).
Mouse right button clicked.
Mouse right button double click.
Mouse right button is just pressed down(start pressing).
Triggered when layer has removed from the planet.
Mouse right button is pressing.
Mouse right button up(stop pressing).
Triggered when layer has finished touching.
Triggered when touch enters over the layer.
Triggered when touching leaves layer borders.
Triggered when touching moves over the layer.
Triggered when layer begins to touch.
Triggered when layer visibilty chanched.