Preview placing a template instance
tiled_preview_templatePlaces a template instance on a map layer at given coordinates after validating the template path and pinning its revision, returning an edit change set.
Instructions
Places one JSON object template instance in Tiled's minimal serialized form — {id, template, x, y}, with every other member inherited from the template at load time. The template is read and validated through the same fail-closed profile as template expansion (tile and nested templates reject), its revision is pinned into the plan, and apply re-verifies both the pin and that the map-relative reference still resolves to the pinned path. Returns an ordinary mapEdit change set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| layerId | Yes | ||
| mapPath | Yes | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| templatePath | Yes | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| expectedMapRevision | Yes | SHA-256 revision returned by a read or preview | |
| expectedTemplateRevision | No | SHA-256 revision returned by a read or preview | |
| expectedDependencyRevisions | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |