Get started
Catalogs

Layers

Layers

The layer catalog a map draws from: the terrain base maps, satellite among them, the grouped overlays, the itinerary and zone layers, and the elevation raster the terrains are shaded from, with the tile sources and styling each one resolves to. Read this before rendering: it is what tells a client which layers exist and how to register them.

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.

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 terrains, overlays, and the zone layer

Returns the map layer catalog: the terrain base maps (satellite among them), the grouped overlay layers (for example slopes), the elevation raster the terrains are shaded from, and the two layers that draw itineraries and zones. Which overlay groups it carries follows the studio scope the optional organization_id names. Under a publishable key or a share token it may name only the credential's own organization and changes nothing, and the overlays a map draws there are the ones the organization's overlay allowlist admits, to which the Tile API holds every overlay tile. From Mountaya's web application it chooses between the person's own space and an organization they are a member of, as its description states, and the catalog lists every overlay in either, the ones the Tile API does not draw in that scope included.

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. When the request named an organization_id, the tile URL template of every overlay in overlays and of the itinerary and zone layers carries the same organization_id under sources[].tiles, so the tiles a map fetches are drawn in the scope the catalog was served for: from Mountaya's web application, the overlays that scope draws and the itineraries and zones it holds.

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, 429, 500, 504. See Errors.

curl -s https://api.mountaya.com/v1/layers \
  -H "X-API-Key: pk_your_publishable_key" | jq '.data'
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
              }
            }
          ]
        }
      ]
    }
  }
}