# What Vector Data Sources Does GeoLibre's Time Slider Support?

> Explore supported vector data sources for GeoLibre's Time Slider, including GeoJSON, Vector Tiles, PMTiles, MBTiles, and Zarr. Integrate with any time-dimension layer via bindLayerToTimeSlider.

- Repository: [Open Geospatial Solutions/GeoLibre](https://github.com/opengeos/GeoLibre)
- Tags: api-reference
- Published: 2026-07-31

---

**The GeoLibre Time Slider supports GeoJSON files with timestamp properties, Vector Tiles (MVT), PMTiles, MBTiles, and Zarr data cubes, binding to any layer that exposes a time dimension through the `bindLayerToTimeSlider` API.**

The opengeos/GeoLibre project provides a robust Time Slider plugin that animates both raster and vector data through a docked timeline interface. For vector data specifically, the system can bind any layer containing temporal properties, enabling time-filtered visualization across multiple modern geospatial formats. According to the source code in [`packages/plugins/src/plugins/temporal-layers.ts`](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/temporal-layers.ts), the plugin drives animation by reading timestamp properties or internal time dimensions and applying the slider window as a filter expression or dimension selector.

## Supported Vector Data Sources

The Time Slider plugin can animate any vector layer added through the **Add Data** UI that contains a discoverable time field. The implementation handles format-specific detection logic through the [`time-slider-binding.ts`](https://github.com/opengeos/GeoLibre/blob/main/time-slider-binding.ts) and [`temporal-layers.ts`](https://github.com/opengeos/GeoLibre/blob/main/temporal-layers.ts) modules.

### GeoJSON with Time Properties

Plain **GeoJSON** files containing features with date or datetime properties represent the simplest supported format. The plugin reads the specified property and filters the layer to show only features matching the current slider date.

In [`packages/plugins/src/plugins/temporal-layers.ts`](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/temporal-layers.ts), the `timeBinding` metadata object defines how the slider window applies to GeoJSON features. This binding filters the entire layer client-side without requiring server-side processing.

### Vector Tiles, PMTiles, and MBTiles

For tiled vector sources, the Time Slider supports **MVT (Mapbox Vector Tiles)** served from endpoints, **PMTiles** archives, and **MBTiles** SQLite containers.

According to [`packages/plugins/src/plugins/time-slider-binding.ts`](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/time-slider-binding.ts), the plugin samples a live tile to automatically discover the timestamp field, then creates a binding that drives the slider window across the entire tiled layer. This mechanism works identically for remote MVT endpoints, local PMTiles archives, and vector-based MBTiles files, allowing animation without downloading complete datasets.

### Zarr Data Cubes

**Zarr** stores containing multidimensional arrays with internal time dimensions receive special handling. Rather than treating time as a filterable property, the Time Slider treats the cube as a *selector*.

The [`temporal-layers.ts`](https://github.com/opengeos/GeoLibre/blob/main/temporal-layers.ts) module registers an "internal dimension" adapter that binds the Zarr store to the slider, allowing the timeline to pick specific time slices from the cube's internal structure.

## How the Binding Mechanism Works

The unified API `bindLayerToTimeSlider` handles all vector source types through type-specific adapters. When invoked, the function writes a `metadata.timeBinding` object onto the layer and opens the Time Slider dock automatically.

For GeoJSON layers, the binding applies a JavaScript filter expression. For vector tiles and their variants (PMTiles/MBTiles), the binding configures MapLibre filter expressions based on sampled tile data. For Zarr cubes, the binding manipulates the internal dimension selector.

## Implementation Examples

The following examples demonstrate how to bind each supported vector source type using the public API exported from `@geolibre/plugins`.

### Binding GeoJSON Layers

Pass the layer ID and binding configuration to animate a GeoJSON file containing a `date` property:

```tsx
import { bindLayerToTimeSlider } from '@geolibre/plugins';

function bindGeoJSON(layerId: string) {
  // Binds layer to slider using its configured timestamp property
  bindLayerToTimeSlider(layerId, { bind: true });
}

```

### Binding Vector Tiles, PMTiles, or MBTiles

Add the tile source first, then bind the resulting layer. The plugin automatically detects the timestamp field from a sampled tile:

```tsx
import { addVectorTiles, bindLayerToTimeSlider } from '@geolibre/plugins';

async function addAndBindTiles(url: string) {
  const layer = await addVectorTiles({ url });
  // Works for MVT endpoints, PMTiles, and vector MBTiles
  bindLayerToTimeSlider(layer.id, { bind: true });
}

```

### Binding Zarr Data Cubes

For Zarr stores with internal time dimensions, use the Zarr-specific add function before binding:

```tsx
import { addZarrStore, bindLayerToTimeSlider } from '@geolibre/plugins';

async function bindZarrCube(zarrUrl: string) {
  const layer = await addZarrStore({ url: zarrUrl });
  // Exposes the cube's internal time dimension as a slider selector
  bindLayerToTimeSlider(layer.id, { bind: true });
}

```

## Key Source Files

The vector time animation capability is implemented across three core plugin files:

- **[`packages/plugins/src/plugins/temporal-layers.ts`](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/temporal-layers.ts)** — Defines the `timeBinding` metadata and handles logic for GeoJSON, vector tiles, PMTiles, MBTiles, and Zarr time dimensions.
- **[`packages/plugins/src/plugins/time-slider-binding.ts`](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/time-slider-binding.ts)** — Detects vector-tile sources, creates bindings, and manages cleanup when layers are removed.
- **[`packages/plugins/src/plugins/maplibre-time-slider.ts`](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/maplibre-time-slider.ts)** — Registers the Time Slider plugin with MapLibre, exposing the dock UI and driving the timeline updates.

Documentation for supported data sources is maintained in [`docs/user-guide/data-integrations.md`](https://github.com/opengeos/GeoLibre/blob/main/docs/user-guide/data-integrations.md).

## Summary

- The GeoLibre Time Slider supports **GeoJSON**, **Vector Tiles (MVT)**, **PMTiles**, **MBTiles**, and **Zarr data cubes** for vector animation.
- The `bindLayerToTimeSlider` function in `@geolibre/plugins` provides a unified API for all supported formats.
- Vector tiles and archive formats (PMTiles/MBTiles) use automatic timestamp field detection via live tile sampling.
- Zarr cubes utilize an internal dimension adapter rather than property-based filtering.
- Core logic resides in [`temporal-layers.ts`](https://github.com/opengeos/GeoLibre/blob/main/temporal-layers.ts) and [`time-slider-binding.ts`](https://github.com/opengeos/GeoLibre/blob/main/time-slider-binding.ts) within the plugins package.

## Frequently Asked Questions

### Can I animate GeoJSON files that use different date formats?

Yes. The Time Slider plugin reads the timestamp property as defined in the layer's `timeBinding` metadata. As implemented in [`packages/plugins/src/plugins/temporal-layers.ts`](https://github.com/opengeos/GeoLibre/blob/main/packages/plugins/src/plugins/temporal-layers.ts), the system expects standard ISO date strings or Unix timestamps, but you can preprocess non-standard formats before binding or use MapLibre expressions to transform values during the binding configuration.

### Does PMTiles support require a special server configuration?

No. PMTiles archives work client-side using standard HTTP Range requests. The [`time-slider-binding.ts`](https://github.com/opengeos/GeoLibre/blob/main/time-slider-binding.ts) logic treats PMTiles identically to other vector tile sources, sampling tiles directly from the archive without requiring a dedicated tile server. This allows the Time Slider to animate large vector datasets hosted on static storage like S3 or GitHub Pages.

### How does the plugin handle the time dimension in Zarr cubes differently from GeoJSON?

For Zarr data cubes, the plugin treats time as an **internal dimension selector** rather than a filter property. While GeoJSON binding applies a filter expression to show or hide features based on the current date, the Zarr adapter in [`temporal-layers.ts`](https://github.com/opengeos/GeoLibre/blob/main/temporal-layers.ts) slices the multidimensional array along the time axis. This selects the appropriate data slice for the current slider position without filtering individual records.

### What happens if my vector tiles lack a timestamp field?

If [`time-slider-binding.ts`](https://github.com/opengeos/GeoLibre/blob/main/time-slider-binding.ts) cannot detect a timestamp field during the initial tile sampling, the binding will fail gracefully or treat the layer as non-temporal. You must ensure the vector tile schema includes a date or datetime field, or use the `timeBinding` metadata configuration to manually specify which property to use before calling `bindLayerToTimeSlider`.