Skip to content

Tile

Overview

A "tile" is a square area which contains pins for a map.

Tiles are referenced by their tile coordinates, which can be derived from the longitude and latitude using the Mercator projection, rounded down:

$$x = 2^{zoom} \cdot \frac{longitude + 180}{360}$$

$$y = 2^{zoom} \cdot \left(1 - \frac{\log{\left(\tan{\left(latitude \cdot \frac{\pi}{180}\right)} + \frac{1}{\cos{\left(latitude \cdot \frac{\pi}{180}\right)}}\right)}}{\pi}\right)$$

The value to use for the zoom level will be determined by the API depending on what caches best. To assertain this value, make a request for tiles using latitude and longitude values, and use the zoom level of the returned tiles to make future queries.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
  "x": "1",
  "y": "3",
  "zoom": 15,
  "area": {
    "top": 50.123,
    "left": 51.452,
    "bottom": 53.231,
    "right": 55.434
  },
  "granularities": {
    "min": 32,
    "max": 100
  },
  "pins": [
    ...
  ]
}