Skip to content

Add annotation shape renderers to VS Code extension #86

@IanMayo

Description

@IanMayo

Problem

The VS Code extension can display tracks and reference locations, but REP files also contain annotation shapes (circles, rectangles, lines, text, vectors, narratives) that are not yet rendered. These annotations are important for exercise analysis context.

Proposed Solution

Add renderer classes for all 6 annotation types defined in the schema:

Type Leaflet Primitive Style Schema
Circle L.circle (using center/radius) PolygonProperties
Rectangle L.polygon PolygonProperties
Line L.polyline LineProperties
Text L.marker with divIcon PointProperties
Vector L.polyline (with arrowhead?) LineProperties
Narrative L.marker or list view PointProperties

Architecture: Separate renderer class per type (e.g., CircleRenderer, RectangleRenderer) following the existing TrackRenderer/LocationRenderer pattern.

Circle note: Use native L.circle with center/radius from properties for smooth rendering rather than the polygon approximation in geometry.

Success Criteria

  • All 6 annotation types render correctly on the map
  • Styling properties (color, weight, opacity, fill, dash) applied from schema
  • Annotations are selectable (click to select, multi-select with modifier keys)
  • Selection integrates with existing SelectionManager
  • Annotations appear in outline/layers view
  • Tooltips show annotation metadata on hover

Constraints

  • IO parsing already complete (debrief-io produces annotation GeoJSON)
  • Must follow existing renderer patterns for consistency
  • Must apply styles from PointProperties/LineProperties/PolygonProperties schemas

Out of Scope

  • Editing annotations (view-only for now)
  • Creating new annotations in VS Code
  • Animation or time-filtering of annotations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions