Hands On

Insert static maps into chatbots, Alexa devices and emails with the Map Image API

By Dylan Babbs | 27 December 2018

A few weeks ago, the HERE Developer Relations team participated in the AWS re:Invent Alexa Hack Day in Las Vegas, where we built an Alexa country challenge game.

The game was pretty straightforward: using Alexa Presentation Language, our skill would present a map with a country highlighted on an Alexa device with a screen. The player of the game would then take a guess at the country's name from a list of multiple choice options.

Usually, when we want to show a map in our applications, we recommend our native APIs and SDKs, like the JavaScript API, iOS SDK or Android SDK, which all provide interactive maps. But how about when you need to display a customized map with data overlays on a different platform?

That's where the HERE Map Image API comes in. The Map Image API is RESTful API enabling the creation of customized maps--all returned in your favorite image format.

The Map Image API isn't limited to just a normal map at any location around the globe. Here are some examples of things you can customize:

  • map theme (satellite, dark, light, terrain, etc.)
  • image size and format
  • overlays with custom data (markers, points, polylines, and polygons)

Since the Map Image API returns images, you can get pretty creative on where you can insert them:

  • Chatbots. Don't just provide directions text from our Routing API, also throw in an image of the route.
  • Alexa devices with screens (like us during the Alexa Hack Day).
  • Automated emails. Ridesharing company? Provide a map of the route your customer took in the receipt email.

Let's take a look at some examples.

Map Image API with Terrain Style

Map Image API with Polyline

Map Image API with Custom Polygon from GeoJSON