Map Image API Developer's Guide

Map Image Size and Format

The Map Image API is designed to be used on desktop computers as well as on mobile devices. In addition, the image in the response is always based on the latest available map version.

When requesting a map image, you do not need to specify an image size or image format. The service uses the user-agent HTTP header sent by the client (the requesting device) to ensure that the map image generated in response has the optimum size and format for the device display. However, if a request specifies height, width and/or image format, the service takes this information into account and does not automatically produce a map image based on the user-agent HTTP header.

For example, the request immediately below is for an image map centered on Helsinki, Finland, and it does not specify the image size and produces an image whose size and format are determined by the service:

https://image.maps.cit.api.here.com/mia/1.6/mapview
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&c=60.167,24.883
&u=10k
Figure 1. Map image centered on Helsinki, Finland

By contrast, here is a similar request with additional parameters h and w to indicate the desired height and width of the map image. In response, the service produces an image to match these parameters, rather than an image with characteristics automatically determined from the user-agent HTTP header:

https://image.maps.cit.api.here.com/mia/1.6/mapview
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&c=60.167,24.883
&u=10k
&h=300
&w=420
Figure 2. Map image of specific height and width, centered on Helsinki, Finland

 

A map image returned by the service can show only locations on the surface of the globe, that is any location along the Equator and between the North and South Poles. If the requested image height is greater than its width, and the width is large enough for the image to span the length of the Equator at the specified zoom level, black bars appear at the top and bottom of the map image, because it is not possible to display locations above 90 degrees North or below 90 degrees South.

The following request and picture demonstrate this. The request is for a map image centered on Helsinki in Finland at zoom level 1, with target image width of 420 pixels and height of 540 pixels.

https://image.maps.cit.api.here.com/mia/1.6/mapview
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&c=60.167,24.883
&w=420
&h=540
&z=1

 

Figure 3. Map image centered on Helsinki, Finland

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.