Skip to content

spatial-monorepo


spatial-monorepo / core/src / updateSensorReadings

Function: updateSensorReadings()

updateSensorReadings(map, id, readings): void

Defined in: packages/core/src/layers/SensorOverlay.ts:247

updateSensorReadings — issue #649: coalesces rapid calls into a single rAF-scheduled flush (never more than one setData/setFeatureState pass per animation frame, regardless of how many times this is called within that frame), and — mirroring the RTLS pattern — only calls setData when the sensor id set changes; per-sensor value changes are written via map.setFeatureState instead of rebuilding the whole GeoJSON source.

Parameters

map

Map$1

id

string

readings

SensorReading[]

Returns

void

Released under commercial licensing.