Map Tile API Developer's Guide

Selecting Public Transit Stops

The user wants to obtain the name of a Public Transit stop and create a clickable area on top of it so that an interaction on that area triggers requests for additional information on the public transit stop.

Request

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.

https://2.base.maps.api.here.com/maptile/2.1/maptile/newest/normal.day/16/35205/21495/256/png8
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&metadata=metaonly
&mgen=2
Note: The same request, without metadata and mgen, results in a response tile with the Public Transit stop.

Response

The response contains the following properties required to show information related to the name:

  • name: contains the name used in the map for the stop
  • official name: contains the official name that must be used for the transit stop, found in the info array.
  • informal name: the name by which you can refer to the stop or might be known to users, when available, it can be found in the info array.
{
  "metadata": {
    "street labels":[ ... ],
    "labels":[],
    "city center labels":[],
    "buildings":[ ... ],
    "transit stops":
      {
        "name": "Stadtmitte",
        "type": "TRANSIT_STOP",
        "bounding boxes": [
          {
            "box 1":[ 136.50, 177.02, 14, 14 ]
          },
          {
            "box 2": [ 113.22, 163.02, 60.56, 13 ]
          }
        ],
        "info": [
          {
            "position": {"latitude":52.510475, "longitude":13.389920},
            "official name": "Stadtmitte",
            "places id": "721680928",
            "operating hours": {
              "Monday": [["0:0:0","24:0:0"]],
              ...,
              "Holiday": [["0:0:0","24:0:0"]],
            },
            "parking hours": {
              "Monday": [["0:0:0","24:0:0"]],
              ...,
              "Holiday": [["0:0:0","24:0:0"]]
            }
          }
        ]
      }
    ],
    "POIs": []
  }
}
Note: Parts of the response are modified as described in the introduction to Examples.

In the map, airports are shown with their IATA code instead of with their official name. The request below obtains metadata on the Erfurt-Weimar Airport (IATA code: ERF).

https://2.base.maps.api.here.com/maptile/2.1/maptile/newest/normal.day/11/1086/685/256/png8
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&metadata=metaonly
&mgen=2
The response to this request contains information useful for selecting the area where the public transit stop is located:
  • bounding boxes: an array of bounding boxes that can be used to select the different parts
  • box 1: bounding box that contains the icon used in the map to represent the public transit stop
  • box 2: bounding box that contains the labels attached to the icon to represent the name of the transit stop in the map

The values of these bounding boxes can be used to select a rectangular area of the tile.