Skip to contents

A hierarchy state keeps one parent/root dragmapr_state together with any child-level states created while drilling into the map. It is useful for apps that move between levels such as divisions, states, counties, or municipalities without losing each level's edits.

Usage

d_hierarchy_state(
  root = d_state(),
  children = list(),
  active_path = character(),
  relationships = NULL,
  version = 0L
)

validate_dragmapr_hierarchy_state(hierarchy)

Arguments

root

A root d_state().

children

Named list of child d_state() objects.

active_path

Character vector describing the active path through the hierarchy.

relationships

Optional normalized table from d_relationships().

version

Integer hierarchy revision.

hierarchy

A dragmapr_hierarchy_state.

Value

An object of class "dragmapr_hierarchy_state".