---
title: "Use a configurable link to map | Guides | Maps apis | Maps platform"
description: "Create and customize direct links to MapTiler maps."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs-beta-4y5.pages.dev/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

beta This page is part of the documentation for the new interface. [Learn more](https://docs-beta-4y5.pages.dev/updates/new-admin/)

# Use a configurable link to map

This page explains how to prepare a simple [link to a map](https://api.maptiler.com/maps/streets-v4/?key=mNLmXyaTH4gRlwJHSYWp#6.2/46/8.5/15/60), so that it displays the desired map view when users click on the link.

All necessary info to show the map is contained directly in the link URL. Here’s the general format:

`<a href="https://api.maptiler.com/maps/{styleId}/?key=YOUR_MAPTILER_API_KEY#{zoom}/{latitude}/{longitude}/{bearing}/{pitch}">Link text</a>`

The link URL is in fact a request to our [Maps API](https://docs.maptiler.com/cloud/api/maps/). Let’s see what parameters it contains and how you can customize it.

## Map style ID

The map style ID tells which map to show. It can be any ready-made MapTiler map, e.g. `streets-v4`, or your own custom map, which has an ID made of random letters and numbers. To find it, open the map in your MapTiler account, click **Share**, and copy the **Style ID** under **Build an application**.

## API key

The key is necessary to identify you and legitimate users of your maps. If it’s missing, the map won’t work. Replace `YOUR_MAPTILER_API_KEY` with [your own API key](https://cloud.maptiler.com/account/keys/). Make sure to [secure the key](https://docs-beta-4y5.pages.dev/guides/developer/credentials/api-key/#secure-key) before you publish it.

## Location and zoom

Any location on Earth can be uniquely described by its coordinates: longitude and latitude. [Get your coordinates here.](https://www.maptiler.com/tools/coordinates)

Zoom level can range from 0 (whole world) to 22 (most detailed view).

### Example

A map centered on Spain: [https://api.maptiler.com/maps/bright-v2/?key=mNLmXyaTH4gRlwJHSYWp#6/40.018/-3.779](https://api.maptiler.com/maps/bright-v2/?key=mNLmXyaTH4gRlwJHSYWp#6/40.018/-3.779)

The position hash is composed of zoom level, map center latitude, and map center longitude. In the example above:

-   Zoom level = 6
-   Map center latitude = 40.018
-   Map center longitude = -3.779

## Bearing and pitch

Bearing (map orientation) and pitch (visual tilt) are **optional**. If you don’t specify them in the URL, you’ll get the default map view: North up and no tilt.

### Examples

By adding the bearing and pitch to a map centered on Barcelona, we get a map where the coastline is aligned with the screen: [https://api.maptiler.com/maps/streets-v4/?key=mNLmXyaTH4gRlwJHSYWp#12.83/41.39474/2.16377/-45/60](https://api.maptiler.com/maps/streets-v4/?key=mNLmXyaTH4gRlwJHSYWp#12.83/41.39474/2.16377/-45/60)

-   Zoom level = 12.83
-   Map center latitude = 41.39474
-   Map center longitude = 2.16377
-   Bearing = -45
-   Pitch = 60

![Map centered on Barcelona: without bearing and pitch (left), and with bearing and pitch (right).](./tilt.webp)

_Map centered on Barcelona without bearing and pitch (left), and with bearing and pitch (right)._

If you’d like to show your map view on a webpage directly instead of linking to it, you can [embed it with an iFrame](https://docs-beta-4y5.pages.dev/guides/using-map/iframe/).
