CanvasTiles

Layer that renders each tile as a separate canvas object.

Constructor

new CanvasTiles(nameopt, options:)

Parameters:
NameTypeAttributesDefaultDescription
nameString<optional>
"noname"

Layer name.

options:ICanvasTilesParams
options.opacitynumber<optional>
1.0

Layer opacity.

options.minZoomnumber<optional>
0

Minimal visibility zoom level.

options.maxZoomnumber<optional>
0

Maximal visibility zoom level.

options.attributionstring<optional>

Layer attribution shown in the attribution area.

options.isBaseLayerboolean<optional>
false

Base layer flag.

options.visibilityboolean<optional>
true

Layer visibility.

options.drawTileDrawTileCallback

Draw tile callback.

Fires:
  • event:load
  • event:loadend

Extends

Members

_id

Overrides

(protected) _pickingColor :Vec3

Layer picking color. Assign when added to the planet.

Type:

planet

Returns planet instance.

Overrides

Methods

(abstract, protected) _assignPlanet(planet)

Assign the planet.

Parameters:
NameTypeDescription
planetPlanet

Planet render node.

(abstract, protected) _bindPicking()

Assign picking color to the layer.

(protected) _correctFullExtent()

Special correction of the whole globe extent.

(protected) _exec(material)

Loads material image and apply it to the planet segment.

Parameters:
NameTypeDescription
materialMaterial

Loads material image.

abortLoading()

Abort loading tiles.

abortMaterialLoading(material)

Abort exact material loading.

Parameters:
NameTypeDescription
materialMaterial

Segment material.

addTo(planet)

Adds layer to the planet.

Parameters:
NameTypeDescription
planetPlanet

Adds layer to the planet.

Overrides

bringToFront()

Sets z-index to the maximum value relative to other layers on the planet.

(abstract) clear()

Clears layer material.

Overrides

flyExtent()

Fly extent.

getAttribution() → {string}

Gets layer attribution.

Returns:

Layer attribution.

Type: 
string

getExtent() → {Extent}

Gets layer extent.

Returns:

Layer geodetic extent.

Type: 
Extent

getExtentMerc() → {Extent}

Gets layer web-mercator extent.

Returns:

Layer extent.

Type: 
Extent

getHeight() → {number}

Gets layer height.

Returns:
Type: 
number

getID() → {number}

Gets layer identifier.

Overrides
Returns:

Layer object id.

Type: 
number

getVisibility() → {boolean}

Gets layer visibility.

Returns:

Layer visibility.

Type: 
boolean

getZIndex() → {number}

Gets z-index.

Returns:
Type: 
number

(abstract) hasImageryTiles() → {boolean}

Returns true if a layer has imagery tiles.

Returns:

Imagery tiles flag.

Type: 
boolean

isBaseLayer() → {boolean}

Returns true if the layer is a base.

Returns:

Base layer flag.

Type: 
boolean

isEqual(layer) → {boolean}

Compares layers instances.

Parameters:
NameTypeDescription
layerLayer

Layer instance to compare.

Overrides
Returns:

Returns true if the layer is the same instance as the input.

Type: 
boolean

(abstract) loadMaterial(material)

Start to load tile material.

Parameters:
NameTypeDescription
materialMaterial

remove() → {Layer}

Removes from a planet.

Overrides
Returns:

This layer.

Type: 
Layer

setAttribution(html)

Sets layer attribution text.

Parameters:
NameTypeDescription
htmlstring

HTML string that represents layer attribution.

setBaseLayer(isBaseLayer)

Sets base layer type flag.

Parameters:
NameTypeDescription
isBaseLayerboolean

setExtent(extent)

Sets visible geographical extent.

Parameters:
NameTypeDescription
extentExtent

Layer visible geographical extent.

setHeight(height)

Sets height over the ground.

Parameters:
NameTypeDescription
heightnumber

Layer height.

setVisibility(visibility)

Sets layer visibility.

Parameters:
NameTypeDescription
visibilityboolean

Layer visibility.

setZIndex(zIndex)

Sets z-index.

Parameters:
NameTypeDescription
zIndexnumber

Layer z-index.

viewExtent()

View extent.