HERE Map Tile v2 Developer's Guide

Public Transit Geolocation

The user wants to obtain the geolocation about a Public Transit Stop.

Request

In this request, the metadata parameter specifies that the response is to contain the available metadata within the specified area.

https://2.base.maps.ls.hereapi.com/maptile/2.1/maptile/newest/normal.day/16/35205/21495/256/png8
?apiKey={YOUR_API_KEY}
&metadata=metaonly
&mgen=2
Note: This example uses a HERE API Key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.

Response

The response contains the following properties required to obtain the desired geolocation:

  • position: contains the geocoordinates
  • latitude: contains the latitude of the public transit stop
  • longitude: contains the longitude of the public transit stop
{
  "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.
If the request does not use the metadata parameter, the response is as follows:
Figure 1. Public Transit Map Tile