Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MapFormat

An object that can read or write map files.

Implementations of this interface are returned from tiled.mapFormat and tiled.mapFormatForFile.

since

1.4

Hierarchy

Index

Properties

Readonly canRead

canRead: boolean

Whether this format supports reading files.

Readonly canWrite

canWrite: boolean

Whether this format supports writing files.

Readonly nameFilter

nameFilter: string

The file name filter used by this format (used in file dialogs).

since

1.11.1

Methods

read

  • Reads the given file as a map.

    This function will throw an error if reading is not supported.

supportsFile

  • supportsFile(fileName: string): boolean

write

  • write(map: TileMap, fileName: string): string
  • Writes the given map to a file.

    This function will throw an error if writing is not supported.

    If there is an error writing the file, it will return a description of the error; otherwise, it will return "".

Generated using TypeDoc