Image endpoint

Render a Yatmo map as a static JPEG. Same look as the interactive map, but baked into an image you can embed anywhere — emails, PDF reports, social previews, server-rendered listing pages.

GET https://{country}.yatmo.com/image LicenseKey header

Returns a JPEG (Content-Type: image/jpeg). Computed live with a headless browser; expect ~1-2s latency on the first call.

When to use it

Request

Required parameters

Name In Type Description
latitude required query double Latitude of the property to center on.
longitude required query double Longitude of the property to center on.
hexaColor required query string Hex color for the pin marker, without the # — e.g. af0014 or 06A7EA.
width required query integer Image width in pixels (the resulting JPEG is rendered at 2× device-pixel-ratio for sharpness, then downscaled to this size).
height required query integer Image height in pixels.

Optional parameters

Name In Type Description
mapStyle query integer Basemap style. Matches the styles available on the interactive map. Default: 1.
threeDMode query boolean If true, render the map in 3D perspective view instead of flat top-down. Default: false.
bigIcon query boolean If true, render POI icons at a larger size — useful when the image will be displayed small but you still want POIs to read. Default: false.
multiborders query boolean If true, draw multiple administrative borders (neighbourhood, commune, district) on the map. Default: false.
customMarkerUrl query string HTTPS URL to a PNG or SVG to use instead of the default pin. When provided, customMarkerWidth and customMarkerHeight are also required.
customMarkerWidth query integer Custom marker width in pixels. Required when customMarkerUrl is set.
customMarkerHeight query integer Custom marker height in pixels. Required when customMarkerUrl is set.

Examples

# Save the rendered map straight to disk.
curl -H 'LicenseKey: YOUR_KEY' \
  'https://be.yatmo.com/image?latitude=50.8520525&longitude=4.3442926&hexaColor=06A7EA&width=800&height=450&mapStyle=1' \
  -o property-map.jpg
// Server-side (Node.js): download and persist the snapshot
const res = await fetch(
  'https://be.yatmo.com/image?latitude=50.8520525&longitude=4.3442926&hexaColor=06A7EA&width=800&height=450',
  { headers: { LicenseKey: process.env.YATMO_BACKEND_KEY } }
);
const buffer = Buffer.from(await res.arrayBuffer());
await fs.writeFile('property-map.jpg', buffer);

// Or pipe it straight to an Express response:
// res.set('Content-Type', 'image/jpeg').send(buffer);
$qs = http_build_query([
    'latitude' => 50.8520525,
    'longitude' => 4.3442926,
    'hexaColor' => '06A7EA',
    'width' => 800,
    'height' => 450,
    'mapStyle' => 1,
]);
$ch = curl_init("https://be.yatmo.com/image?$qs");
curl_setopt($ch, CURLOPT_HTTPHEADER, ['LicenseKey: ' . getenv('YATMO_BACKEND_KEY')]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$jpeg = curl_exec($ch);
curl_close($ch);
file_put_contents('property-map.jpg', $jpeg);
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("LicenseKey",
    Environment.GetEnvironmentVariable("YATMO_BACKEND_KEY"));

var qs = "latitude=50.8520525&longitude=4.3442926&hexaColor=06A7EA" +
         "&width=800&height=450&mapStyle=1";
var jpeg = await http.GetByteArrayAsync($"https://be.yatmo.com/image?{qs}");
await File.WriteAllBytesAsync("property-map.jpg", jpeg);

Notes

First call is slower
Each image is rendered fresh: Yatmo spins up a headless browser, loads the interactive map, waits for tiles + POIs to settle, then captures a screenshot. Expect ~1-2 seconds on the first call for a new (latitude, longitude, style) tuple. Cache the result on your side — most use cases (emails, PDFs, social previews) only need to fetch each image once.