Class: XYZ


Represents an imagery tiles source provider.

new XYZ(name, options:)

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.subdomains Array.<string> ['a','b','c'] optional Subdomains of the tile service.
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.crossOrigin string true optional If true, all tiles will have their crossOrigin attribute set to ''.
options.url string Tile url source template(see example below).
options.urlRewrite og.layer.XYZ~_urlRewriteCallback Url rewrite function.
  • - Triggered when current tile image has loaded before rendereing.
  • - Triggered when all tiles have loaded or loading has stopped.

Creates OpenStreetMap base tile layer

new og.layer.XYZ("OpenStreetMap", {
    isBaseLayer: true,
    url: "{z}/{x}/{y}.png",
    visibility: true,
    attribution: 'Data @ OpenStreetMap contributors, ODbL'






Tile url source template.




Creates query url.
Name Type Description
segment og.planetSegment.Segment Creates specific url for current segment.
Type Description
String - Returns url string.


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


Abort loading tiles.


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


Sets imagery tiles url source template.
Name Type Description
url string Url template.
where {z}, {x} and {y} - replaces by current tile values, {s} - random domen.


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.


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


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.