Skip to content

Authoring Layouts Map

EmoTracker Community edited this page Apr 8, 2026 · 2 revisions

Authoring Layouts — Map

A map layout element displays one or more of the pack's maps — the actual scrollable/zoomable image overlays with location squares the player clicks on. By default it displays all maps the pack has registered; you can restrict it to a specific subset by name.

See Authoring Layouts for the file format and base fields. This page only covers fields specific to the map type.

JSON schema

Parsed in EmoTracker.Data/Layout/MapPanel.cs. Matches the map branch in layouts.json.

Field Type Required Default Description
type "map" yes Literal string.
maps array of strings no all registered maps A list of map names (matching the name from your maps JSON) to include in this map element.
orientation string no "auto" How multiple maps are arranged: "auto", "horizontal", "vertical". Auto picks based on the element's aspect ratio.

Plus the standard base fields from Authoring Layouts → Fields every layout element shares.

Behavior

  • The element only renders if the pack has its map enabled in the runtime — if Tracker.MapEnabled is false, the element is silently dropped at parse time.
  • When maps is omitted, the element shows every map registered in the pack via Tracker:AddMaps(...).
  • When maps is present, only the named maps appear, in the order listed.
  • With orientation: "auto" (the default), the element picks horizontal or vertical based on its own aspect ratio — wider than tall → horizontal flow, taller than wide → vertical.

Examples

Showing every map

{
  "type": "map"
}

Showing a specific subset

{
  "type": "map",
  "maps": [ "lightworld", "darkworld" ],
  "orientation": "horizontal"
}

Map inside a tabbed view

{
  "type": "tabbed",
  "tabs": [
    {
      "title": "Light World",
      "content": { "type": "map", "maps": [ "lightworld" ] }
    },
    {
      "title": "Dark World",
      "content": { "type": "map", "maps": [ "darkworld" ] }
    }
  ]
}

Tips and pitfalls

  • Maps must be registered first. Load your maps JSON via Tracker:AddMaps(...) before any layout that includes a map element.
  • Map names are case-sensitive lookups. They have to match the name field from your maps JSON exactly.
  • Unknown map names are silently skipped. If you misspell a name in maps, that entry just doesn't appear — no error is logged. Always test the pack to confirm every map shows up.
  • Pair with a Dock or ViewBox parent for sensible sizing — without explicit dimensions the map element fills its allocated slot, which can produce surprising results in unbounded parents.
  • The element drops itself when maps are disabled. If you have a layout that's used both in "map enabled" and "map disabled" pack modes, the surrounding layout should tolerate the absence — the map element simply doesn't render in disabled mode.

See also

Clone this wiki locally