Class: XYZ

og.layer.XYZ

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

Represents an imagery tiles source provider.
Name Type Default Description
name string 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.url string Tile url source template(see example below).
Fires:
Example

Creates OpenStreetMap base tile layer

new og.layer.XYZ("OpenStreetMap", {
    isBaseLayer: true,
    url: "http://b.tile.openstreetmap.org/{z}/{x}/{y}.png",
    visibility: true,
    attribution: 'Data @ OpenStreetMap contributors, ODbL'
});

Extends

Members

static,constantog.layer.XYZ.MAX_REQUESTSnumber

Maximum loading queries at one time.

protected_attributionstring

Layer attribution.

protected_counternumber

Current loading 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 loading.

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.

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.

urlstring

Tile url source template.

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.

protected_correctFullExtent()

abstract,protected_createUrl(segment)

Creates query url.
Name Type Description
segment og.planetSegment.Segment

protected_exec(material)

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

protected_getHTTPRequestString(segment){string}

Returns actual url query string.
Name Type Description
segment og.planetSegment.Segment Segment that loads image data.
Returns:
Type Description
string

abortLoading()

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.

setUrl(url)

Sets imagery tiles url source template.
Name Type Description
url string Url template.
Example
http://b.tile.openstreetmap.org/{z}/{x}/{y}.png
where {z}, {x} and {y} - replaces by current tile values.

setUrlRewriteCallback(ur)

Sets url rewrite callback, used for custom url rewriting for every tile laoding.
Name Type Description
ur og.layer.XYZ~_urlRewriteCallback The callback that returns tile custom created url.

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.

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.