> 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/features/indoor-floorplans.md).

# Indoor Floorplans

Not every tracked asset moves. Air-quality sensors, CO₂ monitors, occupancy counters, cold-storage probes and leak detectors sit at fixed points *inside* a building, where a GPS fix is either missing or meaningless — "somewhere in the warehouse" is not an actionable location.

**Indoor Floorplans** gives those devices a real place to live: a building, a floor, and a spot on the plan. Devices placed on a floorplan behave exactly like devices on the live map — same category icons, same details panel, same per-device dashboard.

Indoor Floorplans ships as a plugin. An administrator enables it under **Admin → Plugins**; on self-hosted deployments it requires a Standard-tier licence carrying the `plugin:floorplans` feature.

***

## Sites

Open **Floorplans** in the sidebar. A **site** is one building or campus.

Creating a site asks for a name, an optional description and address, and a **map location** — click the inset map to drop the building pin, or type coordinates. That pin is what puts the site on the live map, so it is worth getting roughly right even if you never calibrate a floorplan.

Deleting a site removes its floorplans, the stored images behind them, and unplaces every device on them. The confirmation names how many of each will be affected before you commit.

***

## Floorplans

Open a site to manage its floors. Each floor is one image for one level of the building.

**Supported formats:** PNG, JPEG, WebP, and PDF.

A **PDF** is converted to an image in your browser at import time. For a multi-page architectural set you get a page picker with a live preview, so you can see which sheet you are importing before committing to it. Only the page you choose is stored — the source PDF is not retained, so importing a second page means uploading the file again.

Each floor carries:

| Field          | Meaning                                                                                             |
| -------------- | --------------------------------------------------------------------------------------------------- |
| **Name**       | What people call it — "Ground Floor", "Mezzanine".                                                  |
| **Level**      | A sortable number. Use `-1` for a basement, `0` for the ground floor. One floor per level per site. |
| **Sort order** | A tie-breaker, shown in the edit dialog alongside the level.                                        |

Floorplan images are private. Every request for one is ownership-checked — they are never served from a public URL.

***

## Placing Devices

Open a floor to enter the **viewer**: a pan-and-zoom canvas showing the plan with your devices on it, plus a **fullscreen** button and a floor switcher for multi-storey buildings.

The **Unplaced devices** panel lists every device of yours that is not yet on a floor. To place one:

* **Drag** the device row onto the plan, or
* **Click** the device row to arm it, then **click** the spot on the plan.

Placed markers can be dragged to a new position; `Esc` cancels a drag in progress. Nothing is written until you press **Save**, and the button shows how many unsaved changes are pending.

Clicking a placed marker selects the device and opens the standard **device details panel** and **device dashboard** beside the plan — the same components the live map uses, including AI-assistant integration and device editing.

***

## Georeferencing (Calibration)

A floorplan is just an image until you tell AdaTrack where it sits on Earth. **Calibrate floorplan** does that from two points:

1. Click a point on the plan whose real-world position you know — a building corner, a loading bay.
2. Drop the matching point on the inset map, or type its latitude/longitude.
3. Repeat for a second, well-separated point.

Two points fix the plan's **scale, rotation and position**. The dialog previews all three live ("1 px = 0.05 m", "12° from north", "84 m across") and warns you if the result implies a building a couple of metres wide or over two kilometres across — usually a sign the two points were swapped.

Once calibrated:

* Placed devices gain real **latitude/longitude**, shown in exports and carried on placement events.
* The floorplan is drawn **in place on the live map** when you zoom past street level.
* The calibration dialog offers a **decoder snippet** you can paste into the device profile's decoder, so a device that reports its own indoor x/y also produces real coordinates — which is what makes geofencing, alerting and the travel log see the indoor position too.

Calibration can be removed at any time; the placements stay where they are and simply lose their derived coordinates.

***

## Live Positioning

A device placed statically stays where you dropped it. If you run an indoor-positioning system (UWB, BLE) whose devices report their own coordinates, switch a placement to **Follows telemetry** from the **Positioning** action on its row.

You then choose:

* **X and Y payload keys** — picked from the numeric keys in the device's most recent payload.
* **Units** — pixels of the plan, or metres. Metres require a calibrated floor, since only the calibration knows how large a pixel is.
* **Origin corner** — which corner of the plan the reported values are measured from.

A live preview shows where the current payload would put the marker before you apply it.

The marker then moves with each telemetry tick and carries a **Live** badge. If the device stops reporting for five minutes — or stops sending the configured keys — its marker falls back to the saved position, dimmed and labelled as a last known position, rather than vanishing.

***

## The Live Map

Sites appear on the live map as **building pins**, visually distinct from device pins. Clicking one opens a drawer with the full floorplan viewer, without leaving the map. A site with no floorplans yet offers a shortcut to add one.

Calibrated floorplans are also drawn **directly onto the map**, in position and rotation, once you zoom in past street level.

***

## Export

From the viewer's **Export** menu:

* **CSV** — every placed device with its floor, pixel position, and (on a calibrated floor) latitude/longitude.
* **GeoJSON** — a point per placed device. Available only on a calibrated floor, since a GeoJSON point has to be somewhere on Earth.

***

## Automation

Placement changes are published to **AdaTrack Flow** for use as workflow triggers:

* `floorplans.device_placed` — a device that was not on any floor has been placed.
* `floorplans.device_moved` — an already-placed device moved, including to a different floor.

Both carry the device, site, floor and level, the pixel position, the positioning mode, and — on a calibrated floor — the derived latitude and longitude.

***

## Limits

An administrator can tune the plugin's limits under **Admin → Plugins → Indoor Floorplans**:

| Setting                     | Default | Meaning                                                 |
| --------------------------- | ------- | ------------------------------------------------------- |
| **Max sites per user**      | 25      | How many buildings one user may create.                 |
| **Max floors per site**     | 20      | How many levels one building may hold.                  |
| **Max floorplan size (MB)** | 25      | Largest single floorplan upload (hard ceiling: 100 MB). |

These are storage limits enforced by the plugin itself — they are not part of your subscription quota, and they do not consume metered platform operations.

***

## Air-Gapped & Self-Hosted

The indoor viewer draws no basemap and needs no map token, so it renders identically in SaaS and self-hosted mode. PDF import runs entirely in your browser with a locally bundled worker. Nothing about placing devices indoors requires outbound network access.

The only parts that do reach outward are the optional inset maps used for the site pin and calibration points, which follow your deployment's usual map configuration.
