Map Tile API Developer's Guide

Key Concepts

This section provides insights into the key concepts used throughout the Map Tile API.

Map Tile Resources and URL usage

The Map Tile API uses different URLs to provide different map tiles, depending on the specific use case that needs to be solved.

Each Map Tile Resource is mapped to a different URL, see Constructing a Request for more details on how to construct a request.

Each Map Tile Resource provides a different set of possible combinations of tile types , schemes and parameters in order to show different images.
  • Base: provides map tiles using the map as a background, metadata text-based tiles with information about the map and base64 encoded tiles.
  • Aerial: provides map tiles using satellite images as a background
  • Pano: provides map tiles using map and panorama coverage as a background
  • Traffic: provides map tiles with a traffic flow overlay

Information Request Usage

The Map Tile API offers regularly updated maps. In order to know how to get the latest available map and how to properly use that information, please check Requesting the Right Map Version

Copyright Request Usage

The Map Tile API offers copyright information about the map that you need to include when displaying a map composed out of map tiles. Please note that every resource offers its own copyright information that you should query.

The Mercator Projection

The Map Tile API serves map tiles obtained by mapping points on the surface of a sphere (the globe) to points on a plane, using the normalized Mercator projection.

The basic Mercator projection formula is this:

{λ, φ} -> x[-1, 1] y [-1, 1]

In this formula:

λ = longitude
φ = latitude
x = λ / π
y = ln(tan(π/4 + φ/2)) / π

The plane represents the globe as a square grid of map tiles. The size of the grid depends on the map zoom level. At the lowest zoom level, the world is contained in one map tile. At the next higher zoom level, the world is two tiles wide and two tiles high (2x2), at the next level above that, the grid is 4x4, then 8x8, 16x16, and so on up to the maximum zoom for a particular region. In other words, at each zoom level the tiles that make up the complete map of the world form a grid in which the number of tiles is equal to two to the power of two multiplied by the zoom level (2(2*zoom)).

The relationship between tiles at two consecutive zoom levels can be expressed as follows:

col1,z+1 = (2*colz) + 1row1,z+1 = (2*rowz) + 1

In this formula:

col = column number in the tile grid
row = row number in the tile grid
z = zoom level

The diagram below demonstrates this graphically:

Figure 1. Tiles at different zoom levels
You can use this information to obtain the grid coordinates (row and column) of the map tile for a particular geographic location in your application. The following pseudo code contains the complete algorithm:
--- javascript ---
var lat = 52.525439, // Latitude
lon = 13.38727,    // Longitude
z = 12,        // Zoom level
latRad,
n,
xTile,
yTile;

latRad = lat * Math.PI / 180;
n = Math.pow(2, z);
xTile = n * ((lon + 180) / 360);
yTile = n * (1-(Math.log(Math.tan(latRad) + 1/Math.cos(latRad)) /
Math.PI)) / 2;

--- output ---
lat_rad = 0.916
n = 4096
xTile = 2200.31 // Column
yTile = 1343.20 // Row

The zoom level and tile row and column can be used as URL variables separated by the '/' character in map tile requests. Note that they must be provided in this order: zoom/column/row. This is the [Z]/[X]/[Y] addressing scheme.

The map tile specification is typically preceded by other path variables and may be followed either by further path variables and/or query parameters.

Using a Tile Address

A request that includes a tile address in the format zoom/column/row can be formulated as follows:

https://2.base.maps.cit.api.here.com
/maptile/2.1/maptile/newest/normal.day/12/2200/1343/256/png8
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}

In this case, the request obtains a map tile at zoom level 12 for part of Berlin, Germany:

Figure 2. A map tile for part of Berlin

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.