├── 1.0.0 ├── example │ └── osm.layer ├── schema.json └── README.md ├── 2.0.0 ├── example │ └── osm.layer ├── schema.json └── README.md ├── 2.0.1 ├── example │ └── osm.layer ├── schema.json └── README.md ├── 2.1.0 ├── example │ └── osm.layer ├── schema.json ├── README-zh.md └── README.md ├── 2.2.0 ├── example │ └── osm.layer ├── schema.json ├── README-zh.md └── README.md ├── README.md ├── 3.0.0 ├── example │ └── osm.json ├── schema.json └── README.md ├── CHANGELOG.md ├── CONTRIBUTING.md └── CODE_OF_CONDUCT.md /1.0.0/example/osm.layer: -------------------------------------------------------------------------------- 1 | { 2 | "tilejson": "1.0.0", 3 | "name": "OpenStreetMap", 4 | "description": "A free editable map of the whole world.", 5 | "version": "1.0.0", 6 | "attribution": "(c) OpenStreetMap contributors, CC-BY-SA", 7 | "scheme": "xyz", 8 | "tiles": [ 9 | "https://a.tile.openstreetmap.org/{z}/{x}/{y}.png", 10 | "https://b.tile.openstreetmap.org/{z}/{x}/{y}.png", 11 | "https://c.tile.openstreetmap.org/{z}/{x}/{y}.png" 12 | ], 13 | "minzoom": 0, 14 | "maxzoom": 18, 15 | "bounds": [ -180, -85, 180, 85 ] 16 | } 17 | -------------------------------------------------------------------------------- /2.0.0/example/osm.layer: -------------------------------------------------------------------------------- 1 | { 2 | "tilejson": "1.0.0", 3 | "name": "OpenStreetMap", 4 | "description": "A free editable map of the whole world.", 5 | "version": "1.0.0", 6 | "attribution": "(c) OpenStreetMap contributors, CC-BY-SA", 7 | "scheme": "xyz", 8 | "tiles": [ 9 | "https://a.tile.openstreetmap.org/{z}/{x}/{y}.png", 10 | "https://b.tile.openstreetmap.org/{z}/{x}/{y}.png", 11 | "https://c.tile.openstreetmap.org/{z}/{x}/{y}.png" 12 | ], 13 | "minzoom": 0, 14 | "maxzoom": 18, 15 | "bounds": [ -180, -85, 180, 85 ] 16 | } 17 | -------------------------------------------------------------------------------- /2.0.1/example/osm.layer: -------------------------------------------------------------------------------- 1 | { 2 | "tilejson": "1.0.0", 3 | "name": "OpenStreetMap", 4 | "description": "A free editable map of the whole world.", 5 | "version": "1.0.0", 6 | "attribution": "(c) OpenStreetMap contributors, CC-BY-SA", 7 | "scheme": "xyz", 8 | "tiles": [ 9 | "https://a.tile.openstreetmap.org/{z}/{x}/{y}.png", 10 | "https://b.tile.openstreetmap.org/{z}/{x}/{y}.png", 11 | "https://c.tile.openstreetmap.org/{z}/{x}/{y}.png" 12 | ], 13 | "minzoom": 0, 14 | "maxzoom": 18, 15 | "bounds": [ -180, -85, 180, 85 ] 16 | } 17 | -------------------------------------------------------------------------------- /2.1.0/example/osm.layer: -------------------------------------------------------------------------------- 1 | { 2 | "tilejson": "1.0.0", 3 | "name": "OpenStreetMap", 4 | "description": "A free editable map of the whole world.", 5 | "version": "1.0.0", 6 | "attribution": "(c) OpenStreetMap contributors, CC-BY-SA", 7 | "scheme": "xyz", 8 | "tiles": [ 9 | "https://a.tile.openstreetmap.org/{z}/{x}/{y}.png", 10 | "https://b.tile.openstreetmap.org/{z}/{x}/{y}.png", 11 | "https://c.tile.openstreetmap.org/{z}/{x}/{y}.png" 12 | ], 13 | "minzoom": 0, 14 | "maxzoom": 18, 15 | "bounds": [ -180, -85, 180, 85 ] 16 | } 17 | -------------------------------------------------------------------------------- /2.2.0/example/osm.layer: -------------------------------------------------------------------------------- 1 | { 2 | "tilejson": "1.0.0", 3 | "name": "OpenStreetMap", 4 | "description": "A free editable map of the whole world.", 5 | "version": "1.0.0", 6 | "attribution": "(c) OpenStreetMap contributors, CC-BY-SA", 7 | "scheme": "xyz", 8 | "tiles": [ 9 | "https://a.tile.openstreetmap.org/{z}/{x}/{y}.png", 10 | "https://b.tile.openstreetmap.org/{z}/{x}/{y}.png", 11 | "https://c.tile.openstreetmap.org/{z}/{x}/{y}.png" 12 | ], 13 | "minzoom": 0, 14 | "maxzoom": 18, 15 | "bounds": [ -180, -85, 180, 85 ] 16 | } 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TileJSON 2 | 3 | TileJSON is an open standard for representing map metadata. Current version: [3.0.0](/3.0.0) 4 | 5 | ## License 6 | 7 | The text of this specification is licensed under a 8 | [Creative Commons Attribution 3.0 United States License](https://creativecommons.org/licenses/by/3.0/us/). 9 | However, the use of this spec in products and code is entirely free: 10 | there are no royalties, restrictions, or requirements. 11 | 12 | ## Implementations 13 | 14 | #### Servers 15 | 16 | * [Carto](https://carto.com/) 17 | * [Mapbox](https://www.mapbox.com/) 18 | * [TileStache](http://tilestache.org/) 19 | * [Martin](https://github.com/maplibre/martin) 20 | 21 | #### Writing 22 | 23 | * [TileStream](https://github.com/mapbox/tilestream) 24 | 25 | #### Reading 26 | 27 | * [TileStream](https://github.com/mapbox/tilestream) via [node-tilejson](https://github.com/mapbox/node-tilejson) 28 | * [Mapbox GL JS](https://www.mapbox.com/mapbox-gl-js/) 29 | * [Mapbox iOS SDK](https://www.mapbox.com/mapbox-ios-sdk/) 30 | * [OpenLayers](https://openlayers.org/) 31 | * [Leaflet-tilejson](https://github.com/kartena/leaflet-tilejson) 32 | * [Wax](https://github.com/mapbox/wax) via `wax.tilejson(url, callback)` 33 | 34 | ## Authors 35 | 36 | * Konstantin Käfer 37 | * Young Hahn 38 | * Tom MacWright 39 | * Carol Hansen 40 | * Sam Matthews 41 | 42 | ## Translations 43 | 44 | * [简体中文](https://github.com/jingsam/tilejson-spec/blob/master/2.2.0/README-zh.md) 45 | -------------------------------------------------------------------------------- /3.0.0/example/osm.json: -------------------------------------------------------------------------------- 1 | { 2 | "tilejson": "3.0.0", 3 | "name": "OpenStreetMap", 4 | "description": "A free editable map of the whole world.", 5 | "version": "1.0.0", 6 | "attribution": "(c) OpenStreetMap contributors, CC-BY-SA", 7 | "scheme": "xyz", 8 | "tiles": [ 9 | "https://a.tile.custom-osm-tiles.org/{z}/{x}/{y}.mvt", 10 | "https://b.tile.custom-osm-tiles.org/{z}/{x}/{y}.mvt", 11 | "https://c.tile.custom-osm-tiles.org/{z}/{x}/{y}.mvt" 12 | ], 13 | "minzoom": 0, 14 | "maxzoom": 18, 15 | "bounds": [ -180, -85, 180, 85 ], 16 | "fillzoom": 6, 17 | "something_custom": "this is my unique field", 18 | "vector_layers": [ 19 | { 20 | "id": "telephone", 21 | "fields": { 22 | "phone_number": "the phone number", 23 | "payment": "how to pay" 24 | } 25 | }, 26 | { 27 | "id": "bicycle_parking", 28 | "fields": { 29 | "type": "the type of bike parking", 30 | "year_installed": "the year the bike parking was installed" 31 | } 32 | }, 33 | { 34 | "id": "showers", 35 | "fields": { 36 | "water_temperature": "the maximum water temperature", 37 | "wear_sandles": "whether you should wear sandles or not", 38 | "wheelchair": "is the shower wheelchair friendly?" 39 | } 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 3.0.0 (Aug 18th, 2021) 2 | 3 | - **BREAKING**: document and require `vector_layers` key for all vector tilesets 4 | - Further clarify existing fields and update format of the specification 5 | - Include notes and comments about overzooming when discussing maxzoom and fillzoom 6 | - Consistify usage of "keys" or "fields" across the spec 7 | - Consistify usage of "set of tiles" 8 | - Clearly define the word "implementation" 9 | - Add note about "interactivity" regarding UTF-Grids and how this field predates GL-based maps 10 | - Clarify if `bounds` values can be the same to represent a single point tileset 11 | - Remove wiki and add implementations to README 12 | 13 | Thanks reviewers! @pnorman, @stevage, @samanpwbb, @asheemmamoowala 14 | 15 | ## 2.2.0 (Feb 3rd, 2017) 16 | 17 | - Increase suggested possible `maxzoom` value from `22` to `30` 18 | 19 | ## 2.1.0 (June 19th, 2012) 20 | 21 | - `data` key added, [pull request](https://github.com/mapbox/tilejson-spec/commit/f576ee2491f888a14d1acb68a0704d160bf4747b) 22 | - removed experimental `resolution` parameter 23 | 24 | ## 2.0.1 (May 29th, 2012) 25 | 26 | - Add experimental `resolution` parameter (no longer supported), [commit](https://github.com/mapbox/tilejson-spec/commit/f576ee2491f888a14d1acb68a0704d160bf4747b) 27 | 28 | ## 2.0.0 (Nov 2nd, 2011) 29 | 30 | - `formatter` renamed to `template` to work with mustache templates, per changes to the [utfgrid-spec version 1.2](https://github.com/mapbox/utfgrid-spec/blob/master/CHANGELOG.md#12) 31 | 32 | ## 1.0.0 (July 13th, 2011) 33 | 34 | - first 🎉 35 | -------------------------------------------------------------------------------- /1.0.0/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TileJSON", 3 | "type": "object", 4 | "properties": { 5 | "tilejson": { 6 | "type": "string", 7 | "required": true, 8 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "version": { 17 | "type": "string", 18 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 19 | }, 20 | "attribution": { 21 | "type": "string" 22 | }, 23 | "formatter": { 24 | "type": "string" 25 | }, 26 | "legend": { 27 | "type": "string" 28 | }, 29 | "scheme": { 30 | "type": "string" 31 | }, 32 | "tiles": { 33 | "type": "array", 34 | "required": true, 35 | "items": { 36 | "type": "string" 37 | } 38 | }, 39 | "grids": { 40 | "type": "array", 41 | "items": { 42 | "type": "string" 43 | } 44 | }, 45 | "minzoom": { 46 | "minimum": 0, 47 | "maximum": 22, 48 | "type": "integer" 49 | }, 50 | "maxzoom": { 51 | "minimum": 0, 52 | "maximum": 22, 53 | "type": "integer" 54 | }, 55 | "bounds": { 56 | "type": "array", 57 | "items": { 58 | "type": "number" 59 | } 60 | }, 61 | "center": { 62 | "type": "array", 63 | "items": { 64 | "type": "number" 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /2.0.0/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TileJSON", 3 | "type": "object", 4 | "properties": { 5 | "tilejson": { 6 | "type": "string", 7 | "required": true, 8 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "version": { 17 | "type": "string", 18 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 19 | }, 20 | "attribution": { 21 | "type": "string" 22 | }, 23 | "template": { 24 | "type": "string" 25 | }, 26 | "legend": { 27 | "type": "string" 28 | }, 29 | "scheme": { 30 | "type": "string" 31 | }, 32 | "tiles": { 33 | "type": "array", 34 | "required": true, 35 | "items": { 36 | "type": "string" 37 | } 38 | }, 39 | "grids": { 40 | "type": "array", 41 | "items": { 42 | "type": "string" 43 | } 44 | }, 45 | "minzoom": { 46 | "minimum": 0, 47 | "maximum": 22, 48 | "type": "integer" 49 | }, 50 | "maxzoom": { 51 | "minimum": 0, 52 | "maximum": 22, 53 | "type": "integer" 54 | }, 55 | "bounds": { 56 | "type": "array", 57 | "items": { 58 | "type": "number" 59 | } 60 | }, 61 | "center": { 62 | "type": "array", 63 | "items": { 64 | "type": "number" 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /2.0.1/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TileJSON", 3 | "type": "object", 4 | "properties": { 5 | "tilejson": { 6 | "type": "string", 7 | "required": true, 8 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "version": { 17 | "type": "string", 18 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 19 | }, 20 | "attribution": { 21 | "type": "string" 22 | }, 23 | "template": { 24 | "type": "string" 25 | }, 26 | "legend": { 27 | "type": "string" 28 | }, 29 | "scheme": { 30 | "type": "string" 31 | }, 32 | "tiles": { 33 | "type": "array", 34 | "required": true, 35 | "items": { 36 | "type": "string" 37 | } 38 | }, 39 | "grids": { 40 | "type": "array", 41 | "items": { 42 | "type": "string" 43 | } 44 | }, 45 | "resolution": { 46 | "type": "integer" 47 | }, 48 | "minzoom": { 49 | "minimum": 0, 50 | "maximum": 22, 51 | "type": "integer" 52 | }, 53 | "maxzoom": { 54 | "minimum": 0, 55 | "maximum": 22, 56 | "type": "integer" 57 | }, 58 | "bounds": { 59 | "type": "array", 60 | "items": { 61 | "type": "number" 62 | } 63 | }, 64 | "center": { 65 | "type": "array", 66 | "items": { 67 | "type": "number" 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /2.1.0/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TileJSON", 3 | "type": "object", 4 | "properties": { 5 | "tilejson": { 6 | "type": "string", 7 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 8 | }, 9 | "name": { 10 | "type": "string" 11 | }, 12 | "description": { 13 | "type": "string" 14 | }, 15 | "version": { 16 | "type": "string", 17 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 18 | }, 19 | "attribution": { 20 | "type": "string" 21 | }, 22 | "template": { 23 | "type": "string" 24 | }, 25 | "legend": { 26 | "type": "string" 27 | }, 28 | "scheme": { 29 | "type": "string" 30 | }, 31 | "tiles": { 32 | "type": "array", 33 | "items": { 34 | "type": "string" 35 | } 36 | }, 37 | "grids": { 38 | "type": "array", 39 | "items": { 40 | "type": "string" 41 | } 42 | }, 43 | "data": { 44 | "type": "array", 45 | "items": { 46 | "type": "string" 47 | } 48 | }, 49 | "minzoom": { 50 | "minimum": 0, 51 | "maximum": 22, 52 | "type": "integer" 53 | }, 54 | "maxzoom": { 55 | "minimum": 0, 56 | "maximum": 22, 57 | "type": "integer" 58 | }, 59 | "bounds": { 60 | "type": "array", 61 | "items": { 62 | "type": "number" 63 | } 64 | }, 65 | "center": { 66 | "type": "array", 67 | "items": { 68 | "type": "number" 69 | } 70 | } 71 | }, 72 | "required": ["tilejson", "tiles"] 73 | } 74 | -------------------------------------------------------------------------------- /2.2.0/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TileJSON", 3 | "type": "object", 4 | "properties": { 5 | "tilejson": { 6 | "type": "string", 7 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 8 | }, 9 | "name": { 10 | "type": "string" 11 | }, 12 | "description": { 13 | "type": "string" 14 | }, 15 | "version": { 16 | "type": "string", 17 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 18 | }, 19 | "attribution": { 20 | "type": "string" 21 | }, 22 | "template": { 23 | "type": "string" 24 | }, 25 | "legend": { 26 | "type": "string" 27 | }, 28 | "scheme": { 29 | "type": "string" 30 | }, 31 | "tiles": { 32 | "type": "array", 33 | "items": { 34 | "type": "string" 35 | } 36 | }, 37 | "grids": { 38 | "type": "array", 39 | "items": { 40 | "type": "string" 41 | } 42 | }, 43 | "data": { 44 | "type": "array", 45 | "items": { 46 | "type": "string" 47 | } 48 | }, 49 | "minzoom": { 50 | "minimum": 0, 51 | "maximum": 30, 52 | "type": "integer" 53 | }, 54 | "maxzoom": { 55 | "minimum": 0, 56 | "maximum": 30, 57 | "type": "integer" 58 | }, 59 | "bounds": { 60 | "type": "array", 61 | "items": { 62 | "type": "number" 63 | } 64 | }, 65 | "center": { 66 | "type": "array", 67 | "items": { 68 | "type": "number" 69 | } 70 | } 71 | }, 72 | "required": ["tilejson", "tiles"] 73 | } 74 | -------------------------------------------------------------------------------- /3.0.0/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TileJSON", 3 | "type": "object", 4 | "properties": { 5 | "tilejson": { 6 | "type": "string", 7 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 8 | }, 9 | "tiles": { 10 | "type": "array", 11 | "items": { 12 | "type": "string" 13 | } 14 | }, 15 | "vector_layers": { 16 | "type": "array", 17 | "items": { 18 | "type": "object", 19 | "properties": { 20 | "id": { 21 | "type": "string" 22 | }, 23 | "fields": { 24 | "type": "object", 25 | "additionalProperties": { "type": "string" } 26 | }, 27 | "description": { 28 | "type": "string" 29 | }, 30 | "maxzoom": { 31 | "type": "integer" 32 | }, 33 | "minzoom": { 34 | "type": "integer" 35 | } 36 | }, 37 | "required": [ "id", "fields" ], 38 | "additionalProperties": true 39 | } 40 | }, 41 | "attribution": { 42 | "type": "string" 43 | }, 44 | "bounds": { 45 | "type": "array", 46 | "items": { 47 | "type": "number" 48 | } 49 | }, 50 | "center": { 51 | "type": "array", 52 | "items": { 53 | "type": "number" 54 | } 55 | }, 56 | "data": { 57 | "type": "array", 58 | "items": { 59 | "type": "string" 60 | } 61 | }, 62 | "description": { 63 | "type": "string" 64 | }, 65 | "fillzoom": { 66 | "minimum": 0, 67 | "maximum": 30, 68 | "type": "integer" 69 | }, 70 | "grids": { 71 | "type": "array", 72 | "items": { 73 | "type": "string" 74 | } 75 | }, 76 | "legend": { 77 | "type": "string" 78 | }, 79 | "maxzoom": { 80 | "minimum": 0, 81 | "maximum": 30, 82 | "type": "integer" 83 | }, 84 | "minzoom": { 85 | "minimum": 0, 86 | "maximum": 30, 87 | "type": "integer" 88 | }, 89 | "name": { 90 | "type": "string" 91 | }, 92 | "scheme": { 93 | "type": "string" 94 | }, 95 | "template": { 96 | "type": "string" 97 | }, 98 | "version": { 99 | "type": "string", 100 | "pattern": "\\d+\\.\\d+\\.\\d+\\w?[\\w\\d]*" 101 | } 102 | }, 103 | "required": ["tilejson", "tiles", "vector_layers"], 104 | "additionalProperties": true 105 | } 106 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Open Standard 2 | 3 | The TileJSON specification is an open standard maintained by [Mapbox](https://www.mapbox.com/about/open/). 4 | 5 | ### Questions and Contributing 6 | 7 | All specification development happens at https://github.com/mapbox/tilejson-spec. For general questions relating to the specification please feel free to create a new [issue](https://github.com/mapbox/tilejson-spec/issues). 8 | 9 | ### Proposing Changes 10 | 11 | - Editorial changes that clarify the specification are encouraged. Edits can be submitted as a pull request against the `master` branch of the latest version of the specification. Review and discussion of the proposed changes will take place on this pull request. Changes may warrant a bump in the `minor` version of the specification. 12 | 13 | - Technical changes to the specification are an important part of the evolution of the standard. Technical changes imply new requirements for tools that create and/or read the format. Therefore a technical change requires the `major` version to be incremented and will be carefully reviewed and considered by implementors of the specification. Technical changes are best discussed in individual [issues](https://github.com/mapbox/tilejson-spec/issues) prior to a change in the specification. Please be concise in any suggestions and read existing issues prior to posting. 14 | 15 | ### Syntax Notes 16 | 17 | Consideration should be taken over the uses of the keywords as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt). The use of these words must be capitalized to stress their meaning through out the specification. 18 | 19 | ### Releasing A New Version 20 | 21 | The following is the suggested way to release a new version of the specification. 22 | 23 | Upon determination that a significant need for a version change is required a pull request to the specification should be opened. The branch from which the pull request originates should be named clearly to note it is a request for a new version of the specification. For example a branch of `v3.0.0-development` would specify the grouping of changes for the `v3.0.0` specification. This pull request should create a new folder for the version of the specification that will be created, in this instance the folder would be named `3.0.0`. Within this folder should be the: 24 | - `schema.json` file for the version 25 | - `README.md` file that is a full update of the specification. Optionally include README translations - `README-{language code}.md` 26 | - `example/` directory with JSON file examples 27 | 28 | The pull request should provide a clear explanation of the intent for the new version of the specification. All associated issues should be linked in the pull request. Suggested changes to the branch of the development version will be accepted in the form of a pull request to that branch. 29 | Once all issues with the pull request have been addressed the pull request may be merged into the master branch. 30 | 31 | Update the `CHANGELOG.md` with the date of release of the official specification in a new commit to the `master` branch. Once this is done, create an official tag of the release on github. 32 | 33 | ``` 34 | git tag -a v2.0.0 -m "v2.0.0" 35 | git push --tags 36 | ``` 37 | 38 | ### Authors 39 | 40 | If you make a change and wish to be added to the list of authors please add yourself to the README.md. (Note: It is alphabetical by last name). 41 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # TileJSON Specification Code of Conduct 2 | 3 | ### Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in https://github.com/mapbox/tilejson-spec and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, 7 | religion, or sexual identity and orientation. 8 | 9 | ### Our Standards 10 | 11 | Examples of behavior that contributes to creating a positive environment 12 | include: 13 | 14 | * Using welcoming and inclusive language 15 | * Being respectful of differing viewpoints and experiences 16 | * Gracefully accepting constructive criticism 17 | * Focusing on what is best for the community 18 | * Showing empathy towards other community members 19 | * Respecting people’s time and health being their priority 20 | 21 | Examples of unacceptable behavior by participants include: 22 | 23 | * The use of sexualized language or imagery and unwelcome sexual attention or 24 | advances 25 | * Trolling, insulting/derogatory comments, and personal or political attacks 26 | * Public or private harassment 27 | * Publishing others' private information, such as a physical or electronic 28 | address, without explicit permission 29 | * Other conduct which could reasonably be considered inappropriate in a 30 | professional setting 31 | 32 | ### Our Responsibilities 33 | 34 | TileJSON spec maintainers are responsible for clarifying the standards of acceptable 35 | behavior and are expected to take appropriate and fair corrective action in 36 | response to any instances of unacceptable behavior. 37 | 38 | TileJSON spec maintainers have the right and responsibility to remove, edit, or 39 | reject comments, commits, code, wiki edits, issues, and other contributions 40 | that are not aligned to this Code of Conduct, or to ban temporarily or 41 | permanently any contributor for other behaviors that they deem inappropriate, 42 | threatening, offensive, or harmful. 43 | 44 | ### Scope 45 | 46 | This Code of Conduct applies both within project spaces and in public spaces 47 | when an individual is representing the project or its community. This includes the repository, its Pull Requests and Issue tracker. Examples of 48 | representing a project or community include using an official project e-mail 49 | address, posting via an official social media account, or acting as an appointed 50 | representative at an online or offline event. Representation of a project may be 51 | further defined and clarified by project maintainers. 52 | 53 | ### Enforcement 54 | 55 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 56 | reported by contacting anyone from the project team: 57 | - @mapsam, sam@mapbox.com 58 | - @gretacb, carol@mapbox.com 59 | 60 | All complaints will be reviewed and investigated and will result in a response that 61 | is deemed necessary and appropriate to the circumstances. The project team is 62 | obligated to maintain confidentiality with regard to the reporter of an incident. 63 | Further details of specific enforcement policies may be posted separately. 64 | 65 | Project maintainers who do not follow or enforce the Code of Conduct in good 66 | faith may face temporary or permanent repercussions as determined by other 67 | members of the project's leadership. 68 | 69 | ### Attribution 70 | 71 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 72 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 73 | 74 | [homepage]: https://www.contributor-covenant.org -------------------------------------------------------------------------------- /2.1.0/README-zh.md: -------------------------------------------------------------------------------- 1 | # TileJSON 2.1.0 2 | 3 | 本文档中的“**必须**”、“**必须不**”、“**必备**”、"**应该**"、“**不应该**”、“**建议**”、“**可以**”、“**可选**”的含义参照[RFC 2119](https://www.ietf.org/rfc/rfc2119.txt)。 4 | 5 | ## 1. 目的 6 | 7 | 本规范提出一种技术标准,来描述多种类型的网络地图图层的元数据信息,以方便客户端进行配置和浏览。 8 | 9 | 10 | ## 2. 文件格式 11 | 12 | TileJSON描述文件采用JSON格式,参见RFC 4627。 13 | 14 | 15 | 本规范的实现**必须**忽略掉未知key。但是,实现**必须**在他们的API中暴露出 16 | 这些未知的key/values,使得API用户可以选择性地处理这些keys。 17 | 实现**必须**忽略keys的无效values。如果key是必选的,实现**必须**认为整个 18 | TileJSON描述文件无效并且拒绝进一步处理。 19 | 20 | 21 | ```javascript 22 | { 23 | // **必选**。表示语义化的版本号。描述本JSON对象所遵守的TileJSON版本。 24 | "tilejson": "2.1.0", 25 | 26 | // **可选**。默认值:null。表示瓦片集的名称。名称可以是任何合法字符。 27 | // 实现**不应该**将此名称当做HTML来解析。 28 | "name": "compositing", 29 | 30 | // **可选**。默认值:null。表示瓦片集的描述信息。描述可以是任何合法字符。 31 | // 实现**不应该**将此描述当做HTML来解析。 32 | "description": "A simple, light grey world.", 33 | 34 | // **可选**。默认值:"1.0.0"。表示语义化的版本号。当瓦片发生更改时,次版本号 35 | // **必须**相应地更改。这可能导致标签的变化。因此,实现方能够在次版本号变化时 36 | // 清除缓存。更新级别的更改,**必须**限制在单块瓦片之内。 37 | // 当瓦片更改较大时,主版本号**必须**增加。 38 | // 实现**必须不**要使用不同主版本号的瓦片。 39 | "version": "1.0.0", 40 | 41 | // **可选**。默认值:null。包含地图的所有者信息。 42 | // 实现**可以**把这部分内容当做HTML或者纯文本。 43 | // 处于安全方面的原因,要绝对确保本字段的不会被用来进行XSS攻击或beacon跟踪。 44 | "attribution": "OSM contributors", 45 | 46 | // **可选**。默认值:null。包含一个mustache模板,用来格式化grids数据来完成交互。 47 | // 参见https://github.com/mapbox/utfgrid-spec/tree/master/1.2的交互部分。 48 | "template": "{{#__teaser__}}{{NAME}}{{/__teaser__}}", 49 | 50 | // **可选**。默认值:null。包含地图图例信息。 51 | // 实现**可以**把这部分内容当做HTML或者纯文本。 52 | // 处于安全方面的原因,要绝对确保本字段的不会被用来进行XSS攻击或beacon跟踪。 53 | "legend": "Dangerous zones are red, safe zones are green", 54 | 、 55 | // **可选**。默认值:"xyz"。可以是"xyz"或"tms"。主要影响瓦片坐标的y轴方向。 56 | // 默认为global-mercator(Spherical Mercator)坐标系。 57 | "scheme": "xyz", 58 | 59 | // **必选**。表示一组瓦片资源。 60 | // 如果存在{z}、{x}和{y},它们将会被相应的整数替换。 61 | // 如果指定了多个资源,客户端可以使用任意的资源组合。 62 | // 所有的资源**必须**为相同的URL返回相同的内容。 63 | // 本数组**必须**至少包含一个资源。 64 | "tiles": [ 65 | "http://localhost:8888/admin/1.0.0/world-light,broadband/{z}/{x}/{y}.png" 66 | ], 67 | 68 | // **可选**。默认值:[]。表示一组交互资源。 69 | // 如果存在{z}、{x}和{y},它们将会被相应的整数替换。 70 | // 如果指定了多个资源,客户端可以使用任意的资源组合。 71 | // 所有的资源**必须**为相同的URL返回相同的内容。 72 | // 如果本数组没有任何内容,那么说明本瓦片集不支持交互数据。 73 | // 参见https://github.com/mapbox/utfgrid-spec/tree/master/1.2的交互部分 74 | "grids": [ 75 | "http://localhost:8888/admin/1.0.0/broadband/{z}/{x}/{y}.grid.json" 76 | ], 77 | 78 | // **可选**。默认值:[]。表示一组GeoJSON格式的数据文件。 79 | // 如果存在{z}、{x}和{y},它们将会被相应的整数替换。 80 | // 如果指定了多个资源,客户端可以使用任意的资源组合。 81 | // 所有的资源**必须**为相同的URL返回相同的内容。 82 | // 如果本数组没有任何内容,那么地图上不会呈现数据内容。 83 | "data": [ 84 | "http://localhost:8888/admin/data.geojson" 85 | ], 86 | 87 | // **可选**。默认值:0。值域范围[0, 22]。 88 | // 表示最小缩放级别的一个整数。 89 | "minzoom": 0, 90 | 91 | // **可选**。默认值:22。值域范围[0, 22]。 92 | // 表示最大缩放级别的一个整数。**必须**大于等于minzoom 93 | "maxzoom": 11, 94 | 95 | // 表示地图瓦片的最大范围。这个范围**必须**覆盖到所有的缩放级别。 96 | // 范围用WGS84坐标系下的经纬度来表示,顺序为左、下、右、上。 97 | // 范围值可能是整数或者浮点数。 98 | "bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ], 99 | 100 | // **可选**。默认值:null。 101 | // 第一个值是经度,第二个是纬度(都为WGS84坐标系),第三个是表示缩放级别的整数。 102 | // 经度和纬度**必须**在bounds范围内。缩放级别**必须**在minzoom和maxzoom之间。 103 | // 实现可以根据这个值设置地图的默认显示位置。 104 | // 如果这个值为null,实现可以根据自己的算法自行决定默认位置。 105 | "center": [ -76.275329586789, 39.153492567373, 8 ] 106 | } 107 | ``` 108 | 109 | 110 | ## 3. 缓存 111 | 112 | 客户端**可以**缓存从远程服务器获取的文件。当实现决定采用缓存措施时,**必须** 113 | 遵从为瓦片数据和TileJSON描述文件定义的有效HTTP缓存控制头。 114 | -------------------------------------------------------------------------------- /2.2.0/README-zh.md: -------------------------------------------------------------------------------- 1 | # TileJSON 2.2.0 2 | 3 | 本文档中的“**必须**”、“**必须不**”、“**必备**”、"**应该**"、“**不应该**”、“**建议**”、“**可以**”、“**可选**”的含义参照[RFC 2119](https://www.ietf.org/rfc/rfc2119.txt)。 4 | 5 | ## 1. 目的 6 | 7 | 本规范提出一种技术标准,来描述多种类型的网络地图图层的元数据信息,以方便客户端进行配置和浏览。 8 | 9 | 10 | ## 2. 文件格式 11 | 12 | TileJSON描述文件采用JSON格式,参见RFC 4627。 13 | 14 | 15 | 本规范的实现**必须**忽略掉未知key。但是,实现**必须**在他们的API中暴露出 16 | 这些未知的key/values,使得API用户可以选择性地处理这些keys。 17 | 实现**必须**忽略keys的无效values。如果key是必选的,实现**必须**认为整个 18 | TileJSON描述文件无效并且拒绝进一步处理。 19 | 20 | 21 | ```javascript 22 | { 23 | // **必选**。表示语义化的版本号。描述本JSON对象所遵守的TileJSON版本。 24 | "tilejson": "2.1.0", 25 | 26 | // **可选**。默认值:null。表示瓦片集的名称。名称可以是任何合法字符。 27 | // 实现**不应该**将此名称当做HTML来解析。 28 | "name": "compositing", 29 | 30 | // **可选**。默认值:null。表示瓦片集的描述信息。描述可以是任何合法字符。 31 | // 实现**不应该**将此描述当做HTML来解析。 32 | "description": "A simple, light grey world.", 33 | 34 | // **可选**。默认值:"1.0.0"。表示语义化的版本号。当瓦片发生更改时,次版本号 35 | // **必须**相应地更改。这可能导致标签的变化。因此,实现方能够在次版本号变化时 36 | // 清除缓存。更新级别的更改,**必须**限制在单块瓦片之内。 37 | // 当瓦片更改较大时,主版本号**必须**增加。 38 | // 实现**必须不**要使用不同主版本号的瓦片。 39 | "version": "1.0.0", 40 | 41 | // **可选**。默认值:null。包含地图的所有者信息。 42 | // 实现**可以**把这部分内容当做HTML或者纯文本。 43 | // 处于安全方面的原因,要绝对确保本字段的不会被用来进行XSS攻击或beacon跟踪。 44 | "attribution": "OSM contributors", 45 | 46 | // **可选**。默认值:null。包含一个mustache模板,用来格式化grids数据来完成交互。 47 | // 参见https://github.com/mapbox/utfgrid-spec/tree/master/1.2的交互部分。 48 | "template": "{{#__teaser__}}{{NAME}}{{/__teaser__}}", 49 | 50 | // **可选**。默认值:null。包含地图图例信息。 51 | // 实现**可以**把这部分内容当做HTML或者纯文本。 52 | // 处于安全方面的原因,要绝对确保本字段的不会被用来进行XSS攻击或beacon跟踪。 53 | "legend": "Dangerous zones are red, safe zones are green", 54 | 、 55 | // **可选**。默认值:"xyz"。可以是"xyz"或"tms"。主要影响瓦片坐标的y轴方向。 56 | // 默认为global-mercator(Spherical Mercator)坐标系。 57 | "scheme": "xyz", 58 | 59 | // **必选**。表示一组瓦片资源。 60 | // 如果存在{z}、{x}和{y},它们将会被相应的整数替换。 61 | // 如果指定了多个资源,客户端可以使用任意的资源组合。 62 | // 所有的资源**必须**为相同的URL返回相同的内容。 63 | // 本数组**必须**至少包含一个资源。 64 | "tiles": [ 65 | "http://localhost:8888/admin/1.0.0/world-light,broadband/{z}/{x}/{y}.png" 66 | ], 67 | 68 | // **可选**。默认值:[]。表示一组交互资源。 69 | // 如果存在{z}、{x}和{y},它们将会被相应的整数替换。 70 | // 如果指定了多个资源,客户端可以使用任意的资源组合。 71 | // 所有的资源**必须**为相同的URL返回相同的内容。 72 | // 如果本数组没有任何内容,那么说明本瓦片集不支持交互数据。 73 | // 参见https://github.com/mapbox/utfgrid-spec/tree/master/1.2的交互部分 74 | "grids": [ 75 | "http://localhost:8888/admin/1.0.0/broadband/{z}/{x}/{y}.grid.json" 76 | ], 77 | 78 | // **可选**。默认值:[]。表示一组GeoJSON格式的数据文件。 79 | // 如果存在{z}、{x}和{y},它们将会被相应的整数替换。 80 | // 如果指定了多个资源,客户端可以使用任意的资源组合。 81 | // 所有的资源**必须**为相同的URL返回相同的内容。 82 | // 如果本数组没有任何内容,那么地图上不会呈现数据内容。 83 | "data": [ 84 | "http://localhost:8888/admin/data.geojson" 85 | ], 86 | 87 | // **可选**。默认值:0。值域范围[0, 30]。 88 | // 表示最小缩放级别的一个整数。 89 | "minzoom": 0, 90 | 91 | // **可选**。默认值:30。值域范围[0, 30]。 92 | // 表示最大缩放级别的一个整数。**必须**大于等于minzoom 93 | "maxzoom": 11, 94 | 95 | // 表示地图瓦片的最大范围。这个范围**必须**覆盖到所有的缩放级别。 96 | // 范围用WGS84坐标系下的经纬度来表示,顺序为左、下、右、上。 97 | // 范围值可能是整数或者浮点数。 98 | "bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ], 99 | 100 | // **可选**。默认值:null。 101 | // 第一个值是经度,第二个是纬度(都为WGS84坐标系),第三个是表示缩放级别的整数。 102 | // 经度和纬度**必须**在bounds范围内。缩放级别**必须**在minzoom和maxzoom之间。 103 | // 实现可以根据这个值设置地图的默认显示位置。 104 | // 如果这个值为null,实现可以根据自己的算法自行决定默认位置。 105 | "center": [ -76.275329586789, 39.153492567373, 8 ] 106 | } 107 | ``` 108 | 109 | 110 | ## 3. 缓存 111 | 112 | 客户端**可以**缓存从远程服务器获取的文件。当实现决定采用缓存措施时,**必须** 113 | 遵从为瓦片数据和TileJSON描述文件定义的有效HTTP缓存控制头。 114 | -------------------------------------------------------------------------------- /1.0.0/README.md: -------------------------------------------------------------------------------- 1 | # TileJSON 1.0.0 2 | 3 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119. 4 | 5 | ## 1. Purpose 6 | 7 | This specification attempts to create a standard for representing metadata about multiple types of web-based layers, to aid clients in configuration and browsing. 8 | 9 | ## 2. File format 10 | 11 | TileJSON manifest files use the JSON format as described in RFC 4627. 12 | 13 | Implementations MUST treat unknown keys as if they weren't present. However, implementations MUST expose unknown key/values in their API so that API users can optionally handle these keys. Implementations MUST treat invalid values for keys as if they weren't present. If the key is required, implementations MUST treat the entire TileJSON manifest file as invalid and refuse operation. 14 | 15 | 16 | ```javascript 17 | { 18 | // REQUIRED. A semver.org style version number. Describes the version of 19 | // the TileJSON spec that is implemented by this JSON object. 20 | "tilejson": "1.0.0", 21 | 22 | // OPTIONAL. Default: null. A name describing the tileset. The name can 23 | // contain any legal character. Implementations SHOULD NOT interpret the 24 | // name as HTML. 25 | "name": "compositing", 26 | 27 | // OPTIONAL. Default: null. A text description of the tileset. The 28 | // description can contain any legal character. Implementations SHOULD NOT 29 | // interpret the description as HTML. 30 | "description": "A simple, light grey world.", 31 | 32 | // OPTIONAL. Default: "1.0.0". A semver.org style version number. When 33 | // changes across tiles are introduced, the minor version MUST change. 34 | // This may lead to cut off labels. Therefore, implementors can decide to 35 | // clean their cache when the minor version changes. Changes to the patch 36 | // level MUST only have changes to tiles that are contained within one tile. 37 | // When tiles change significantly, the major version MUST be increased. 38 | // Implementations MUST NOT use tiles with different major versions. 39 | "version": "1.0.0", 40 | 41 | // OPTIONAL. Default: null. Contains an attribution to be displayed 42 | // when the map is shown to a user. Implementations MAY decide to treat this 43 | // as HTML or literal text. For security reasons, make absolutely sure that 44 | // this field can't be abused as a vector for XSS or beacon tracking. 45 | "attribution": "OSM contributors", 46 | 47 | // OPTIONAL. Default: null. Contains a javascript function to be used to 48 | // format data from grids for interaction. 49 | // See https://github.com/mapbox/mbtiles-spec/blob/master/1.1/interaction.md 50 | // for the interactivity specification. 51 | "formatter": "function(options, data) { return data.NAME; }", 52 | 53 | // OPTIONAL. Default: null. Contains a legend to be displayed with the map. 54 | // Implementations MAY decide to treat this as HTML or literal text. 55 | // For security reasons, make absolutely sure that this field can't be 56 | // abused as a vector for XSS or beacon tracking. 57 | "legend": "Dangerous zones are red, safe zones are green", 58 | 59 | // OPTIONAL. Default: "xyz". Either "xyz" or "tms". Influences the y 60 | // direction of the tile coordinates. 61 | // The global-mercator (aka Spherical Mercator) profile is assumed. 62 | "scheme": "xyz", 63 | 64 | // REQUIRED. An array of tile endpoints. {z}, {x} and {y} are replaced with 65 | // the corresponding integers. If multiple endpoints are specified, clients 66 | // may use any combination of endpoints. All endpoints MUST return the same 67 | // content for the same URL. The array MUST contain at least one endpoint. 68 | "tiles": [ 69 | "http://localhost:8888/admin/1.0.0/world-light,broadband/{z}/{x}/{y}.png" 70 | ], 71 | 72 | // OPTIONAL. Default: []. An array of interactivity endpoints. {z}, {x} 73 | // and {y} are replaced with the corresponding integers. If multiple 74 | // endpoints are specified, clients may use any combination of endpoints. 75 | // All endpoints MUST return the same content for the same URL. 76 | // If the array doesn't contain any entries, interactivity is not supported 77 | // for this tileset. 78 | // See https://github.com/mapbox/mbtiles-spec/blob/master/1.1/interaction.md 79 | // for the interactivity specification. 80 | "grids": [ 81 | "http://localhost:8888/admin/1.0.0/broadband/{z}/{x}/{y}.grid.json" 82 | ], 83 | 84 | // OPTIONAL. Default: 0. >= 0, <= 22. 85 | // An integer specifying the minimum zoom level. 86 | "minzoom": 0, 87 | 88 | // OPTIONAL. Default: 22. >= 0, <= 22. 89 | // An integer specifying the maximum zoom level. MUST be >= minzoom. 90 | "maxzoom": 11, 91 | 92 | // OPTIONAL. Default: [-180, -90, 180, 90]. 93 | // The maximum extent of available map tiles. Bounds MUST define an area 94 | // covered by all zoom levels. The bounds are represented in WGS:84 95 | // latitude and longitude values, in the order left, bottom, right, top. 96 | // Values may be integers or floating point numbers. 97 | "bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ], 98 | 99 | // OPTIONAL. Default: null. 100 | // The first value is the longitude, the second is latitude (both in 101 | // WGS:84 values), the third value is the zoom level as an integer. 102 | // Longitude and latitude MUST be within the specified bounds. 103 | // The zoom level MUST be between minzoom and maxzoom. 104 | // Implementations can use this value to set the default location. If the 105 | // value is null, implementations may use their own algorithm for 106 | // determining a default location. 107 | "center": [ -76.275329586789, 39.153492567373, 8 ] 108 | } 109 | ``` 110 | 111 | 112 | ## 3. Caching 113 | 114 | Clients MAY cache files retrieved from a remote server. When implementations decide to perform caching, they MUST honor valid cache control HTTP headers as defined in the HTTP specification for both tile images and the TileJSON manifest file. 115 | -------------------------------------------------------------------------------- /2.0.0/README.md: -------------------------------------------------------------------------------- 1 | # TileJSON 2.0.0 2 | 3 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 4 | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in 5 | this document are to be interpreted as described in RFC 2119. 6 | 7 | ## 1. Purpose 8 | 9 | This specification attempts to create a standard for representing 10 | metadata about multiple types of web-based layers, to aid clients 11 | in configuration and browsing. 12 | 13 | ## 2. File format 14 | 15 | TileJSON manifest files use the JSON format as described in RFC 4627. 16 | 17 | Implementations MUST treat unknown keys as if they weren't present. 18 | However, implementations MUST expose unknown key/values in their API 19 | so that API users can optionally handle these keys. Implementations MUST 20 | treat invalid values for keys as if they weren't present. If the key is 21 | required, implementations MUST treat the entire TileJSON manifest file 22 | as invalid and refuse operation. 23 | 24 | 25 | ```javascript 26 | { 27 | // REQUIRED. A semver.org style version number. Describes the version of 28 | // the TileJSON spec that is implemented by this JSON object. 29 | "tilejson": "2.0.0", 30 | 31 | // OPTIONAL. Default: null. A name describing the tileset. The name can 32 | // contain any legal character. Implementations SHOULD NOT interpret the 33 | // name as HTML. 34 | "name": "compositing", 35 | 36 | // OPTIONAL. Default: null. A text description of the tileset. The 37 | // description can contain any legal character. Implementations SHOULD NOT 38 | // interpret the description as HTML. 39 | "description": "A simple, light grey world.", 40 | 41 | // OPTIONAL. Default: "1.0.0". A semver.org style version number. When 42 | // changes across tiles are introduced, the minor version MUST change. 43 | // This may lead to cut off labels. Therefore, implementors can decide to 44 | // clean their cache when the minor version changes. Changes to the patch 45 | // level MUST only have changes to tiles that are contained within one tile. 46 | // When tiles change significantly, the major version MUST be increased. 47 | // Implementations MUST NOT use tiles with different major versions. 48 | "version": "1.0.0", 49 | 50 | // OPTIONAL. Default: null. Contains an attribution to be displayed 51 | // when the map is shown to a user. Implementations MAY decide to treat this 52 | // as HTML or literal text. For security reasons, make absolutely sure that 53 | // this field can't be abused as a vector for XSS or beacon tracking. 54 | "attribution": "OSM contributors", 55 | 56 | // OPTIONAL. Default: null. Contains a mustache template to be used to 57 | // format data from grids for interaction. 58 | // See https://github.com/mapbox/utfgrid-spec/tree/master/1.2 59 | // for the interactivity specification. 60 | "template": "{{#__teaser__}}{{NAME}}{{/__teaser__}}", 61 | 62 | // OPTIONAL. Default: null. Contains a legend to be displayed with the map. 63 | // Implementations MAY decide to treat this as HTML or literal text. 64 | // For security reasons, make absolutely sure that this field can't be 65 | // abused as a vector for XSS or beacon tracking. 66 | "legend": "Dangerous zones are red, safe zones are green", 67 | 68 | // OPTIONAL. Default: "xyz". Either "xyz" or "tms". Influences the y 69 | // direction of the tile coordinates. 70 | // The global-mercator (aka Spherical Mercator) profile is assumed. 71 | "scheme": "xyz", 72 | 73 | // REQUIRED. An array of tile endpoints. {z}, {x} and {y} are replaced with 74 | // the corresponding integers. If multiple endpoints are specified, clients 75 | // may use any combination of endpoints. All endpoints MUST return the same 76 | // content for the same URL. The array MUST contain at least one endpoint. 77 | "tiles": [ 78 | "http://localhost:8888/admin/1.0.0/world-light,broadband/{z}/{x}/{y}.png" 79 | ], 80 | 81 | // OPTIONAL. Default: []. An array of interactivity endpoints. {z}, {x} 82 | // and {y} are replaced with the corresponding integers. If multiple 83 | // endpoints are specified, clients may use any combination of endpoints. 84 | // All endpoints MUST return the same content for the same URL. 85 | // If the array doesn't contain any entries, interactivity is not supported 86 | // for this tileset. 87 | // See https://github.com/mapbox/utfgrid-spec/tree/master/1.2 88 | // for the interactivity specification. 89 | "grids": [ 90 | "http://localhost:8888/admin/1.0.0/broadband/{z}/{x}/{y}.grid.json" 91 | ], 92 | 93 | // OPTIONAL. Default: 0. >= 0, <= 22. 94 | // An integer specifying the minimum zoom level. 95 | "minzoom": 0, 96 | 97 | // OPTIONAL. Default: 22. >= 0, <= 22. 98 | // An integer specifying the maximum zoom level. MUST be >= minzoom. 99 | "maxzoom": 11, 100 | 101 | // OPTIONAL. Default: [-180, -90, 180, 90]. 102 | // The maximum extent of available map tiles. Bounds MUST define an area 103 | // covered by all zoom levels. The bounds are represented in WGS:84 104 | // latitude and longitude values, in the order left, bottom, right, top. 105 | // Values may be integers or floating point numbers. 106 | "bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ], 107 | 108 | // OPTIONAL. Default: null. 109 | // The first value is the longitude, the second is latitude (both in 110 | // WGS:84 values), the third value is the zoom level as an integer. 111 | // Longitude and latitude MUST be within the specified bounds. 112 | // The zoom level MUST be between minzoom and maxzoom. 113 | // Implementations can use this value to set the default location. If the 114 | // value is null, implementations may use their own algorithm for 115 | // determining a default location. 116 | "center": [ -76.275329586789, 39.153492567373, 8 ] 117 | } 118 | ``` 119 | 120 | 121 | ## 3. Caching 122 | 123 | Clients MAY cache files retrieved from a remote server. 124 | When implementations decide to perform caching, they MUST honor valid 125 | cache control HTTP headers as defined in the HTTP specification for both 126 | tile images and the TileJSON manifest file. 127 | -------------------------------------------------------------------------------- /2.0.1/README.md: -------------------------------------------------------------------------------- 1 | # TileJSON 2.0.1 2 | 3 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 4 | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in 5 | this document are to be interpreted as described in RFC 2119. 6 | 7 | ## 1. Purpose 8 | 9 | This specification attempts to create a standard for representing 10 | metadata about multiple types of web-based layers, to aid clients 11 | in configuration and browsing. 12 | 13 | ## 2. File format 14 | 15 | TileJSON manifest files use the JSON format as described in RFC 4627. 16 | 17 | Implementations MUST treat unknown keys as if they weren't present. 18 | However, implementations MUST expose unknown key/values in their API 19 | so that API users can optionally handle these keys. Implementations MUST 20 | treat invalid values for keys as if they weren't present. If the key is 21 | required, implementations MUST treat the entire TileJSON manifest file 22 | as invalid and refuse operation. 23 | 24 | 25 | ```javascript 26 | { 27 | // REQUIRED. A semver.org style version number. Describes the version of 28 | // the TileJSON spec that is implemented by this JSON object. 29 | "tilejson": "2.0.1", 30 | 31 | // OPTIONAL. Default: null. A name describing the tileset. The name can 32 | // contain any legal character. Implementations SHOULD NOT interpret the 33 | // name as HTML. 34 | "name": "compositing", 35 | 36 | // OPTIONAL. Default: null. A text description of the tileset. The 37 | // description can contain any legal character. Implementations SHOULD NOT 38 | // interpret the description as HTML. 39 | "description": "A simple, light grey world.", 40 | 41 | // OPTIONAL. Default: "1.0.0". A semver.org style version number. When 42 | // changes across tiles are introduced, the minor version MUST change. 43 | // This may lead to cut off labels. Therefore, implementors can decide to 44 | // clean their cache when the minor version changes. Changes to the patch 45 | // level MUST only have changes to tiles that are contained within one tile. 46 | // When tiles change significantly, the major version MUST be increased. 47 | // Implementations MUST NOT use tiles with different major versions. 48 | "version": "1.0.0", 49 | 50 | // OPTIONAL. Default: null. Contains an attribution to be displayed 51 | // when the map is shown to a user. Implementations MAY decide to treat this 52 | // as HTML or literal text. For security reasons, make absolutely sure that 53 | // this field can't be abused as a vector for XSS or beacon tracking. 54 | "attribution": "OSM contributors", 55 | 56 | // OPTIONAL. Default: null. Contains a mustache template to be used to 57 | // format data from grids for interaction. 58 | // See https://github.com/mapbox/utfgrid-spec/tree/master/1.2 59 | // for the interactivity specification. 60 | "template": "{{#__teaser__}}{{NAME}}{{/__teaser__}}", 61 | 62 | // OPTIONAL. Default: null. Contains a legend to be displayed with the map. 63 | // Implementations MAY decide to treat this as HTML or literal text. 64 | // For security reasons, make absolutely sure that this field can't be 65 | // abused as a vector for XSS or beacon tracking. 66 | "legend": "Dangerous zones are red, safe zones are green", 67 | 68 | // OPTIONAL. Default: "xyz". Either "xyz" or "tms". Influences the y 69 | // direction of the tile coordinates. 70 | // The global-mercator (aka Spherical Mercator) profile is assumed. 71 | "scheme": "xyz", 72 | 73 | // REQUIRED. An array of tile endpoints. {z}, {x} and {y} are replaced with 74 | // the corresponding integers. If multiple endpoints are specified, clients 75 | // may use any combination of endpoints. All endpoints MUST return the same 76 | // content for the same URL. The array MUST contain at least one endpoint. 77 | "tiles": [ 78 | "http://localhost:8888/admin/1.0.0/world-light,broadband/{z}/{x}/{y}.png" 79 | ], 80 | 81 | // OPTIONAL. Default: []. An array of interactivity endpoints. {z}, {x} 82 | // and {y} are replaced with the corresponding integers. If multiple 83 | // endpoints are specified, clients may use any combination of endpoints. 84 | // All endpoints MUST return the same content for the same URL. 85 | // If the array doesn't contain any entries, interactivity is not supported 86 | // for this tileset. 87 | // See https://github.com/mapbox/utfgrid-spec/tree/master/1.2 88 | // for the interactivity specification. 89 | "grids": [ 90 | "http://localhost:8888/admin/1.0.0/broadband/{z}/{x}/{y}.grid.json" 91 | ], 92 | 93 | // OPTIONAL. Default: 0. >= 0, <= 22. 94 | // An integer specifying the minimum zoom level. 95 | "minzoom": 0, 96 | 97 | // OPTIONAL. Default: 22. >= 0, <= 22. 98 | // An integer specifying the maximum zoom level. MUST be >= minzoom. 99 | "maxzoom": 11, 100 | 101 | // OPTIONAL. Default: 4 102 | // The pixel resolution of grids, if available, in px/grid square 103 | "resolution": 4, 104 | 105 | // OPTIONAL. Default: [-180, -90, 180, 90]. 106 | // The maximum extent of available map tiles. Bounds MUST define an area 107 | // covered by all zoom levels. The bounds are represented in WGS:84 108 | // latitude and longitude values, in the order left, bottom, right, top. 109 | // Values may be integers or floating point numbers. 110 | "bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ], 111 | 112 | // OPTIONAL. Default: null. 113 | // The first value is the longitude, the second is latitude (both in 114 | // WGS:84 values), the third value is the zoom level as an integer. 115 | // Longitude and latitude MUST be within the specified bounds. 116 | // The zoom level MUST be between minzoom and maxzoom. 117 | // Implementations can use this value to set the default location. If the 118 | // value is null, implementations may use their own algorithm for 119 | // determining a default location. 120 | "center": [ -76.275329586789, 39.153492567373, 8 ] 121 | } 122 | ``` 123 | 124 | 125 | ## 3. Caching 126 | 127 | Clients MAY cache files retrieved from a remote server. 128 | When implementations decide to perform caching, they MUST honor valid 129 | cache control HTTP headers as defined in the HTTP specification for both 130 | tile images and the TileJSON manifest file. 131 | -------------------------------------------------------------------------------- /2.1.0/README.md: -------------------------------------------------------------------------------- 1 | # TileJSON 2.1.0 2 | 3 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 4 | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in 5 | this document are to be interpreted as described in RFC 2119. 6 | 7 | ## 1. Purpose 8 | 9 | This specification attempts to create a standard for representing 10 | metadata about multiple types of web-based layers, to aid clients 11 | in configuration and browsing. 12 | 13 | ## 2. File format 14 | 15 | TileJSON manifest files use the JSON format as described in RFC 4627. 16 | 17 | Implementations MUST treat unknown keys as if they weren't present. 18 | However, implementations MUST expose unknown key/values in their API 19 | so that API users can optionally handle these keys. Implementations MUST 20 | treat invalid values for keys as if they weren't present. If the key is 21 | required, implementations MUST treat the entire TileJSON manifest file 22 | as invalid and refuse operation. 23 | 24 | 25 | ```javascript 26 | { 27 | // REQUIRED. A semver.org style version number. Describes the version of 28 | // the TileJSON spec that is implemented by this JSON object. 29 | "tilejson": "2.1.0", 30 | 31 | // OPTIONAL. Default: null. A name describing the tileset. The name can 32 | // contain any legal character. Implementations SHOULD NOT interpret the 33 | // name as HTML. 34 | "name": "compositing", 35 | 36 | // OPTIONAL. Default: null. A text description of the tileset. The 37 | // description can contain any legal character. Implementations SHOULD NOT 38 | // interpret the description as HTML. 39 | "description": "A simple, light grey world.", 40 | 41 | // OPTIONAL. Default: "1.0.0". A semver.org style version number. When 42 | // changes across tiles are introduced, the minor version MUST change. 43 | // This may lead to cut off labels. Therefore, implementors can decide to 44 | // clean their cache when the minor version changes. Changes to the patch 45 | // level MUST only have changes to tiles that are contained within one tile. 46 | // When tiles change significantly, the major version MUST be increased. 47 | // Implementations MUST NOT use tiles with different major versions. 48 | "version": "1.0.0", 49 | 50 | // OPTIONAL. Default: null. Contains an attribution to be displayed 51 | // when the map is shown to a user. Implementations MAY decide to treat this 52 | // as HTML or literal text. For security reasons, make absolutely sure that 53 | // this field can't be abused as a vector for XSS or beacon tracking. 54 | "attribution": "OSM contributors", 55 | 56 | // OPTIONAL. Default: null. Contains a mustache template to be used to 57 | // format data from grids for interaction. 58 | // See https://github.com/mapbox/utfgrid-spec/tree/master/1.2 59 | // for the interactivity specification. 60 | "template": "{{#__teaser__}}{{NAME}}{{/__teaser__}}", 61 | 62 | // OPTIONAL. Default: null. Contains a legend to be displayed with the map. 63 | // Implementations MAY decide to treat this as HTML or literal text. 64 | // For security reasons, make absolutely sure that this field can't be 65 | // abused as a vector for XSS or beacon tracking. 66 | "legend": "Dangerous zones are red, safe zones are green", 67 | 68 | // OPTIONAL. Default: "xyz". Either "xyz" or "tms". Influences the y 69 | // direction of the tile coordinates. 70 | // The global-mercator (aka Spherical Mercator) profile is assumed. 71 | "scheme": "xyz", 72 | 73 | // REQUIRED. An array of tile endpoints. {z}, {x} and {y}, if present, 74 | // are replaced with the corresponding integers. If multiple endpoints are specified, clients 75 | // may use any combination of endpoints. All endpoints MUST return the same 76 | // content for the same URL. The array MUST contain at least one endpoint. 77 | "tiles": [ 78 | "http://localhost:8888/admin/1.0.0/world-light,broadband/{z}/{x}/{y}.png" 79 | ], 80 | 81 | // OPTIONAL. Default: []. An array of interactivity endpoints. {z}, {x} 82 | // and {y}, if present, are replaced with the corresponding integers. If multiple 83 | // endpoints are specified, clients may use any combination of endpoints. 84 | // All endpoints MUST return the same content for the same URL. 85 | // If the array doesn't contain any entries, interactivity is not supported 86 | // for this tileset. 87 | // See https://github.com/mapbox/utfgrid-spec/tree/master/1.2 88 | // for the interactivity specification. 89 | "grids": [ 90 | "http://localhost:8888/admin/1.0.0/broadband/{z}/{x}/{y}.grid.json" 91 | ], 92 | 93 | // OPTIONAL. Default: []. An array of data files in GeoJSON format. 94 | // {z}, {x} and {y}, if present, 95 | // are replaced with the corresponding integers. If multiple 96 | // endpoints are specified, clients may use any combination of endpoints. 97 | // All endpoints MUST return the same content for the same URL. 98 | // If the array doesn't contain any entries, then no data is present in 99 | // the map. 100 | "data": [ 101 | "http://localhost:8888/admin/data.geojson" 102 | ], 103 | 104 | // OPTIONAL. Default: 0. >= 0, <= 22. 105 | // An integer specifying the minimum zoom level. 106 | "minzoom": 0, 107 | 108 | // OPTIONAL. Default: 22. >= 0, <= 22. 109 | // An integer specifying the maximum zoom level. MUST be >= minzoom. 110 | "maxzoom": 11, 111 | 112 | // OPTIONAL. Default: [-180, -90, 180, 90]. 113 | // The maximum extent of available map tiles. Bounds MUST define an area 114 | // covered by all zoom levels. The bounds are represented in WGS:84 115 | // latitude and longitude values, in the order left, bottom, right, top. 116 | // Values may be integers or floating point numbers. 117 | "bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ], 118 | 119 | // OPTIONAL. Default: null. 120 | // The first value is the longitude, the second is latitude (both in 121 | // WGS:84 values), the third value is the zoom level as an integer. 122 | // Longitude and latitude MUST be within the specified bounds. 123 | // The zoom level MUST be between minzoom and maxzoom. 124 | // Implementations can use this value to set the default location. If the 125 | // value is null, implementations may use their own algorithm for 126 | // determining a default location. 127 | "center": [ -76.275329586789, 39.153492567373, 8 ] 128 | } 129 | ``` 130 | 131 | 132 | ## 3. Caching 133 | 134 | Clients MAY cache files retrieved from a remote server. 135 | When implementations decide to perform caching, they MUST honor valid 136 | cache control HTTP headers as defined in the HTTP specification for both 137 | tile images and the TileJSON manifest file. 138 | -------------------------------------------------------------------------------- /2.2.0/README.md: -------------------------------------------------------------------------------- 1 | # TileJSON 2.2.0 2 | 3 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 4 | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in 5 | this document are to be interpreted as described in RFC 2119. 6 | 7 | ## 1. Purpose 8 | 9 | This specification attempts to create a standard for representing 10 | metadata about multiple types of web-based layers, to aid clients 11 | in configuration and browsing. 12 | 13 | ## 2. File format 14 | 15 | TileJSON manifest files use the JSON format as described in RFC 4627. 16 | 17 | Implementations MUST treat unknown keys as if they weren't present. 18 | However, implementations MUST expose unknown key/values in their API 19 | so that API users can optionally handle these keys. Implementations MUST 20 | treat invalid values for keys as if they weren't present. If the key is 21 | required, implementations MUST treat the entire TileJSON manifest file 22 | as invalid and refuse operation. 23 | 24 | 25 | ```javascript 26 | { 27 | // REQUIRED. A semver.org style version number. Describes the version of 28 | // the TileJSON spec that is implemented by this JSON object. 29 | "tilejson": "2.2.0", 30 | 31 | // OPTIONAL. Default: null. A name describing the tileset. The name can 32 | // contain any legal character. Implementations SHOULD NOT interpret the 33 | // name as HTML. 34 | "name": "compositing", 35 | 36 | // OPTIONAL. Default: null. A text description of the tileset. The 37 | // description can contain any legal character. Implementations SHOULD NOT 38 | // interpret the description as HTML. 39 | "description": "A simple, light grey world.", 40 | 41 | // OPTIONAL. Default: "1.0.0". A semver.org style version number. When 42 | // changes across tiles are introduced, the minor version MUST change. 43 | // This may lead to cut off labels. Therefore, implementors can decide to 44 | // clean their cache when the minor version changes. Changes to the patch 45 | // level MUST only have changes to tiles that are contained within one tile. 46 | // When tiles change significantly, the major version MUST be increased. 47 | // Implementations MUST NOT use tiles with different major versions. 48 | "version": "1.0.0", 49 | 50 | // OPTIONAL. Default: null. Contains an attribution to be displayed 51 | // when the map is shown to a user. Implementations MAY decide to treat this 52 | // as HTML or literal text. For security reasons, make absolutely sure that 53 | // this field can't be abused as a vector for XSS or beacon tracking. 54 | "attribution": "OSM contributors", 55 | 56 | // OPTIONAL. Default: null. Contains a mustache template to be used to 57 | // format data from grids for interaction. 58 | // See https://github.com/mapbox/utfgrid-spec/tree/master/1.2 59 | // for the interactivity specification. 60 | "template": "{{#__teaser__}}{{NAME}}{{/__teaser__}}", 61 | 62 | // OPTIONAL. Default: null. Contains a legend to be displayed with the map. 63 | // Implementations MAY decide to treat this as HTML or literal text. 64 | // For security reasons, make absolutely sure that this field can't be 65 | // abused as a vector for XSS or beacon tracking. 66 | "legend": "Dangerous zones are red, safe zones are green", 67 | 68 | // OPTIONAL. Default: "xyz". Either "xyz" or "tms". Influences the y 69 | // direction of the tile coordinates. 70 | // The global-mercator (aka Spherical Mercator) profile is assumed. 71 | "scheme": "xyz", 72 | 73 | // REQUIRED. An array of tile endpoints. {z}, {x} and {y}, if present, 74 | // are replaced with the corresponding integers. If multiple endpoints are specified, clients 75 | // may use any combination of endpoints. All endpoints MUST return the same 76 | // content for the same URL. The array MUST contain at least one endpoint. 77 | "tiles": [ 78 | "http://localhost:8888/admin/1.0.0/world-light,broadband/{z}/{x}/{y}.png" 79 | ], 80 | 81 | // OPTIONAL. Default: []. An array of interactivity endpoints. {z}, {x} 82 | // and {y}, if present, are replaced with the corresponding integers. If multiple 83 | // endpoints are specified, clients may use any combination of endpoints. 84 | // All endpoints MUST return the same content for the same URL. 85 | // If the array doesn't contain any entries, interactivity is not supported 86 | // for this tileset. 87 | // See https://github.com/mapbox/utfgrid-spec/tree/master/1.2 88 | // for the interactivity specification. 89 | "grids": [ 90 | "http://localhost:8888/admin/1.0.0/broadband/{z}/{x}/{y}.grid.json" 91 | ], 92 | 93 | // OPTIONAL. Default: []. An array of data files in GeoJSON format. 94 | // {z}, {x} and {y}, if present, 95 | // are replaced with the corresponding integers. If multiple 96 | // endpoints are specified, clients may use any combination of endpoints. 97 | // All endpoints MUST return the same content for the same URL. 98 | // If the array doesn't contain any entries, then no data is present in 99 | // the map. 100 | "data": [ 101 | "http://localhost:8888/admin/data.geojson" 102 | ], 103 | 104 | // OPTIONAL. Default: 0. >= 0, <= 30. 105 | // An integer specifying the minimum zoom level. 106 | "minzoom": 0, 107 | 108 | // OPTIONAL. Default: 30. >= 0, <= 30. 109 | // An integer specifying the maximum zoom level. MUST be >= minzoom. 110 | "maxzoom": 11, 111 | 112 | // OPTIONAL. Default: [-180, -90, 180, 90]. 113 | // The maximum extent of available map tiles. Bounds MUST define an area 114 | // covered by all zoom levels. The bounds are represented in WGS:84 115 | // latitude and longitude values, in the order left, bottom, right, top. 116 | // Values may be integers or floating point numbers. 117 | "bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ], 118 | 119 | // OPTIONAL. Default: null. 120 | // The first value is the longitude, the second is latitude (both in 121 | // WGS:84 values), the third value is the zoom level as an integer. 122 | // Longitude and latitude MUST be within the specified bounds. 123 | // The zoom level MUST be between minzoom and maxzoom. 124 | // Implementations can use this value to set the default location. If the 125 | // value is null, implementations may use their own algorithm for 126 | // determining a default location. 127 | "center": [ -76.275329586789, 39.153492567373, 8 ] 128 | } 129 | ``` 130 | 131 | 132 | ## 3. Caching 133 | 134 | Clients MAY cache files retrieved from a remote server. 135 | When implementations decide to perform caching, they MUST honor valid 136 | cache control HTTP headers as defined in the HTTP specification for both 137 | tile images and the TileJSON manifest file. 138 | -------------------------------------------------------------------------------- /3.0.0/README.md: -------------------------------------------------------------------------------- 1 | # TileJSON 3.0.0 2 | 3 | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119). 4 | 5 | **Table of contents** 6 | 7 | 1. [Purpose](#1-purpose) 8 | 1. [File format](#2-file-format) 9 | 1. [Structure](#3-structure) 10 | 1. [tilejson](#31-tilejson) 11 | 1. [tiles](#32-tiles) 12 | 1. [vector_layers](#33-vector_layers) 13 | 1. [attribution](#34-attribution) 14 | 1. [bounds](#35-bounds) 15 | 1. [center](#36-center) 16 | 1. [data](#37-data) 17 | 1. [description](#38-description) 18 | 1. [fillzoom](#39-fillzoom) 19 | 1. [grids](#310-grids) 20 | 1. [legend](#311-legend) 21 | 1. [maxzoom](#312-maxzoom) 22 | 1. [minzoom](#313-minzoom) 23 | 1. [name](#314-name) 24 | 1. [scheme](#315-scheme) 25 | 1. [template](#316-template) 26 | 1. [version](#317-version) 27 | 1. [Examples](#4-examples) 28 | 1. [Caching](#5-caching) 29 | 30 | # 1. Purpose 31 | 32 | This specification attempts to create a standard for representing metadata about multiple types of web-based map layers, to aid clients in configuration and browsing. 33 | 34 | # 2. File Format 35 | 36 | TileJSON manifest files use the JSON format as described in [RFC 8259](https://tools.ietf.org/html/rfc8259). 37 | 38 | # 3. Structure 39 | 40 | The following describes the structure of a TileJSON object. Implementations MUST treat unknown keys as if they weren't present. However, implementations MUST expose unknown key value pairs so users can optionally handle these keys. Implementations MUST treat invalid values for keys as if they were not present. If the key is optional and the value is invalid, the default value MAY be applied. If the key is required, implementations MUST treat the entire TileJSON manifest file as invalid and refuse operation. 41 | 42 | *The word "implementation" in the following sections refers to services or tools that serve, generate, or validate TileJSON objects.* 43 | 44 | ## 3.1 `tilejson` 45 | 46 | REQUIRED. String. 47 | 48 | A semver.org style version number as a string. Describes the version of the TileJSON spec that is implemented by this JSON object. 49 | 50 | ```JSON 51 | { 52 | "tilejson": "3.0.0" 53 | } 54 | ``` 55 | 56 | ## 3.2 `tiles` 57 | 58 | REQUIRED. Array. 59 | 60 | An array of tile endpoints. {z}, {x} and {y}, if present, are replaced with the corresponding integers. If multiple endpoints are specified, clients may use any combination of endpoints. All endpoint urls MUST be absolute. All endpoints MUST return the same content for the same URL. The array MUST contain at least one endpoint. The tile extension is NOT limited to any particular format. Some of the more popular are: mvt, vector.pbf, png, webp, and jpg. 61 | 62 | ```JSON 63 | { 64 | "tiles": [ 65 | "http://localhost:8888/admin/1.0.0/world-light,broadband/{z}/{x}/{y}.mvt" 66 | ] 67 | } 68 | ``` 69 | 70 | ## 3.3 `vector_layers` 71 | 72 | REQUIRED. Array. 73 | 74 | An array of objects. Each object describes one layer of vector tile data. A `vector_layer` object MUST contain the `id` and `fields` keys, and MAY contain the `description`, `minzoom`, or `maxzoom` keys. An implementation MAY include arbitrary keys in the object outside those defined in this specification. 75 | 76 | Note: When describing a set of raster tiles or other tile format that does not have a "layers" concept (i.e. `"format": "jpeg"`), the `vector_layers` key is not required. 77 | 78 | #### 3.3.1 `id` 79 | 80 | REQUIRED. String. 81 | 82 | A string value representing the layer id. For added context, this is referred to as the `name` of the layer in the [Mapbox Vector Tile spec](https://github.com/mapbox/vector-tile-spec/tree/master/2.1#41-layers). 83 | 84 | #### 3.3.2 `fields` 85 | 86 | REQUIRED. Object. 87 | 88 | An object whose keys and values are the names and descriptions of attributes available in this layer. Each value (description) MUST be a string that describes the underlying data. If no fields are present, the `fields` key MUST be an empty object. 89 | 90 | #### 3.3.3 `description` 91 | 92 | OPTIONAL. String. 93 | 94 | A string representing a human-readable description of the entire layer's contents. 95 | 96 | #### 3.3.4 `minzoom` and `maxzoom` 97 | 98 | OPTIONAL. Integer. 99 | 100 | An integer representing the lowest/highest zoom level whose tiles this layer appears in. `minzoom` MUST be greater than or equal to the set of tiles' `minzoom`. `maxzoom` MUST be less than or equal to the set of tiles' `maxzoom`. 101 | 102 | These keys are used to describe the situation where different sets of vector layers appear in different zoom levels of the same set of tiles, for example in a case where a "minor roads" layer is only present at high zoom levels. 103 | 104 | ```JSON 105 | { 106 | "vector_layers": [ 107 | { 108 | "id": "roads", 109 | "description": "Roads and their attributes", 110 | "minzoom": 2, 111 | "maxzoom": 16, 112 | "fields": { 113 | "type": "One of: trunk, primary, secondary", 114 | "lanes": "Number", 115 | "name": "String", 116 | "sidewalks": "Boolean" 117 | } 118 | }, 119 | { 120 | "id": "countries", 121 | "description": "Admin 0 (country) boundaries", 122 | "minzoom": 0, 123 | "maxzoom": 16, 124 | "fields": { 125 | "iso": "ISO 3166-1 Alpha-2 code", 126 | "name": "English name of the country", 127 | "name_ar": "Arabic name of the country" 128 | } 129 | }, 130 | { 131 | "id": "buildings", 132 | "description": "A layer with an empty fields object", 133 | "fields": {} 134 | } 135 | ] 136 | } 137 | ``` 138 | 139 | ## 3.4 `attribution` 140 | 141 | OPTIONAL. String. Default: null. 142 | 143 | Contains an attribution to be displayed when the map is shown to a user. Implementations MAY decide to treat this as HTML or literal text. For security reasons, make absolutely sure that this content can't be abused as a vector for XSS or beacon tracking. 144 | 145 | ```JSON 146 | { 147 | "attribution": "OSM contributors" 148 | } 149 | ``` 150 | 151 | ## 3.5 `bounds` 152 | 153 | OPTIONAL. Array. Default: [ -180, -85.05112877980659, 180, 85.0511287798066 ] (xyz-compliant tile bounds) 154 | 155 | The maximum extent of available map tiles. Bounds MUST define an area covered by all zoom levels. The bounds are represented in WGS 84 latitude and longitude values, in the order left, bottom, right, top. Values may be integers or floating point numbers. The minimum/maximum values for longitude and latitude are -180/180 and -90/90 respectively. Bounds MUST NOT "wrap" around the ante-meridian. If bounds are not present, the default value MAY assume the set of tiles is globally distributed. 156 | 157 | ```JSON 158 | { 159 | "bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ] 160 | } 161 | ``` 162 | 163 | Bounds where longitude values are the same, and latitude values are the same, are considered valid. This case typically represents a single point geometry in the entire tileset. For example: 164 | 165 | ```JSON 166 | { 167 | "bounds": [-122.34, 47.65, -122.34, 47.65] 168 | } 169 | ``` 170 | 171 | ## 3.6 `center` 172 | 173 | OPTIONAL. Array. Default: null. 174 | 175 | The first value is the longitude, the second is latitude (both in WGS:84 values), the third value is the zoom level as an integer. Longitude and latitude MUST be within the specified bounds. The zoom level MUST be between minzoom and maxzoom. Implementations MAY use this center value to set the default location. If the value is null, implementations MAY use their own algorithm for determining a default location. 176 | 177 | ```JSON 178 | { 179 | "center": [ -76.275329586789, 39.153492567373, 8 ] 180 | } 181 | ``` 182 | 183 | ## 3.7 `data` 184 | 185 | OPTIONAL. Array. Default: []. 186 | 187 | An array of data files in GeoJSON format. {z}, {x} and {y}, if present, are replaced with the corresponding integers. If multiple endpoints are specified, clients may use any combination of endpoints. All endpoints MUST return the same content for the same URL. If the array doesn't contain any entries, then no data is present in the map. *This field is for overlaying GeoJSON data on tiled raster maps and is generally [no longer used](https://github.com/mapbox/tilejson-spec/pull/43) for GL-based maps.* 188 | 189 | ```JSON 190 | { 191 | "data": [ 192 | "https://www.example.com/admin/data.geojson" 193 | ] 194 | } 195 | ``` 196 | 197 | ## 3.8 `description` 198 | 199 | OPTIONAL. String. Default: null. 200 | 201 | A text description of the set of tiles. The description can contain any valid unicode character as described by the JSON specification [RFC 8259](https://tools.ietf.org/html/rfc8259). 202 | 203 | ```JSON 204 | { 205 | "description": "Highways, roads, and vehicular tracks derived from OpenStreetMap." 206 | } 207 | ``` 208 | 209 | ## 3.9 `fillzoom` 210 | 211 | OPTIONAL. Integer. Default: null. 212 | 213 | An integer specifying the zoom level from which to generate overzoomed tiles. Implementations MAY generate overzoomed tiles from parent tiles if the requested zoom level does not exist. In most cases, overzoomed tiles are generated from the maximum zoom level of the set of tiles. If fillzoom is specified, the overzoomed tile MAY be generated from the fillzoom level. 214 | 215 | For example, in a set of tiles with maxzoom 10 and _no_ fillzoom specified, a request for a z11 tile will use the z10 parent tiles to generate the new, overzoomed z11 tile. If the same TileJSON object had fillzoom specified at z7, a request for a z11 tile would use the z7 tile instead of z10. 216 | 217 | While TileJSON may specify rules for overzooming tiles, it is ultimately up to the tile serving client or renderer to implement overzooming. 218 | 219 | ```JSON 220 | { 221 | "fillzoom": 7 222 | } 223 | ``` 224 | 225 | ## 3.10 `grids` 226 | 227 | OPTIONAL. Array. Default: []. 228 | 229 | An array of interactivity endpoints. {z}, {x} and {y}, if present, are replaced with the corresponding integers. If multiple endpoints are specified, clients may use any combination of endpoints. All endpoints MUST return the same content for the same URL. If the array doesn't contain any entries, UTF-Grid interactivity is not supported for this set of tiles. See https://github.com/mapbox/utfgrid-spec/tree/master/1.2 for the interactivity specification. 230 | 231 | *Note: UTF-Grid interactivity predates GL-based map rendering and interaction. Map interactivity is now generally defined outside the TileJSON specification and is dependent on the tile rendering library's features.* 232 | 233 | ```JSON 234 | { 235 | "grids": [ 236 | "https://www.example.com/earthsea/1.0.0/{z}/{x}/{y}.grid.json" 237 | ] 238 | } 239 | ``` 240 | 241 | ## 3.11 `legend` 242 | 243 | OPTIONAL. String. Default: null. 244 | 245 | Contains a legend to be displayed with the map. Implementations MAY decide to treat this as HTML or literal text. For security reasons, make absolutely sure that this field can't be abused as a vector for XSS or beacon tracking. 246 | 247 | ```JSON 248 | { 249 | "legend": "Dangerous zones are red, safe zones are green" 250 | } 251 | ``` 252 | 253 | ## 3.12 `maxzoom` 254 | 255 | OPTIONAL. Integer. Default: 30. 256 | 257 | An integer specifying the maximum zoom level. MUST be in range: 0 <= minzoom <= maxzoom <= 30. A client or server MAY request tiles outside the zoom range, but the availability of these tiles is dependent on how the tile server or renderer handles the request (such as overzooming tiles). 258 | 259 | ```JSON 260 | { 261 | "maxzoom": 11 262 | } 263 | ``` 264 | 265 | ## 3.13 `minzoom` 266 | 267 | OPTIONAL. Integer. Default: 0. 268 | 269 | An integer specifying the minimum zoom level. MUST be in range: 0 <= minzoom <= maxzoom <= 30. 270 | 271 | ```JSON 272 | { 273 | "minzoom": 0 274 | } 275 | ``` 276 | 277 | ## 3.14 `name` 278 | 279 | OPTIONAL. String. Default: null. 280 | 281 | A name describing the set of tiles. The name can contain any legal character. Implementations SHOULD NOT interpret the name as HTML. 282 | 283 | ```JSON 284 | { 285 | "name": "Earthsea v2" 286 | } 287 | ``` 288 | 289 | ## 3.15 `scheme` 290 | 291 | OPTIONAL. String. Default: "xyz". 292 | 293 | Either "xyz" or "tms". Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed. 294 | 295 | ```JSON 296 | { 297 | "scheme": "xyz" 298 | } 299 | ``` 300 | 301 | ## 3.16 `template` 302 | 303 | OPTIONAL. String. Default: null. 304 | 305 | Contains a mustache template to be used to format data from grids for interaction. See https://github.com/mapbox/utfgrid-spec/tree/master/1.2 for the interactivity specification. 306 | 307 | ```JSON 308 | { 309 | "template": "{{#__teaser__}}{{NAME}}{{/__teaser__}}" 310 | } 311 | ``` 312 | 313 | ## 3.17 `version` 314 | 315 | OPTIONAL. String. Default: "1.0.0". 316 | 317 | A [semver.org](https://semver.org) style version number of the tiles. When changes across tiles are introduced the minor version MUST change. This may lead to cut off labels. Therefore, implementors can decide to clean their cache when the minor version changes. Changes to the patch level MUST only have changes to tiles that are contained within one tile. When tiles change significantly, such as updating a vector tile layer name, the major version MUST be increased. Implementations MUST NOT use tiles with different major versions. 318 | 319 | ```JSON 320 | { 321 | "version": "1.0.0" 322 | } 323 | ``` 324 | 325 | # 4. Examples 326 | 327 | Examples can be found in the [examples directory](./example). 328 | 329 | # 5. Caching 330 | 331 | Clients MAY cache files retrieved from a remote server. When implementations decide to perform caching, they MUST honor valid cache control HTTP headers as defined in the HTTP specification for both tile images and the TileJSON manifest file. 332 | --------------------------------------------------------------------------------