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} [], 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


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


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":[ ... ],
"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