Class: CanvasTiles

og.layer.CanvasTiles

new og.layer.CanvasTiles(name, options:)

Layer used to rendering each tile as a separate canvas object.
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:

Extends

Members

static,constantog.layer.CanvasTiles.MAX_REQUESTSnumber

Maximum tiles per frame.

protected_attributionstring

Layer attribution.

protected_counternumber

Current creating tiles couter.

protected_extentog.Extent

Visible degrees extent.

protected_extentMercog.Extent

Visible mercator extent.

protected_heightnumber

Height over the ground.

protected_idnumber

Unic identifier.

protected_isBaseLayerboolean

Base layer type flag.

protected_pendingsQueueArray.<og.planetSegment.Material>

Tile pending queue that waiting for create.

protected_pickingColorog.math.Vector3

Layer picking color. Assign when added to the planet.

protected_planetog.scene.Planet

Planet node.

protected_visibilityboolean

Layer visibility.

protected_zIndexnumber

Layer z-index.

ambientObject

Layer light material parameters.
Draw tile callback.

eventsog.Events

Events handler.

maxZoomnumber

Maximal zoom level when layer is visibile.

minZoomnumber

Minimal zoom level when layer is visibile.

namestring

Layer user name.

opacitynumber

Layer global opacity.

transparentColorArray.<number, number, number>

Transparent RGB color mask.

Methods

inherited abstract,protected_assignPlanet(planet-)

Assign the planet.
Name Type Description
planet- og.scene.Planet Planet render node.

inherited abstract,protected_bindPicking()

Assign picking color to the layer.

inherited protected_correctFullExtent()

Special correction of the whole globe extent.

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.
Adds layer to the planet.
Name Type Description
planet og.scene.Planet
Clears layer material.
Gets layer extent.
Returns:
Type Description
og.Extent

inherited getHeight(){number}

Gets layer height.
Returns:
Type Description
number
Gets layer identifier.
Returns:
Type Description
string

inherited getVisibility(){boolean}

Gets layer visibility.
Returns:
Type Description
boolean

inherited getZIndex(){number}

Gets z-index.
Returns:
Type Description
number

inherited abstracthasImageryTiles(){boolean}

Returns true if a layer has imagery tiles.
Returns:
Type Description
boolean

inherited isBaseLayer(){boolean}

Returns true if the layer is a base.
Returns:
Type Description
boolean

inherited isEqual(layer){boolean}

Compares layers instances.
Name Type Description
layer og.layer.Layer
Returns:
Type Description
boolean - Returns true if the layers is the same instance of the input.

abstractloadMaterial(mateial)

Start to load tile material.
Name Type Description
mateial og.planetSegment.Material
Removes from planet.

inherited setAttribution(html)

Sets layer attribution text.
Name Type Description
html string HTML code that represents layer attribution, it could be just a text.

inherited setBaseLayer(flag)

Sets base layer type true.
Name Type Description
flag boolean Base layer flag.

inherited setExtent(extent)

Sets visible geographical extent.
Name Type Description
extent og.Extent Layer visible geographical extent.

inherited setHeight(height)

Sets height over the ground.
Name Type Description
height number Layer height.

setVisibility(visibility)

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

inherited setZIndex(zIndex)

Sets z-index.
Name Type Description
zIndex number Layer z-index.

Type Definitions

drawTileCallback(material, applyCanvasCallback)

Tile custom draw function.
Name Type Description
material og.planetSegment.Material
applyCanvasCallback applyCanvasCallback

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.
Triggered when current tile image has loaded before rendereing.
Triggered when all tiles have loaded or loading has stopped.
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.