> For the complete documentation index, see [llms.txt](https://adatrack.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adatrack.gitbook.io/docs/documentation/core-concepts/real-time-tracking.md).

# Real-time Tracking

AdaTrack provides a high-performance, smooth, and interactive map interface for visualizing your IoT fleet in real-time.

### The Live Map Interface

The **Live Map** is the primary dashboard for monitoring your assets. It combines the latest telemetry data with smooth animations and historical breadcrumbs to give you a complete picture of your fleet's activity.

### Technology Stack: Why it's Smooth

Unlike traditional mapping libraries that struggle with more than a few hundred markers, AdaTrack's frontend is built for scale:

* **Deck.gl (WebGL):** We use GPU-accelerated rendering to handle thousands of assets simultaneously without any lag.
* **Mapbox GL JS:** Our basemaps are vector-based, providing high-resolution details and smooth zooming.
* **Declarative Transitions:** When a device sends a new position via UDP, the map icon doesn't "teleport." Instead, it smoothly interpolates (glides) between its old and new coordinates over the update interval.

### Map Features

#### 1. Asset Icons & Status

Each device is represented by a customizable icon. The color and status of the icon change based on real-time data:

* **Green:** Active and sending data.
* **Gray:** Inactive or offline.
* **Red:** In an alarm or alert state (e.g., geofence breach).

#### 2. Historical Breadcrumbs

By selecting a device, you can visualize its **Historical Breadcrumbs**. This trail shows the path the device has taken over the last N hours, with arrows indicating the direction of travel.

#### 3. Asset Details Panel

Clicking on any marker opens a detailed panel showing:

* Latest decoded telemetry (Temperature, Humidity, Speed, etc.).
* Connection status and RSSI.
* Last seen timestamp.
* Associated Device Profile and active Geofences.

#### 4. Clustering

When zoomed out, nearby devices are automatically clustered into single markers with a count. This keeps the map clean and provides a high-level view of your fleet's density.

### Configuration

You can customize the map view from the **Settings** menu:

* **Basemap Selection:** Switch between Satellite, Street, and Dark modes.
* **Update Frequency:** Control how often the map refreshes (real-time vs. periodic).
* **Trail Length:** Adjust the duration of the historical breadcrumbs shown on the map.

### Staying in Sync After a Reconnect

Browser tabs get backgrounded, laptops sleep, and mobile connections drop — all things that can silently break a live WebSocket connection. AdaTrack watches for this: when a dashboard tab that lost its connection becomes active again, it automatically checks whether the connection is still alive and reconnects if not.

On reconnect, the dashboard catches up on whatever happened while it was disconnected — new readings, alerts, and other events — instead of just resuming from wherever the stream left off and leaving you looking at stale positions. If the gap was too long to catch up incrementally, the dashboard falls back to a full refresh of your devices and data, so you're never left staring at outdated information without knowing it. This applies both to your regular dashboard and to public/kiosk dashboards, so unattended displays stay accurate too.

### Troubleshooting Map Issues

If you don't see your devices on the map:

1. **Check GPS Fix:** Ensure your device has a valid GPS signal and is reporting `latitude` and `longitude` in its decoded payload.
2. **Verify Authentication:** Confirm that the device's UDP packets are being accepted by the backend (check the "Last Seen" timestamp).
3. **Check Filters:** Ensure you haven't applied any filters that might be hiding the device (e.g., filtering for a different Device Profile).
