CanvasTiles

Layer used to rendering 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 that displayed in the attribution area on the screen.

options.isBaseLayerboolean<optional>
false

Base layer flag.

options.visibilityboolean<optional>
true

Layer visibility.

options.drawTileDrawTileCallback

Draw tile callback.

Fires:
  • EventsHandler#event:load
  • EventsHandler#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()

Set zIndex to the maximal value depend on 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() → {string}

Gets layer identifier.

Overrides
Returns:
  • Layer object id.
Type: 
string

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 layers is the same instance of the input.
Type: 
boolean

(abstract) loadMaterial(material)

Start to load tile material.

Parameters:
NameTypeDescription
materialMaterial

remove() → {Layer}

Removes from planet.

Overrides
Returns:

-This layer.

Type: 
Layer

setAttribution(html)

Sets layer attribution text.

Parameters:
NameTypeDescription
htmlstring

HTML code that represents layer attribution, it could be just a text.

setBaseLayer(isBaseLayer)

Sets base layer type true.

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.