Guides
Render a styled map image

Render a styled map image

Same endpoint, set format to png or jpeg, and you get a server-rendered image back — no client-side mapping library required.

curl -X POST https://api.brandmappr.com/api/v1/location-map \
  -H "x-api-key: $KEY" -H "Content-Type: application/json" \
  -d '{"brand":"Starbucks","country":"US","state":"WA","format":"png"}' \
  -o starbucks-wa.png

The response body is the image bytes. Pipe to a file, embed in an <img> tag with a data URL, or stream to your report generator.

Pick a theme

-d '{"brand":"Starbucks","country":"US","format":"png","style":"dark"}'
ThemeLook
lightDefault — clean, minimal, white background
darkDark background, light labels — good for slide decks
voyagerCartoDB Voyager — soft pastels
pitchbookEditorial print-style
slateCool blue-grey
warmWarm parchment tones

Set dimensions

-d '{"brand":"Starbucks","format":"png","width":1600,"height":1000}'

Default is 1200×800. Max is 4096 per side. For print-quality output above screen resolution, see the resolution and DPI parameters in Parameters.

Customize markers

-d '{"brand":"Starbucks","format":"png","marker_color":"#00704A"}'

marker_color takes any 6-digit hex.

Set the viewport

Three ways, in order of priority:

  1. bounds — explicit [south, west, north, east]. Wins over everything else.
  2. center + zoom — point + zoom level (zoom is 0–18, like Leaflet).
  3. Auto-fit — the renderer fits all returned locations.
# Manhattan
-d '{"brand":"Starbucks","format":"png","center":[40.7,-74.0],"zoom":12}'

Render a single country as a shape

Set focus_country and the renderer drops the basemap entirely, drawing that one country as a filled shape with your locations on top — clean output for infographics and slides:

-d '{"brand":"Starbucks","format":"png","focus_country":"GB"}'

Tune the shape with fill_color (default #E5E7EB), outline_color (default #9CA3AF), and outline_width (default 1.5). Want it to drop onto any background? Add "background":"transparent" (PNG only — JPEG falls back to white):

-d '{"brand":"Starbucks","format":"png","focus_country":"GB","fill_color":"#F3F4F6","background":"transparent"}'

See Focus Map for the full reference.

Cost

Image renders charge 2× the base tier — a 5K-location image at the 5K-10K tier costs 10 credits (5 base × 2). Same call without an image is 5. See Billing & Credits.