Map Tile API Developer's Guide

Public Transit Geolocation

This article shows how to make a request with metadata parameter to get the geo location of a public transit stop.
Note: Please refer to Selecting Public Transit Stops to get additional information on how to create selectable area.

User story

The user wants to obtain the location of a Public Transit Stop so that it can be used to retrieve additional information.

Request Summary

The following list summarizes the elements required to create a request matching the user story and shows, in square brackets, how those elements are used in the example(s) below. Note that the request example also uses the authentication parameters.

Resource: maptile [maptile], see also (resource) type
URL variables: {map id} [newest], see also Requesting the Right Map Version
  {scheme} [normal.day], see also scheme
  {zoom}/{column}/{row} [16/35205/21495], see also The Mercator Projection
  {size} [256], see also size
  {format} [png8], see also format
Parameters: metadata=metaonly, see also metadata mgen=2, see also mgen

Request

The code block below demonstrates a complete request for the public transit stop.

https://2.base.maps.cit.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

Response

The image shown by this tile request not using metadata would be as follows.
Figure 1. Public Transit Map Tile
The response to the request delivers the following JSON object.

{ "metadata" : {
"street labels":[ ... ],
"labels":[],
"city center labels":[],
"buildings":[ ... ],
"transit stops":[ { "name": "Stadtmitte", "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"]], "Tuesday":[["0:0:0","24:0:0"]], "Wednesday":[["0:0:0","24:0:0"]], "Thursday":[["0:0:0","24:0:0"]], "Friday":[["0:0:0","24:0:0"]], "Saturday":[["0:0:0","24:0:0"]], "Sunday":[["0:0:0","24:0:0"]], "Holiday":[["0:0:0","24:0:0"]] }, "parking hours": { "Monday":[["0:0:0","24:0:0"]], "Tuesday":[["0:0:0","24:0:0"]], "Wednesday":[["0:0:0","24:0:0"]], "Thursday":[["0:0:0","24:0:0"]], "Friday":[["0:0:0","24:0:0"]], "Saturday":[["0:0:0","24:0:0"]], "Sunday":[["0:0:0","24:0:0"]], "Holiday":[["0:0:0","24:0:0"]] } } ]} ],
"POIs":[  ]
}
}
Out of this object there following properties are of interest to get the geo location:
  • position: contains the geo coordinates
  • latitude: contains the latitude of the public transit stop
  • longitude: contains the longitude of the public transit stop

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.