TileJSON Specification

repository·master·Indexed 43 days ago

https://github.com/mapbox/tilejson-spec

An 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.

Tokens
9.7K
Snippets
11
Records
26
Agent score
51%

What's inside TileJSON

  1. What is TileJSON 2.0.0?

    master
    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.
  2. What is TileJSON?

    master
    TileJSON 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.
  3. Understand the TileJSON specification purpose

    master
    TileJSON 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.
  4. What is TileJSON and how is it used?

    master

    TileJSON 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.
  5. TileJSON File Format and Implementation Rules

    master

    TileJSON 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, and REQUIRED follow RFC 2119 semantics.
  6. Implement TileJSON parsing and validation rules

    master

    When 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.
  7. Caching requirements for TileJSON clients

    master
    Clients 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.
  8. Implement caching for TileJSON and tiles

    master
    Clients 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.