HERE Map Tile v2 Developer's Guide

Metainfo with POIs

The user wants to make POIs on the map interactive; for example, by offering several options to have the map display additional information. This requires obtaining metadata information about an image showing a map tile that includes POIs.

Note: These examples use a HERE API Key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.

Original Map Tile

This request obtains a map tile with a POI:

The response contains a POI - Zoological Garden in Berlin:

Figure 1. Map Tile with POI

The following request obtains more information about this map tile:

Metainfo Tile Request

The code block below demonstrates a complete request for a metadata map tile:

Processing Metainfo Tile Response

In this request, the query parameter metadata specifies that the response is to contain only metadata and the query parameter mgen specifies what metainfo is in the response.

  "metadata": {
    "street labels":[ ... ],
    "labels":[ ... ],
    "city center labels":[],
    "buildings":[  ],
    "transit stops":[  ],
        "name":"Zoological Garden",
        "geoposition":{"latitude":52.508211, "longitude":13.334570},
        "bounding boxes":[
            "box 1":[ 217, 35.75, 14, 14 ]
            "box 2":[ 199.86, 13.75, 48.28, 20.50 ]
            "PLACE NAME":"Zoological Garden",
            "PLACE PHONE NUMBER":"+(49)-30-254010",
            "PLACE CATEGORY":"Tourist Attraction",
            "PLACE ID":"50668488"

This information allows you to locate the icon and label of a POI in order to make them interactive. For this, you can use elements of the bounding boxes array: box 1 describes a bounding box for the icon, box 2 describes a bounding box for the text label.

The geoposition object of the metainfo JSON object provides the geocoordinates of the POI. These can be used to obtain the address of POI, for example for Reverse Geocoding:
<Label>Hardenbergplatz, 10623 Berlin, Deutschland</Label>
<AdditionalData key="CountryName">Deutschland</AdditionalData>
<AdditionalData key="StateName">Berlin</AdditionalData>
It is possible to display additional information related to POIs (for example, by means of an info bubble). This information is provided by the info JSON object:
  • name (PLACE NAME attribute)
  • category (PLACE CATEGORY attribute)
  • phone number (PLACE PHONE NUMBER attribute)
  • place id (PLACE ID attribute)