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
Copy file name to clipboardexpand all lines: docs/use-service.md
+102-3
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,21 @@ Once you have your Mapzen API key you'll need include it with Terrain Tile reque
14
14
15
15
## Requesting tiles
16
16
17
+
The [OpenStreetMap Wiki](http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames) describes the web mapping tile scheme used by the Mapzen terrain tile service.
18
+
17
19
Request a single tile with this URL pattern to get started:
Note: Skadi files are split into 1° by 1° grids. File names refer to the latitude and longitude of the lower left corner of the tile - e.g. N37W105 has its lower left corner at 37 degrees north latitude and 105 degrees west longitude. For example: N37W105: `https://tile.mapzen.com/mapzen/terrain/v1/skadi/N37/N37W105.hgt.gz?api_key=your-mapzen-api-key`.
70
76
77
+
## Specify tile size
78
+
79
+
Both Terrarium and Normal formats support optional tile sizes of `256` and `512` for basic map display, and buffered sizes of `260` and `516` pixels useful for 3d and analytical applications. When not provided, the size defaults to `256`. Historically, the first web slippy maps were based on 256 pixel sized tiles.
**Larger 512 pixel sized tiles offer several benefits:**
86
+
87
+
-**Less tiles, less network requests:** a single 512 request is equivalent to four 256 requests
88
+
-**Smaller overall file sizes:** A larger 512 pixel tile compresses to a smaller file size than when split into four 256 tiles
89
+
-**Offline:** Less 512 tiles are needed to cover the same geographic area, and take up less disk space
90
+
91
+
**Buffered 260 and 516 pixel sized tiles offer several benefits:**
92
+
93
+
-**Less network requests:** The 2 pixel edge buffers reduce network requests from 9 to 1, as sampling neighboring tiles is no longer necessary. And a single 516 request is equivalent to four 260 requests.
94
+
-**3D geometry construction**: The buffer provides enough height values in the overlap to calculate 3D elevation meshes without loading neighboring tiles.
95
+
-**Enables professional shading for 3D**: The 2nd pixel of buffer enables custom normals (slopes) to be calculated for the 1st pixel of the terrarium buffer without loading neighboring tiles.
96
+
97
+
### 256 tile size (default)
98
+
99
+
The maximum `{z}` value for 256 pixel tiles is zoom **15**. Requesting `{z}` coordinates past that will result in a 404 error.
100
+
101
+
**Default:**
102
+
103
+
Including tile size in the path is not required. When not specified the default size of `256` is returned, and Tangram's default `tile_size` of 256 is used.
The maximum `{z}` value for 260 pixel buffered tiles is zoom **15**. Requesting `{z}` coordinates past that will result in a 404 error. Supported by Terrarium and Normal formats.
The maximum `{z}` value for 516 pixel buffered tiles is zoom **14**. Requesting `{z}` coordinates past that will result in a 404 error. Supported by Terrarium and Normal formats.
If you’re building in Amazon AWS we recommend using machines in the `us-east` region (the same region as the S3 bucket) and use the following endpoints for increased performance:
@@ -77,7 +176,7 @@ If you’re building in Amazon AWS we recommend using machines in the `us-east`
NOTE: The S3 tiles are meant for efficient networking with EC2 resources only. The Amazon S3 endpoints are not cached using Cloudfront, but you could put your own Cloudfront or other CDN in front of them (or use Mapzen's hosted Terrain Tiles service).
179
+
NOTE: The S3 tiles are meant for efficient networking with EC2 resources only. Terrarium and normal formats are only available as 256 tile size on the Amazon S3 endpoints. The Amazon S3 endpoints are not cached using Cloudfront, but you could put your own Cloudfront or other CDN in front of them (or use Mapzen's hosted Terrain Tiles service).
0 commit comments