Skip to content

spatial-monorepo


spatial-monorepo / verticals/src / ClassScheduleLayer

Function: ClassScheduleLayer()

ClassScheduleLayer(__namedParameters?): Element | null

Defined in: packages/verticals/src/components/CampusProfile.tsx:598

Highlights units with active classes via MapLibre setFeatureState. Tapping a highlighted unit opens an InfoCard with course details. Source/layer is NOT reloaded — only feature state is mutated.

Issue #830 — sourceId has no misleading default (mirrors the #602 fix on HospitalProfile's RoomStatusFeatureStateLayer). IMDF unit sources are per-level (imdf-units-<levelId>, see getIMDFSourceIds in @diginestai/core), so guessing a literal like 'campus-units' would just be a different wrong default. Callers must pass the real, level-scoped source id (e.g. getIMDFSourceIds(activeLevelId).units) explicitly; when absent, this component no-ops and logs a dev warning instead of spamming MapLibre "source not found" errors.

Parameters

__namedParameters?

sourceId?

string

Returns

Element | null

Released under commercial licensing.