Home Reference Source Test Repository
import {TileLayer} from 'dtile-tilemap/src/tilelayer.js'
public class | source

TileLayer

A tile layer object containing tiles and other properties.

Constructor Summary

Public Constructor
public

constructor(parentMap: TileMap, options: object)

TileLayer constructor.

Member Summary

Public Members
public

The name of the tile layer.

public

Custom properties of the layer.

public

tiles: Tile[]

The tiles of the layer.

Public Constructors

public constructor(parentMap: TileMap, options: object) source

TileLayer constructor.

Params:

NameTypeAttributeDescription
parentMap TileMap

The parent map for this layer.

options object

Options for the layer. Can also be layer data you loaded from JSON or similar.

options.name string
  • optional
  • default: "Tilelayer"

TileLayer#name

options.tiles Tile[]
  • default: []

TileLayer#tiles

options.properties Map<string, *>
  • default: Map

TileLayer#properties

Public Members

public name: string source

The name of the tile layer.

public properties: Map<string, *> source

Custom properties of the layer.

public tiles: Tile[] source

The tiles of the layer.