Skip to main content

TiledImageBackgroundComponent

Renders a tiled image background on a surface or paper.

Implements​

  • AfterViewInit

Methods​

ngAfterViewInit()​

ngAfterViewInit(): void

A callback method that is invoked immediately after Angular has completed initialization of a component's view. It is invoked only once when the view is instantiated.

Returns​

void

Implementation of​

AfterViewInit.ngAfterViewInit

Properties​

height​

height: number

Required. Indicates the height of the full image.

Input​


maxZoom?​

optional maxZoom: number

Required. Indicates the maximum zoom level. Zoom starts at 0 - fully zoomed out - and increases in integer values from there. Each successive zoom level is twice the zoom of the previous level, meaning two times as many tiles in each direction.

Input​


panDebounceTimeout?​

optional panDebounceTimeout: number

How long to wait after a pan before reloading tiles.

Input​


tileSize​

tileSize: Size

For tiled backgrounds, provides the width and height of tiles. Every tile is assumed to have these dimensions, even if the tile has whitespace in it. Required.

Input​


tiling?​

optional tiling: TilingStrategy

Default is TilingStrategies.logarithmic. See notes for TilingStrategies enum.

Input​


url?​

optional url: string

URL for the background. You can supply this, or you can supply a urlGenerator function instead. If you supply url and no urlGenerator, the url you supply is treated as a template for the url for any given tile, and is expected to contain {z}, {x} and {y} placeholders. The form of the URL can be anything you like as long as it has the placeholders for z, x and y. For instance:

http://foo.com/{z}/{x}/{y} https://bar.com?zoom={z}&x={x}&y={y}

etc

Input​


urlGenerator()?​

optional urlGenerator: (z, x, y) => string

For tiled backgrounds, an optional function you can supply to generate the URL for a given tile. See url for an explanation of the default syntax for urls when using a tiled background.

Parameters​

z​

number

zoom level

x​

number

x coordinate of tile

y​

number

y coordinate of tile

Returns​

string

Input​


width​

width: number

Required. Indicates the width of the full image.

Input​


zoomDebounceTimeout?​

optional zoomDebounceTimeout: number

How long to wait after a zoom before reloading tiles.

Input​