Skip to content

Raster Map Tiles

While vector tiles have replaced the classic image grid for many applications, raster map tiles are battle-tested and easy to render. They also benefit from a rich ecosystem of rendering libraries like OpenLayers and Leaflet.

All of our house styles are available as PNG raster tiles in 256x256 px and 512x512 px "retina" sizes.

Tile URL Format

Most renderers use a format string like the one below and will automatically replace the placeholders for you. The only thing you'll need to replace yourself in most cases is the <style> placeholder. You can find the URLs for all our styles in the style gallery.

Max Zoom

For most raster styles, we support up to zoom 20 (Stamen Watercolor is an exception and may have missing tiles at zoom greater than 16).

If your library of choice supports specifying a max zoom, we recommend adding it to prevent visual errors.

Our standard endpoints will serve tiles from the fastest server no matter where your users are, and is backed by our global CDN with multiple layers of redundancy.

URL format with retina placeholder
https://tiles.stadiamaps.com/tiles/<style>/{z}/{x}/{y}{r}.png
URL format 256x256 px
https://tiles.stadiamaps.com/tiles/<style>/{z}/{x}/{y}.png
URL format 512x515 px (for OpenLayers, QGIS, MapLibre, and other renderers without retina placeholder support)
https://tiles.stadiamaps.com/tiles/<style>/{z}/{x}/{y}@2x.png

Our EU endpoints allow you to explicitly route all requests to our EU servers. See our EU Endpoints page for more details.

URL format with retina placeholder
https://tiles-eu.stadiamaps.com/tiles/<style>/{z}/{x}/{y}{r}.png
URL format 256x256 px
https://tiles-eu.stadiamaps.com/tiles/<style>/{z}/{x}/{y}.png
URL format 512x515 px (for OpenLayers, QGIS, MapLibre, and other renderers without retina placeholder support)
https://tiles-eu.stadiamaps.com/tiles/<style>/{z}/{x}/{y}@2x.png
What do {x}, {y}, {z}, and {r} mean?

The {x}, {y}, and {z} placeholders represent x, y, and zoom following the standard slippy map tilename convention. This format is used by most popular libraries. Note that our tile numbering uses the XYZ scheme, not TMS.

The {r} placeholder is used for HiDPI ("retina") display suppoort. Popular web map renderers like Leaflet understand this placeholder. If your renderer does not understand this (e.g., MapLibre GL JS or QGIS), you can either remove the placeholder to get raw 256x256 PNGs, or replace it with @2x for 2x scaled images.

Authentication

For local development on a web server at localhost or 127.0.0.1, you can get started without any API keys or domain setup!

For mobile, backend, and non-local web development, you'll need either domain auth or an API key. If you don't already have a Stadia Maps account, sign up for a free to get started.

Domain-based authentication

Domain-based authentication is the easiest form of authentication for production web apps. No additional application code is required, and you don't need to worry about anyone scraping your API keys. We recommend this for most browser-based applications.

  1. Sign in to the client dashboard.
  2. Click "Manage Properties."
  3. Under "Authentication Configuration," click the button to add your domain.
API key authentication

Authenticating requests via API key

You can authenticate your requests by adding an API key to the query string or HTTP header.

The simplest is to add a query string parameter api_key=YOUR-API-KEY to your request URL. For example, to access the /tz/lookup API endpoint, your request URL might look like this.

Example URL with an API key placeholder
https://api.stadiamaps.com/tz/lookup/v1?lat=59.43696&lng=24.75357&api_key=YOUR-API-KEY

You can also use an Authorization HTTP header instead of a query string as shown below. Don't forget the Stadia-Auth prefix!

Example Authorization header with an API key placeholder
Authorization: Stadia-Auth YOUR-API-KEY

How to get an API key

Don't have an API key yet? Follow these easy steps!

  1. Sign in to the client dashboard. (If you don't have an account yet, sign up for free; no credit card required!)
  2. Click "Manage Properties."
  3. If you have more than one property (ex: for several websites or apps), make sure you have selected the correct property from the dropdown at the top of the page.
  4. Under "Authentication Configuration," you can generate, view or revoke your API key.

Video: How to generate your API key

Tutorials

We have an extensive tutorial library to help you get started with the most popular libraries/frameworks. If your library/framework isn't listed, let us know! Our tiles can be used with any raster map renderer capable of loading PNG tiles.

JavaScript

WordPress

Mobile