Custom markers and POST support for Static Map Images

Static Map Images are one the fastest ways to add maps to your website or app. Since each map is a single PNG or JPEG, they are a lot easier to set up than interactive maps. You can even add markers and lines to static maps—our servers handle the hard work.

Custom marker images

Today you can add markers to a static map by including the coordinates in your request. We’ll automatically select a suitable image based on the map style. You can also use a labeled marker with a classic solid design for differentiation.

Today, we’re letting you go even further with branding and improved differentiation. Just send us the image URL in your request to customize the marker image! This feature is now available on all plans that have access to static maps (including free trials).

We’re launching with support for up to 5 custom marker images per request, giving you plenty of flexibility. And the images can be up to 128px in each dimension, so your carefully designed icons will look great on retina and other HiDPI screens.

Static Map

Make complex requests with ease

Before today, the Static Map Images API was configurable via query string parameters. We occasionally heard from customers having issues though, because web browsers and servers place limits on URL length. This limited the level of detail and customization.

That’s why we’re now accepting POST requests to the cacheable static maps endpoint. POST parameters are sent via a JSON body, making it easier to specify complex requests. And when we add new features—like polygons — you won’t have to worry about URL length.

As far as we know, we’re the first provider to offer this!

Here’s an example request body:

{
  "center": "59.438484,24.742595",
  "size": "600x400@2x",
  "zoom": 14,
  "lines": [
    {
      "shape": "oj_kpBkhmen@vFvDlStSdIzN`BxCfMfShA`B~@|AvCrDpG`FfVfRb\\zSrBdBhZx\\pFdM~BpFn@zAxCrHrH|QjOh_@NtM|Vv@d@aHdHEfD^\\DhCh@nIjFlFvE~CfCzAzAdFjFt@t@~EdG]cEc@{Fm@uF]oDgAwJhAm@vMqGoAs{@dAMfG_@dE_@Ezb@ExWzBBZ?L@|DnTtAqE~CyMp@sB|@n@XUx@uBjAiApBi@lBp@hAtAzAClSjJzAkMtAl@dA}@~CVbB`@pDtAN}DxD`AdFi@vBIxBIe@aMuAgPyFwy@{Ca_@yFar@[{C_AsGuAkGqEgY_CmLqAuFuHi[m@vBq@hC",
      "color": "333333",
      "width": 5
    }
  ],
  "markers": [
    {
      "lat": 59.436884,
      "lon": 24.742595
    },
    {
      "lat": 59.441293,
      "lon": 24.747380,
      "style": "custom:https://docs.stadiamaps.com/img/leaf-green.png",
      "anchor": [-32, -95]
    },
    {
      "lat": 59.435561,
      "lon": 24.747605,
      "color": "red",
      "label": "E"
    }
  ]
}

We’re not stopping here!

Our roadmap still has more features on it (thanks to you!). Keep an eye out for integration with our routing API, polygon drawing, and more—all in a single API call.

Accessing the new functionality

We’ve updated our documentation with everything you need to get started, including HTML and cURL examples. And if you have any questions, you’re just an email away from real human support. Drop us a note at support@stadiamaps.com.