> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wavecentric.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Flotta Carri

> Real-time GPS tracking and visualization of railway wagons on an interactive map.

**Flotta Carri** provides real-time GPS tracking of railway wagons using location data from Nexxiot API. View all tracked wagons on an interactive map with movement status, location details, and wagon information.

<img src="https://mintcdn.com/wavecentric/no1BAKECPbdJhQ7L/images/magemo/fleet/flotta-carri.png?fit=max&auto=format&n=no1BAKECPbdJhQ7L&q=85&s=0e5e217b18b1e1ae20383bacd79aa092" alt="Flotta Carri - Real-time Wagon Fleet Map Dashboard" width="1526" height="578" data-path="images/magemo/fleet/flotta-carri.png" />

## Workflow Visualization

```mermaid theme={null}
graph TD
    User([User Opens Flotta Carri]) --> Auth[Authenticate with Nexxiot API]
    Auth --> Fetch[Fetch GPS Asset Data]
    Fetch --> Extract[Extract Wagon Locations]
    Extract --> Filter[Filter Valid Coordinates]
    Filter --> Map[Render Interactive Map]
    
    Map --> Moving[Moving Wagons]
    Map --> Standing[Standing Wagons]
    
    Moving --> Cluster[Marker Clustering]
    Standing --> Cluster
    
    Cluster --> Interactive[Interactive Display]
    Interactive --> StatusBar[Status Bar with Counts]
    Interactive --> Tooltips[Wagon Details on Hover]
    Interactive --> Filters[Filter by Movement Status]
```

## Key Features

### Real-Time GPS Tracking

* Fetches live wagon locations from Nexxiot third-party API
* Displays GPS coordinates on interactive Leaflet map
* Auto-centers map on fleet location

### Movement Status Visualization

The dashboard provides immediate visual feedback on the operational state of the fleet:

* <div className="flex items-center gap-2"><div className="w-3 h-3 rounded-full bg-blue-500" /> **in movimento**: Wagons currently in transit (Nexxiot detection).</div>

* <div className="flex items-center gap-2"><div className="w-3 h-3 rounded-full bg-gray-500" /> **in piedi**: Wagons currently stationary at a node.</div>

* <div className="flex items-center gap-2"><div className="w-3 h-3 rounded-full bg-green-500" /> **tutto**: The total tracked inventory.</div>

* **Moving Wagons**: Blue truck icons (🚚) with a pulsing animation for live identification.

* **Standing Wagons**: Gray static icons (🚚) representing idle or parked assets.

### Interactive Map Controls

* **Click Status Bar**: Filter wagons by movement state
* **Hover on Markers**: View wagon details instantly
* **Marker Clustering**: Groups nearby wagons for cleaner visualization
* **Zoom & Pan**: Navigate across the entire fleet

### Wagon Information

Each wagon marker displays:

* **EVN**: Unique wagon identifier
* **Type**: Wagon type classification
* **Status**: Moving or Standing
* **Location**: Current address/display name
* **Time**: Last GPS measurement timestamp

[Open Flotta Carri →](https://ai-loop.alpeadria.com/ai-loop/flows?flow=flotta_carri)

## How It Works

<Steps>
  <Step>
    ### 1. API Authentication

    System authenticates with Nexxiot API to access GPS tracking data.
  </Step>

  <Step>
    ### 2. Fetch Wagon Data

    Retrieves all assets with:

    * GPS coordinates (latitude, longitude)
    * Movement state (moving/standing)
    * Wagon metadata (type, EVN)
    * Location details and timestamps
  </Step>

  <Step>
    ### 3. Map Visualization

    Renders interactive map with:

    * Moving wagons: Blue icons with pulse animation
    * Standing wagons: Gray static icons
    * Clustered markers for dense areas
    * Status bar with live counts
  </Step>

  <Step>
    ### 4. User Interaction

    Users can:

    * Filter by clicking status counts
    * Hover for wagon details
    * Zoom to specific regions
    * Track individual wagons
  </Step>
</Steps>
