TileJSON

TileJSON is an open standard for representing map metadata.

License

The text of this specification is licensed under a Creative Commons Attribution 3.0 United States License. However, the use of this spec in products and code is entirely free: there are no royalties, restrictions, or requirements.

Implementations

Authors

  • Konstantin Käfer
  • Young Hahn
  • Tom MacWright

Translations

简体中文

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

TileJSON 2.1.0

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.

1. Purpose

This specification attempts to create a standard for representing metadata about multiple types of web-based layers, to aid clients in configuration and browsing.

2. File format

TileJSON manifest files use the JSON format as described in RFC 4627.

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.

{
// REQUIRED. A semver.org style version number. Describes the version of
// the TileJSON spec that is implemented by this JSON object.
"tilejson": "2.1.0", // OPTIONAL. Default: null. A name describing the tileset. The name can
// contain any legal character. Implementations SHOULD NOT interpret the
// name as HTML.
"name": "compositing", // OPTIONAL. Default: null. A text description of the tileset. The
// description can contain any legal character. Implementations SHOULD NOT
// interpret the description as HTML.
"description": "A simple, light grey world.", // OPTIONAL. Default: "1.0.0". A semver.org style version number. 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, the major version MUST be increased.
// Implementations MUST NOT use tiles with different major versions.
"version": "1.0.0", // OPTIONAL. Default: null. 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 field can't be abused as a vector for XSS or beacon tracking.
"attribution": "<a href='http://openstreetmap.org'>OSM contributors</a>", // OPTIONAL. Default: null. 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.
"template": "{{#__teaser__}}{{NAME}}{{/__teaser__}}", // OPTIONAL. Default: null. 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.
"legend": "Dangerous zones are red, safe zones are green", // OPTIONAL. Default: "xyz". Either "xyz" or "tms". Influences the y
// direction of the tile coordinates.
// The global-mercator (aka Spherical Mercator) profile is assumed.
"scheme": "xyz", // REQUIRED. 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 endpoints MUST return the same
// content for the same URL. The array MUST contain at least one endpoint.
"tiles": [
"http://localhost:8888/admin/1.0.0/world-light,broadband/{z}/{x}/{y}.png"
], // OPTIONAL. Default: []. 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, interactivity is not supported
// for this tileset.
// See https://github.com/mapbox/utfgrid-spec/tree/master/1.2
// for the interactivity specification.
"grids": [
"http://localhost:8888/admin/1.0.0/broadband/{z}/{x}/{y}.grid.json"
], // OPTIONAL. Default: []. 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.
"data": [
"http://localhost:8888/admin/data.geojson"
], // OPTIONAL. Default: 0. >= 0, <= 22.
// An integer specifying the minimum zoom level.
"minzoom": 0, // OPTIONAL. Default: 22. >= 0, <= 22.
// An integer specifying the maximum zoom level. MUST be >= minzoom.
"maxzoom": 11, // OPTIONAL. Default: [-180, -90, 180, 90].
// 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.
"bounds": [ -180, -85.05112877980659, 180, 85.0511287798066 ], // OPTIONAL. Default: null.
// 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 can use this value to set the default location. If the
// value is null, implementations may use their own algorithm for
// determining a default location.
"center": [ -76.275329586789, 39.153492567373, 8 ]
}

3. Caching

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.

TileJSON的更多相关文章

  1. Exploring the MapBox stack: MBTiles, TileJSON, UTFGrids and Wax

    转自:http://blog.thematicmapping.org/2012/11/exploring-mapbox-stack-mbtiles-tilejson.html In my last b ...

  2. UTFGrid

    UTFGrid UTFGrid is a specification for rasterized interaction data. As of version 1.2, it was remove ...

  3. Tilemill + tilestream + mapbox.js 自制地图

    感谢Mapbox,带来了一整套完整的地图方案. 你可以把你的地图放在Mapbox的网站上.也可以使用他们提供的开源软件自己架设地图服务. Mapbox的地图方案包括web,ios和android. 不 ...

  4. leaflet地图库

    an open-source JavaScript libraryfor mobile-friendly interactive maps Overview Tutorials Docs Downlo ...

  5. openLayers 3知识回顾

    openlayers 知识 前段时间帮助同事重构一个地图类的项目,然后就学习了openLayer3这个框架,但是官网上没有中文版,也没有详细的例子解释,我只能遇到看不懂的就翻译成中文来用,为了方便以后 ...

  6. ol图层支持的数据源

    ol.source.BingMaps,必应地图的数据: ol.source.Cluster,聚族矢量数据: ol.source.ImageCanvas,数据来源是一个canvas元素,其中数据是图片: ...

  7. openLayers,常见地图实例

    http://openlayers.org/en/master/examples/epsg-4326.html -- 标尺 http://openlayers.org/en/master/exampl ...

  8. OpenLayers学习笔记(六)— 拖拽叠加层overlayer

    是在官网例子基础上增加的拖拽功能 GitHub:八至 作者:狐狸家的鱼 本文链接:拖拽叠加层overlayer 全部代码 <!DOCTYPE html> <html> < ...

  9. OpenLayers 3 之 地图图层数据来源(ol.source)详解

    原文地址 source 是 Layer 的重要组成部分,表示图层的来源,也就是服务地址.除了在构造函数中制定外,可以使用 layer.setSource(source) 稍后指定.一.包含的类型 ol ...

随机推荐

  1. 第13章 Linux日志管理

    1. 日志管理 (1)简介 在CentOS 6.x中日志服务己经由rsyslogd取代了原先的syslogd服务.rsyslogd日志服务更加先进,功能更多.但是不论该服务的使用,还是日志文件的格式其 ...

  2. [PHP源码阅读]strtolower和strtoupper函数

    字符串的操作函数中,字符串的大小写转换也算是比较常用的函数,其底层实现也比较简单,下面来一探究竟. 我在github上有对PHP源码更详细的注解.感兴趣的可以围观一下,给个star.PHP5.4源码注 ...

  3. Java下好用的开源库推荐

    作者:Jack47 转载请保留作者和原文出处 欢迎关注我的微信公众账号程序员杰克,两边的文章会同步,也可以添加我的RSS订阅源. 本文想介绍下自己在Java下做开发使用到的一些开源的优秀编程库,会不定 ...

  4. 关于VS2015支持编译Linux程序的问题

    现状 目前已经发布的VS2015中包括VS2015 Preview 以及 VS2015 CTP6,这两个版本均不支持直接编译C++代码为Linux程序,具体情况可以参考 Visual Studio 2 ...

  5. ASP.NET MVC Model元数据(三)

    ASP.NET MVC Model元数据(三) 前言 在上篇中我们大概的讲解了Model元数据的生成过程,并没有对Model元数据本身和详细的生成过程有所描述,本篇将会对详细的生成过程进行讲解,并且会 ...

  6. 关于python中的flush问题

    今天写了一个控制台下的进度条小程序,遇到了关于flush的问题,在这里小小的总结一下. 首先在要flush的字符串必须后边加上'\r'(回车) 将数据送入缓冲区这样在新打印字符的时候就可以将原来的显示 ...

  7. ceph架构剖析

    unitedstack有云 :https://www.ustack.com/blog/ceph_infra/

  8. Nginx服务器 之反向代理与负载均衡

    一.反向代理 正向代理: 客户端要获取的资源就在服务器上,客户端请求的资源路径就是最终响应资源的服务器路径,这就是正向代理.正向代理的特点:就是我们明确知道要访问哪个网站地址. 反向代理: 客户端想获 ...

  9. 最好的5个Android ORM框架

    在开发Android应用时,保存数据有这么几个方式, 一个是本地保存,一个是放在后台(提供API接口),还有一个是放在开放云服务上(如 SyncAdapter 会是一个不错的选择). 对于第一种方式, ...

  10. PHP 高级编程(2/5) - 反射API

    PHP 5 具有完整的反射 API,添加了对类.接口.函数.方法和扩展进行反向工程的能力. 此外,反射 API 提供了方法来取出函数.类和方法中的文档注释.通过使用反射API可以分析其他的类.接口.方 ...