GuidesAPI Reference
Guides

Modify label and icon size

the HERE Map Image API provides a ppi (or "pixels per inch") parameter to render labels and icons in different sizes. The following ppi values (in pixels) are currently available in the HERE Map Image API:

  • ppi=100: This default value prioritizes a denser display, featuring smaller yet clearer labels and icons. For example, you can use this value for smaller, more intricate displays, it condenses more information into a limited space.
  • ppi=200: This option provides a middle ground for label sizing, offering an ideal solution when ppi=100 results in labels that are too small, and ppi=400 produces labels that are overly large. This enhancement ensures optimal readability and precision in your visualizations.
  • ppi=400: This value showcases larger labels and icons, emphasizing visibility and clarity. You can use this value for larger screens because it ensures clearer and more visible details, making information easily discernible on bigger displays.
📘

Note

Deciding between ppi=100, ppi=200, and ppi=400 means finding the right balance in label and icon size for the screen's resolution. To ensure the map elements fit well, try all values on the target display. This helps pick the best setting for clear visibility and well-organized information.

The following figure shows a comparison of different ppi settings for the same map image:

Map images with different ppi values - a comparison

To improve the legibility of labels and icons, for example, on large screens, consider modifying the value of the ppi parameter. This step helps to ensure that your maps maintain their visual integrity and legibility on larger displays.

Sample request #1:

Consider the following request:

https://image.maps.hereapi.com/mia/v3/base/mc/center:29.961105,-90.094446;zoom=10/300x300/png8
?apikey={YOUR_API_KEY}

Response:

The preceding request obtains the following response, with the default value of 100 pixels:

Map image with the ppi parameter set to 100

Sample request #2:

To obtain a map image with medium-sized icons and labels, set the ppi parameter to 200, as shown in the following example:

https://image.maps.hereapi.com/mia/v3/base/mc/center:29.961105,-90.094446;zoom=10/300x300/png8
?apikey={YOUR_API_KEY}
&ppi=200

Response:

The size of labels and icons increases, as shown in the following example: Map image with the ppi parameter set to 200

Sample request #3:

To maximize the visibility and clarity of icons and labels, set the ppi parameter to 400, as shown in the following example:

https://image.maps.hereapi.com/mia/v3/base/mc/center:29.961105,-90.094446;zoom=10/300x300/png8
?apikey={YOUR_API_KEY}
&ppi=400

Response:

The size of labels and icons is set to maximize clarity and visibility:

Map image with the ppi parameter set to 400

Next steps

For more information on how to explore other map parameters related to map readability, see Adjust map readability.