Skip to main content
3 min read

Using Map Image API in Azure

Using Map Image API in Azure

Earlier this year, we announced the launch of HERE location services for the Microsoft Azure Marketplace. Specifically, we released three Azure Resource Manager (ARM) templates to simplify the integration of our REST services as Azure functions within an Azure solution. The templates cover the following:

  • Serverless Functions - Deploys HERE location services as Azure functions that can be invoked directly within any Azure applications and/or solutions.
  • Web App Backends - Deploys HERE location services as Azure functions along with Azure Service Bus and Cosmos DB to optimize for web application backend.
  • Real-Time Data Streams - Deploys HERE location services as Azure functions along with Event Hub and Cosmos DB to optimize for real-time streaming applications.

Scope and Requirements

Although our APIs can be used in multiple client types, our focus will be how to consume Azure Functions from HTML. The following are prerequisites for getting started:

Deploying Serverless Functions

At, select Azure Marketplace.

Search for "HERE Maps" and select HERE Maps & Location Services.

At the landing page for HERE Maps & Location Services, choose GET IT NOW.

Follow prompts until you are at the landing page for HERE Maps & Location Services template within the Azure Portal, then select Create.

After choosing the basic configuration, you will be prompted to enter your HERE App ID and App Code.

Once you have completed the process and deployed the template, navigate to App Services in the Azure Portal. Click on your recently created Function App, which will have its own unique identifier.

Within the function app, select the mapImage under the Functions, and then click on the
</> Get function URL.

Copy the URL and save it to a text file. You will use it in your HTML client page.

Consuming MapImage Function

Create an HTML page with the following content:

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1.0, width=device-width" />
    <title>Azure - Map Image</title>
    <h1>Map Images - Azure Functions</h1>
    <img id="mapImageBase" src=",13.37436&w=600&h=480&z=11&code=your-azure-function-code" />
    <img id="mapImageMarkers" src="" />
    <img id="mapImageProximity" src="" />
    <img id="mapImageAddress" src="" />

In the HTML, replace the your-azure-url-id and your-azure-function-code values in each <img> tag's src with what is in your copied URL. View the HTML in browser.

You should now see four images representing unique ways to use the map image API. For more commentary and additional uses, please watch our on-demand episode on this topic!


Developers can quickly utilize location services from HERE within Azure! To access the code files associated with this post, please visit our GitHub livestreams page for Azure Maps. For more information about HERE, please visit our developer portal at

Recently, we launched "Azure Connections", a new series on our Twitch channel. The focus of this series is to guide developers how to quickly adopt our Azure Marketplace integrations into coding solutions. Each episode features a core API. The first episode tackles map images, and this post navigates the steps to do the implementation. Join us next on October 2nd, 2019 for the second episode on Geocoding.

Michael Palermo

Michael Palermo

Have your say

Sign up for our newsletter

Why sign up:

  • Latest offers and discounts
  • Tailored content delivered weekly
  • Exclusive events
  • One click to unsubscribe