You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following is a list of HTTP status error code conditions that may occur for a particular request.
4
+
5
+
In general, the service follows the [HTTP specification](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes). That is to say that `5xx` returns are generally ephemeral server problems that should be resolved shortly or are the result of a bug. `4xx` returns are used to mark requests that cannot be carried out, generally due to bad input in the request or problems with the underlying data. `3xx` returns are used to mark requests that are content redirects . A `2xx` return is expected when there is a successful `tile` response for a given tile coordinate, list of layers, and file format.
6
+
7
+
The following status codes are returned from the vector tile service:
8
+
9
+
-`200 OK`: The request has succeeded.
10
+
-`304 Not Modified`: Tile hasn't changed since the last time it was requested and there is no need to retransmit the resource since the client still has a previously-downloaded copy.
11
+
-`400 Bad Request`: An input parameter was invalid. An error message is included in the response body with more details.
12
+
-`403 Forbidden`: The URL is invalid or the path is no longer valid.
13
+
-`404 Not Found`: The URL is invalid or the path is no longer valid.
14
+
-`429 Too Many Requests`: Rate limiting, refer to Mapzen's [rate limits](https://mapzen.com/documentation/overview/rate-limits/) documentation.
15
+
-`500 Internal Server Error`: Generic fatal error.
16
+
-`502 Bad Gateway`: Connection was lost to the tileserver cluster.
17
+
18
+
In the `200 OK` case above, the `tile` response body will be valid GeoJSON, TopoJSON, or MVT document. In the other cases a text file will be returned with a message and the response header will specify the HTML status code.
Tiled geographic data enables fast fetching and display of "[slippy maps](https://en.wikipedia.org/wiki/Tiled_web_map)".
34
+
35
+
Tiling is the process of cutting raw map data from latitude and longitude geographic coordinates ([EPSG:4329](http://spatialreference.org/ref/epsg/4329/)) into a smaller data files using a file naming scheme based on zoom, x, and y in the Web Mercator ([EPSG:3857](http://spatialreference.org/ref/sr-org/6864/)) projection.
36
+
37
+
### Tile coordinate components
38
+
39
+
-`{z}`**zoom** ranges from 0 to 20 (but no new information is added after zoom 15)
40
+
-`{x}`**horizontal position**, counting from the "left", ranges from 0 to variable depending on the zoom
41
+
-`{y}`**vertical position**, counting from the "top", ranges from 0 to variable depending on the zoom
42
+
43
+
### Tile coordinate resources
44
+
45
+
- MapTiler.org's [Tiles à la Google Maps: Coordinates, Tile Bounds and Projection](http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/) has a great visualization that overlays tile coordinates on an interactive map
46
+
- GeoFabrik's [Tile Calculator](http://tools.geofabrik.de/calc/) charts number of tiles per zoom with a customizable bounding box
47
+
48
+
31
49
## Specify layers in the service
32
50
33
51
Layers to return can specified as `all`, or as one or more layer names separated by commas. Using the `all` layer is more performant.
@@ -74,6 +91,74 @@ Mapzen vector tiles can be returned in the following formats.
74
91
*[TopoJSON](https://github.com/mbostock/topojson): use the `.topojson` extension. TopoJSON is an optimized form of JSON that saves space by encoding topology and reducing replication of shared geometry.
75
92
*[Mapbox-format binary tiles](https://github.com/mapbox/vector-tile-spec): use the `.mvt` extension. This is a compact format using protocol buffers that is used for raster tile rendering in TileMill2 and vector rendering in MapboxGL
76
93
94
+
## Specify tile size
95
+
96
+
Optionally a 256 or 512 pixel tile size may be specified. When not specified, the size defaults to 256. Historically, the first web slippy maps were based on 256 pixel sized tiles.
97
+
98
+
Larger 512 pixel sized tiles offers several benefits:
99
+
100
+
-**Less tiles, less network requests:** a single 512 request is equivalent to four 256 requests
101
+
-**Better labels:** map rendering software like Tangram and MapboxGL have more room to better place labels
102
+
-**Smaller overall file sizes:** A larger 512 pixel tile compresses to a smaller file size than when split into four 256 tiles
103
+
-**Offline:** Less 512 tiles are needed to cover the same geographic area, and take up less disk space
The suggested max `{z}` value for 256 pixel tiles is zoom **16**. Requesting `{z}` coordinates up to 20 will return a smaller geographic area, but the tile will not include any additional data over the zoom 16 tile.
112
+
113
+
**Default:**
114
+
115
+
Including tile size in the path is not required. When not specified the default size of 256 is returned.
The suggested max `{z}` value for 512 pixel tiles is zoom **15**. Requesting `{z}` coordinates up to 20 will return a smaller geographic area, but the tile will not include any additional data over the zoom 15 tile.
Mapzen Vector Tiles works over HTTPS, in addition to HTTP. You are strongly encouraged to use HTTPS for all requests, especially for queries involving potentially sensitive information.
0 commit comments