Hosted Map Tiles

Serve raster XYZ map tiles and static map images directly from Map Zena, with multiple styles and global coverage.

Hosted Map Tiles

Map Zena provides hosted raster map tiles using the standard XYZ tile scheme, compatible with any mapping library that accepts tile URLs. A static map image endpoint lets you generate map images server-side for embedding in emails, PDFs, or pages without a JavaScript mapping library.

Note: Hosted map calls work in anonymous mode up to the free 500 requests/day allowance.

Tile endpoint

GET https://tiles.mapzena.com/v1/{style}/{z}/{x}/{y}.png

URL parameters

SegmentDescription
{style}Map style name. See styles table below.
{z}Zoom level. Range: 0-19.
{x}Tile column index (east-west).
{y}Tile row index (north-south, TMS y=0 is top).
keyOptional query parameter for registered usage. Anonymous requests are allowed until free quota is exhausted.

Map styles

Style nameDescription
streetsGeneral-purpose street map with roads, buildings, and labels. Clean, light background.
streets-darkDark mode street map. Optimised for dashboards and night-mode UIs.
satelliteAerial/satellite imagery. Available at zoom 0-19 for most regions.
satellite-labelsSatellite imagery with place name and road label overlay.
terrainPhysical relief map with elevation shading, rivers, and topographic features.
terrain-labelsTerrain with place name labels.
minimalStripped-back base map showing only borders, coastlines, and major labels. Ideal as a data visualisation base.

Example tile URLs

tile urls
    https://tiles.mapzena.com/v1/streets/12/2047/1379.png

    
https://tiles.mapzena.com/v1/streets-dark/{z}/{x}/{y}.png?key=YOUR_KEY


https://tiles.mapzena.com/v1/terrain/{z}/{x}/{y}.png?key=YOUR_KEY

Using tiles with Leaflet (no JS CDN)

If you host your own Leaflet JS (not from a CDN), you can use Map Zena tiles as the tile layer URL:

javascript - leaflet (self-hosted)
const map = L.map('map').setView([48.8566, 2.3522], 12);

L.tileLayer('https://tiles.mapzena.com/v1/streets/{z}/{x}/{y}.png?key=YOUR_KEY', {
  attribution: '&copy; Map Zena | &copy; <a href="https://www.openstreetmap.org/copyright">OSM</a>',
  maxZoom: 19
}).addTo(map);

Static map images

The static map endpoint generates a PNG map image from server-side parameters. No JavaScript required in the client at all.

GET https://api.mapzena.com/v1/staticmap

Static map parameters

ParameterTypeRequiredDescription
key string optional Optional in free mode. Required for metered usage above the free allowance.
center string required Latitude,longitude of the map centre. E.g. 48.8566,2.3522.
zoom integer required Zoom level 0-19.
size string required Image dimensions in WIDTHxHEIGHT pixels. Max: 2048x2048.
style string optional Map style. Default: streets. See styles table above.
marker string optional Place a pin at lat,lon. Repeatable for multiple markers: &marker=48.8566,2.3522&marker=51.5074,-0.1278.
retina 0 or 1 optional Return a 2× resolution image for HiDPI displays. Default: 0.
format string optional png (default) or jpeg.

Example static map request

bash - curl
curl "https://api.mapzena.com/v1/staticmap?center=48.8566,2.3522&zoom=12&size=800x500&style=streets&marker=48.8566,2.3522&key=YOUR_KEY" \
  -o paris.png

Embedding a static map in PHP

php
<?php
$key    = 'YOUR_KEY';
$center = '48.8566,2.3522';
$zoom   = 12;
$size   = '800x400';
$src    = "https://api.mapzena.com/v1/staticmap?center={$center}&zoom={$zoom}&size={$size}&key={$key}";
echo '<img src="' . htmlspecialchars($src) . '" alt="Map of Paris" width="800" height="400">';

Attribution requirement

Map tiles are rendered from OpenStreetMap data. Any end-user-facing map must include the following attribution:

html
<small>&copy; <a href="https://mapzena.com">Map Zena</a> |
&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap contributors</a></small>

Error codes

HTTPCodeDescription
400invalid_styleUnknown style name.
400invalid_sizeSize exceeds 2048px in either dimension.
400invalid_zoomZoom out of range 0-19.
402insufficient_creditAPI key has insufficient account credit.
429anonymous_quota_exceededFree anonymous quota reached.
429rate_limit_exceededTile burst limit reached. Each tile request counts as one unit.