map — Topic drawings

Draw temporary graphics and text in the open map.

Table of content
  1. Main methods
  2. Drawing capabilities
  3. Limits

Capability: map · Available in: live preview with an open map.

Main methods

Method Purpose
this.map.getVirtualCanvas({ nodeId }) Get a drawing surface attached to a topic
canvas.getLocalTransform() Read the topic's local bounds
canvas.getTransform() Read its current transform asynchronously
canvas.createGraphics() Create a shape-drawing object
canvas.createText({ text, style }) Create a text object
canvas.createContainer() Group display objects
canvas.appendChild(object) Attach an object to the surface
canvas.destroy() Remove the surface and its drawings

Drawing capabilities

Graphics support fills, line styles, circles, ellipses, rectangles, rounded rectangles, lines, and curves. Display objects support position, scale, pivot, rotation, alpha, and tint.

Use the Map highlighter workspace template for a complete example combining data, map, and ui. Topic drawings follow the map's movement and zoom.

Limits

Drawings are temporary overlays; they do not change the stored map. Stopping or replacing the runtime removes them. The canvas is restricted to topics in the approved map. Textures, widgets, and the full historical renderer are not implemented.