data — Map reading

Read topics, notes, and resources from the approved map.

Table of content
  1. Main methods
  2. Capabilities
  3. Limits

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

Main methods

Method Purpose
this.data.getVirtualCollection({ dataType }) Open a Node, Note, or Resource collection
collection.getAllEntities() Read topics; use targeted reads for notes and resources
collection.getChildren(parentId) Read children of a topic or other parent
collection.getEntityById(id) Read one entity in the approved map
entity.getData() Read the entity snapshot
entity.on(type, listener) / entity.off(type, listener) Observe or unsubscribe from entity changes
collection.destroy() Release the collection and its handles
const topics = await this.data.getVirtualCollection({ dataType: 'Node' });
const entities = await topics.getAllEntities();
const names = entities.map(topic => topic.name);
topics.destroy();

Capabilities

Limits

Access is read-only and restricted to the approved map. Creating, updating, and deleting map entities through this API is not implemented. Supplying another map's ID does not expand access.

Reads are bounded to at most 200 entities per request and 250 retained entity handles per collection. Use getChildren() for larger maps and release handles when finished. Notes and resources generally require getChildren() or getEntityById() instead of getAllEntities().