Class: FlatGeometry

FlatGeometry(levelPropertiesList)

A @{Geometry} implementation suitable for tiled flat images with multiple resolution levels.

The following restrictions apply:

  • All tiles must be square, except when in the last row or column position, and must form a rectangular grid;
  • The width and height of a level must be multiples of the parent level width and height.

Constructor

new FlatGeometry(levelPropertiesList)

Parameters:
Name Type Description
levelPropertiesList Array.<Object>

Level description

Properties
Name Type Description
width number

Level width in pixels

tileWidth number

Tile width in pixels for square tiles

height number

Level height in pixels

tileHeight number

Tile height in pixels for square tiles

Implements:

Methods

visibleTiles(view, level) → {Array.<Tile>}

Return the set of visible tiles for the given view and level. If a result array is supplied, it is filled in with the result and returned. Otherwise, a fresh array is returned.

Parameters:
Name Type Description
view View
level Level
Implements:
Returns:

result

Type
Array.<Tile>