Skip to main content

Module tilejson

Module tilejson 

Source
Expand description

TileJSON metadata model for vector and raster tile sources.

TileJSON is the standard metadata format used by MapLibre GL JS and Mapbox GL JS to describe tile sources. A typical vector tile endpoint exposes a tiles.json (or inline TileJSON) that provides:

  • tile URL templates
  • zoom range
  • geographic bounds
  • source-layer names (for vector tiles)
  • attribution

This module provides a parse-once, query-many TileJson struct that the engine can use to configure tile managers and sources.

§Feature gate

Parsing from JSON bytes requires the style-json feature (which enables serde + serde_json). The TileJson struct itself is always available for programmatic construction.

Structs§

TileJson
Parsed TileJSON metadata.
VectorLayerMeta
Metadata for a single source layer inside a vector tile source.

Enums§

TileJsonError
Errors that can occur when parsing TileJSON.
TileScheme
Tile coordinate scheme.

Functions§

parse_tilejson
Parse TileJSON from raw JSON bytes.
parse_tilejson_value
Parse TileJSON from a serde_json::Value.