TileJSON Specification
repository·master·Indexed 43 days ago
https://github.com/mapbox/tilejson-specAn open specification for representing map metadata in a standardized JSON format. It allows map servers to describe tilesets and map clients to configure how to fetch, display, and interact with web-based map layers. The spec covers required and optional keys such as tile endpoints, zoom levels (minzoom, maxzoom, fillzoom), spatial bounds, coordinate schemes (xyz, tms), and vector layer metadata.
What's inside TileJSON
- TileJSON is a standard specification for representing metadata about web-based map layers. It provides a structured JSON format that helps clients (like map renderers) configure how to fetch, display, and interact with tilesets. It covers essential information such as tile endpoints, zoom levels, spatial bounds, and attribution.
What is TileJSON?
masterTileJSON is a standard for representing metadata about various types of web-based map layers. It provides a JSON manifest that helps clients (like map renderers) configure how to fetch, display, and interact with tilesets, including information about zoom levels, bounds, attribution, and data endpoints.Understand the TileJSON specification purpose
masterTileJSON is a technical standard used to describe metadata for various types of web map layers. This metadata allows clients (such as map renderers) to configure and browse tile sets efficiently by providing information about tile URLs, zoom levels, bounds, and other descriptive properties.Understand the purpose of TileJSON
masterTileJSON is a standard for representing metadata about various types of web-based layers. Its primary goal is to provide clients with the necessary configuration and information to browse and render tilesets effectively.What is TileJSON and how is it used?
masterTileJSON is a standard for representing metadata about various types of web-based map layers. It provides a JSON manifest that helps clients (like map renderers) configure how to fetch, display, and interact with tilesets.
Key behaviors for implementations:
- Unknown keys: Implementations MUST treat unknown keys as if they weren't present, but MUST expose them in their API so users can handle them.
- Invalid values: Implementations MUST treat invalid values for keys as if they weren't present. However, if a REQUIRED key has an invalid value, the entire manifest MUST be treated as invalid.
- Caching: Clients MAY cache files. When caching, implementations MUST honor valid HTTP cache-control headers for both the manifest and the tile images.
TileJSON File Format and Implementation Rules
masterTileJSON manifests use the JSON format (RFC 4627). When implementing a TileJSON parser, follow these rules:
- Unknown Keys: Implementations MUST treat unknown keys as if they weren't present, but MUST expose them in the API so users can optionally handle them.
- Invalid Values: Implementations MUST treat invalid values for keys as if they weren't present.
- Required Keys: If a required key has an invalid value, the implementation MUST treat the entire manifest as invalid and refuse operation.
- RFC 2119 Compliance: Keywords like
MUST,SHOULD, andREQUIREDfollow RFC 2119 semantics.
Implement TileJSON parsing and validation rules
masterWhen building an implementation of the TileJSON specification, follow these rules for handling JSON keys:
- Unknown Keys: Implementations must ignore unknown keys, but they must expose these unknown keys/values in their API so that users can choose to process them.
- Invalid Values: Implementations must ignore invalid values for keys.
- Required Keys: If a required key has an invalid value, the implementation must treat the entire TileJSON object as invalid and refuse further processing.
Caching requirements for TileJSON clients
masterClients implementing caching for TileJSON manifests or the tiles themselves MUST honor valid HTTP cache control headers as defined in the HTTP specification. This applies to both the TileJSON manifest file and the individual tile images.Caching TileJSON and Tile Data
masterClients are permitted to cache files retrieved from remote servers. When implementing caching, clients must comply with the valid HTTP cache control headers defined for both tile data and the TileJSON description files.Handle TileJSON caching
masterClients are permitted to cache files retrieved from remote servers. When implementing caching, the client must comply with valid HTTP cache control headers defined for both the tile data and the TileJSON description file.Implement caching for TileJSON and tiles
masterClients are permitted to cache files retrieved from remote servers. When implementing caching, you MUST honor valid HTTP cache control headers for both the TileJSON manifest file and the individual tile images as defined in the HTTP specification.Handle Caching for TileJSON and Tiles
masterClients are permitted to cache files retrieved from a remote server. When implementing caching, you MUST honor valid HTTP cache control headers for both the TileJSON manifest file and the individual tile images.