Get started

Layers

The layer catalog: the terrains, the elevation raster, the overlays and the itinerary and zone layers, each by its slug with the tile sources it resolves to.

The Layers object

The built-in map layer catalog: the terrain base maps, the grouped overlay layers, and the two layers that render itineraries and zones. itineraries and zones are typed as overlays because that is what they are to a map: one tile source each, registered the same way. But they are singular and always present, so they sit beside the overlays groups rather than inside them.

elevation

object

required

The height raster a renderer turns into three-dimensional relief. Every catalog carries one, so a client registers the terrain source unconditionally rather than branching on whether heights are available.

itineraries

object

required

The single layer that draws the itineraries this credential reaches, in the studio scope organization_id names when the catalog was asked for one, which its URL template then carries. It is typed as an overlay because that is what it is to a map, one tile source registered the same way, and it sits here rather than inside overlays because it is singular and always present: there is one of it, for every caller, and no group to file it under.

overlays

array of CategoryOverlays

required

The overlay catalog, grouped. Each group holds the overlays a caller can add to a map. Under a publishable key or a share token the overlays a map draws are the ones the organization's overlay allowlist admits, and the Tile API holds every overlay tile to it. The Tile API's own catalog, getTileLayers, lists only those, dropping a group left with none; the Map Studio API's getLayers lists every overlay whatever the allowlist says. From Mountaya's web application both list every overlay, in the person's own space and in each organization they are a member of, while the Tile API draws in the studio scope organization_id names: the points of interest alone in the person's own space and in an organization that does not hold Map Studio, and every overlay in one that does.

terrains

array of Terrain

required

The terrain base maps a caller can draw itineraries and zones on.

See the Terrain object.

zones

object

required

The single layer that draws the zones this credential reaches, in the studio scope organization_id names when the catalog was asked for one, which its URL template then carries. Typed as an overlay and kept outside the overlays groups for the reason itineraries gives.

List the terrains, overlays and layers this API draws

GET
/v1/tile-layers

Returns the map layer catalog this API draws from: the terrain base maps, the elevation raster the terrains are shaded from, the grouped overlay layers, and the two layers that draw itineraries and zones. It is the catalog the Map Studio API's getLayers answers at its /v1/layers, in the same shape, served here under the tiles scope, so a map drawn with the Tile API alone finds every layer by its slug without Map Publishing.

Query parameters

organization_id

string (uuid)

in query

The studio scope the map draws in, named by the organization's identifier. A value that is not a UUID in its canonical form, or the nil UUID, is a 400 naming organization_id.

Response 200

The layer catalog: the terrains, the elevation raster, the overlay groups, and the itinerary and zone layers, each with the tile sources and styling it resolves to, the overlays narrowed to the ones this API draws for the credential. When the request named an organization_id, the tile URL template of every overlay and of the itinerary and zone layers carries the same organization_id under sources[].tiles.

extensions

object

Top-level extensions map for 2xx responses. Mirrors the GraphQL-spec response extensions: a free-form map for response-scoped metadata.

data

Layers

required

The built-in map layer catalog: the terrain base maps, the grouped overlay layers, and the two layers that render itineraries and zones. itineraries and zones are typed as overlays because that is what they are to a map: one tile source each, registered the same way. But they are singular and always present, so they sit beside the overlays groups rather than inside them.

See the Layers object.

Errors 400, 401, 402, 403, 404, 405, 429, 500, 504. See Errors.

curl -s https://tiles.mountaya.com/v1/tile-layers \
  -H "X-API-Key: pk_your_publishable_key" | jq '[.data.overlays[].children[].slug]'
200
Response
{
  "data": {
    "elevation": {
      "id": "55763749-32b4-42d5-9f62-b6c51ef54d99",
      "tile_size": 512,
      "url": "https://tiles.mountaya.com/v1/elevation/tiles.json"
    },
    "terrains": [
      {
        "id": "cad23e29-49da-4009-9f99-63dbcd963dc0",
        "slug": "topo",
        "locales": {
          "de": null,
          "en": {
            "name": "Summer topo"
          },
          "es": null,
          "fr": {
            "name": "Topo été"
          },
          "it": null,
          "ja": null,
          "zh": null
        },
        "variants": {
          "light": {
            "style": {
              "url": "https://tiles.mountaya.com/v1/terrains/topo/light/style"
            },
            "tiles": {
              "url": "https://tiles.mountaya.com/v1/terrains/topo/light/tiles.json",
              "size": 512
            }
          },
          "dark": {
            "style": {
              "url": "https://tiles.mountaya.com/v1/terrains/topo/dark/style"
            },
            "tiles": {
              "url": "https://tiles.mountaya.com/v1/terrains/topo/dark/tiles.json",
              "size": 512
            }
          }
        }
      }
    ],
    "overlays": [
      {
        "id": "1b7e4d92-6c03-4f85-a2d7-9e0b5c8a3f14",
        "slug": "weather",
        "locales": {
          "de": null,
          "en": {
            "name": "Weather"
          },
          "es": null,
          "fr": {
            "name": "Météo"
          },
          "it": null,
          "ja": null,
          "zh": null
        },
        "children": [
          {
            "id": "5e1de8a6-7930-445a-8145-5301cf3c25f7",
            "slug": "wind",
            "content_type": "application/x-protobuf",
            "capabilities": {
              "client": {
                "timestamp": false
              },
              "server": {
                "timestamp": true
              }
            },
            "locales": {
              "de": null,
              "en": {
                "name": "Wind"
              },
              "es": null,
              "fr": {
                "name": "Vent"
              },
              "it": null,
              "ja": null,
              "zh": null
            },
            "sources": [
              {
                "id": "5e1de8a6-7930-445a-8145-5301cf3c25f7",
                "type": "vector",
                "attribution": "<a href=\"https://www.meteoblue.com/\" target=\"_blank\">&copy; meteoblue</a>",
                "tiles": [
                  "https://tiles.mountaya.com/v1/overlays/wind/{z}/{x}/{y}"
                ],
                "zoom_min": 7,
                "zoom_max": 18,
                "layers": [
                  {
                    "id": "overlay/b2618568-38a1-449b-8318-386b9b42cb4e",
                    "key": "wind",
                    "type": "fill",
                    "source": "5e1de8a6-7930-445a-8145-5301cf3c25f7",
                    "source_layer": "windLayer",
                    "zoom_min": 7,
                    "zoom_max": 18,
                    "layout": null,
                    "paint": {
                      "fill-color": "#5D8DBD",
                      "fill-opacity": 0.6
                    }
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "itineraries": {
      "id": "2d8f4e6a-1b3c-4d5e-9f8a-7c6b5a4d3e2f",
      "slug": "itineraries",
      "content_type": "application/x-protobuf",
      "capabilities": {
        "client": {
          "timestamp": false
        },
        "server": {
          "timestamp": false
        }
      },
      "locales": {
        "de": null,
        "en": {
          "name": "Itineraries"
        },
        "es": null,
        "fr": {
          "name": "Itinéraires"
        },
        "it": null,
        "ja": null,
        "zh": null
      },
      "sources": [
        {
          "id": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
          "type": "vector",
          "attribution": "<a href=\"https://mountaya.com/\" target=\"_blank\">&copy; Mountaya</a>",
          "tiles": [
            "https://tiles.mountaya.com/v1/itineraries/{z}/{x}/{y}"
          ],
          "zoom_min": 5,
          "zoom_max": 18,
          "layers": [
            {
              "id": "itineraries/9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d/lines",
              "key": "",
              "type": "line",
              "source": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
              "source_layer": "itinerary_lines",
              "zoom_min": 5,
              "zoom_max": 18,
              "layout": {
                "line-cap": "round",
                "line-join": "round"
              },
              "paint": {
                "line-color": "#2f80ed",
                "line-width": 3
              }
            }
          ]
        }
      ]
    },
    "zones": {
      "id": "58e506ec-06dd-44ef-8924-5c90ee360fe2",
      "slug": "zones",
      "content_type": "application/x-protobuf",
      "capabilities": {
        "client": {
          "timestamp": false
        },
        "server": {
          "timestamp": true
        }
      },
      "locales": {
        "de": null,
        "en": {
          "name": "Zones"
        },
        "es": null,
        "fr": {
          "name": "Zones"
        },
        "it": null,
        "ja": null,
        "zh": null
      },
      "sources": [
        {
          "id": "fc79978a-0e9c-4491-a5e4-b0de35a8b508",
          "type": "vector",
          "attribution": "<a href=\"https://mountaya.com/\" target=\"_blank\">&copy; Mountaya</a>",
          "tiles": [
            "https://tiles.mountaya.com/v1/zones/{z}/{x}/{y}"
          ],
          "zoom_min": 5,
          "zoom_max": 18,
          "layers": [
            {
              "id": "zones/fc79978a-0e9c-4491-a5e4-b0de35a8b508/fills",
              "key": "",
              "type": "fill",
              "source": "fc79978a-0e9c-4491-a5e4-b0de35a8b508",
              "source_layer": "fills",
              "zoom_min": 5,
              "zoom_max": 18,
              "layout": null,
              "paint": {
                "fill-color": "#F03E3E",
                "fill-opacity": 0.25
              }
            }
          ]
        }
      ]
    }
  }
}