Map Tile API Developer's Guide

Metainfo Tile Format for Metadata Generation One

Every metainfo tile displays the following information in a JSON structure
  • metadata – container for the response
    • street labels - array of street labels
      • name
      • font size
      • vertices – array of tile coordinates
        • x
        • y
    • labels – array of labels
      • name
      • type
      • bounding boxes – array of boxes
        • left
        • top
        • width
        • height
    • city center labels – array of city center labels
      • name
      • text box
        • left
        • top
        • width
        • height
      • bullet box
        • left
        • top
        • width
        • height
      • city center info
        • type
        • name
        • alternative names – array of names
          • country code
          • name
        • country code
        • position
          • latitude
          • longitude
        • population
The format is as follows:
{
  "metadata": {
    "street labels": [],
    "labels": [],
    "city center labels": []
  }
}

Street labels

The street labels field displays an array of labels containing the name of the street, the font size used to render it and an array of vertices to draw the polyline that represents the bounding box. The format is as follows:
"name": "",
"font size": "",
"vertices: [
  "x":,
  "y":
]
Name Type Description
name String Name of the street
font size String Font size used to render the label, it is a number displayed as a string
vertices Array of tile coordinates Array containing all vertices needed to draw a polyline that creates a bounding box on the street label.

Labels

The labels field only displays information about roadsigns, including the name, the type and the location (bounding box). The format is an array of labels, each one with the following format:
"name": "",
"type": "ROADSIGN",
"bounding boxes": []
Name Type Description
name String Name displayed on the label
type String One of the following types: Roadsign
bounding boxes Array of Bounding Box Array containing all the bounding boxes of the label

City Center Labels

This field displays an array of city center labels, each one including the name and location (bounding box) of the name, location (bounding box) of the bullet box, which is the small square showing the city center and the city center additional information, which shows the type of city, official displayed name, the alternative names in different languages, the country code, position (latitude and longitude) and population. The format is as follows:
"name": "",
"text box" : {
  "left": ,
  "top": ,
  "width": ,
  "height":
},
"bullet box" : {
  "left": ,
  "top": ,
  "width": ,
  "height":
},
"city center info": {
  "type": "",
  "name": "",
  "alternative names": [
    [
      "",
      ""
    ]
  ],
  "country code": "",
  "position": {
    "latitude":,
    "longitude":
  },
  "population":
}
Name Type Description
name String Name of the city
text box Bounding Box Location of the label in the tile
bullet box Bounding Box Location of the bullet in the tile
city center info Structure Structure containing additional information for a city

Common fields

Field Name Type Description
Bounding Box left Integer Location of the left coordinate in the tile
top Integer Location of the top coordinate in the tile
width Integer Width of the bounding box
height Integer Height of the bounding box
Geo coordinate latitude Float (6 decimals) Latitude of the geo coordinate
longitude Float (6 decimals) Longitude of the geo coordinate
City Center Info type String Type of city between National Capital, Provincial Capital and Other
name String Official name of the city
alternative names Array of arrays Alternative names of the city, each array containing the country code as String and the name as String
country code String Three letter country code following MARC coding
position Geo coordinate Location of the city center
population Integer Population of the city
Tile Coordinate x Integer Coordinate x of the tile coordinate
y Integer Coordinate y of the tile coordinate

Two examples are provided in this section, both using mgen=1, to illustrate the format described above. For additional information about how to use the mgen parameter, see the Examples topic.

This example shows a parameter in Berlin and the request looks like:
https://2.base.maps.cit.api.here.com
/maptile/2.1/maptile/newest/normal.day/9/275/167/256/png8
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&metadata=metaonly
&mgen=1
The response looks like:
{ "metadata" : {
"street labels":[

],
"labels":[
  {"name":"1", "type": "ROADSIGN", "bounding boxes": [ { "left":96, "top":240, "width":18, "height":12 } ] },
   ...,
  {"name":"109", "type": "ROADSIGN", "bounding boxes": [ { "left":49, "top":28, "width":22, "height":12 } ] }
],
"city center labels":[
  {"name": "Berlin", "text box": { "left":9, "top":218, "width":49.45, "height":20.50 }, "bullet box": { "left":4, "top":234, "width":5, "height":5 }, "city center info": {"type":"NATIONAL CAPITAL", "name": "Berlin", "alternative names":[["ARA", "برلين"], ["BAQ", "Berlin"], ["BUL", "Берлин"], ["BUX", "Berlin"], ["CAT", "Berlín"], ["CHI", "柏林"], ["CHT", "柏林"], ["CZE", "Berlín"], ["CZX", "Berlin"], ["DAN", "Berlin"], ["DUT", "Berlijn"], ["ENG", "Berlin"], ["EST", "Berliin"], ["ESX", "Berliin"], ["FIN", "Berliini"], ["FRE", "Berlin"], ["GER", "Berlin"], ["GRE", "Βερολίνο"], ["GRX", "Verolino"], ["HIN", "बर्लिन"], ["HIX", "Barlin"], ["HUN", "Berlin"], ["HUX", "Berlin"], ["ICE", "Berlín"], ["IND", "Berlin"], ["ITA", "Berlino"], ["JPN", "ベルリン"], ["JPX", "Berurin"], ["KOR", "베를린"], ["KOX", "Be Reul Rin"], ["LAV", "Berlīne"], ["LAX", "Berline"], ["LIT", "Berlynas"], ["LIX", "Berlynas"], ["MAY", "Berlin"], ["NOR", "Berlin"], ["POL", "Berlin"], ["POR", "Berlim"], ["POX", "Berlin"], ["PYN", "Bo Lin"], ["RMX", "Berlin"], ["RUM", "Berlin"], ["RUS", "Берлин"], ["RUX", "Berlin"], ["SCR", "Berlin"], ["SLO", "Berlín"], ["SLX", "Berlin"], ["SPA", "Berlín"], ["SRX", "Berlin"], ["SWE", "Berlin"], ["THA", "เบอร์ลิน"], ["TUR", "Berlin"], ["TUX", "Berlin"], ["UKR", "Берлін"], ["UKX", "Berlin"]], "country code": "DEU", "position": {"latitude":52.514648, "longitude":13.375854}, "population": 3442675 } },
   ...,
  {"name": "Prötzel", "text box": { "left":210, "top":152, "width":34.09, "height":10.50 }, "bullet box": { "left":227, "top":164, "width":2, "height":2 }, "city center info": {"type":"OTHER", "name": "Prötzel", "alternative names":[], "country code": "DEU", "position": {"latitude":52.635498, "longitude":13.985595}, "population": 1143 } }
]
}
}

This other example contains a metadata response for a close-up of a location in Berlin including street labels. The request looks like:
https://2.base.maps.cit.api.here.com/maptile/2.1/
  maptile/newest/normal.day/13/4402/2685/256/png8
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&metadata=metaonly
&mgen=1
The response looks like:
{ "metadata" : {
"street labels":[
{ "name":"Hansastraße", "font size":"11", "vertices": [ { "x": 163, "y": 118 },  { "x": 175, "y": 102 },  { "x": 178, "y": 98 },  { "x": 182, "y": 93 },  { "x": 187, "y": 90 },  { "x": 190, "y": 87 },  { "x": 194, "y": 84 },  { "x": 210, "y": 75 } ] },
{ "name":"Weißenseer Weg", "font size":"11", "vertices": [ { "x": 147, "y": 240 },  { "x": 172, "y": 288 },  { "x": 176, "y": 297 },  { "x": 182, "y": 319 } ] }
],
"labels":[
{"name":"Volkspark Prenzlauer Berg", "type": "TEXT", "bounding boxes": [ { "left":64, "top":243, "width":55.03, "height":37.75 } ] },
{"name":"Weißenseepark", "type": "TEXT", "bounding boxes": [ { "left":55, "top":78, "width":77.97, "height":11.75 } ] },
{"name":"Sportforum Hohenschönhausen", "type": "TEXT", "bounding boxes": [ { "left":167, "top":215, "width":11, "height":11 } ] },
{"name":"Sportkomplex Buschallee", "type": "TEXT", "bounding boxes": [ { "left":237, "top":61, "width":11, "height":11 } ] },
{"name":"Sportforum Hohenschönhausen", "type": "TEXT", "bounding boxes": [ { "left":123, "top":190, "width":99.55, "height":23.75 } ] },
{"name":"Sportkomplex Buschallee", "type": "TEXT", "bounding boxes": [ { "left":207, "top":36, "width":71.56, "height":23.75 } ] }
],
"city center labels":[
{"name": "Alt-Hohenschönhausen", "text box": { "left":248, "top":133, "width":126.09, "height":29.50 }, "city center info": {"type":"OTHER", "name": "Alt-Hohenschönhausen", "alternative names":[], "country code": "DEU", "position": {"latitude":52.547607, "longitude":13.500824}, "population": 0 } },
{"name": "Weißensee", "text box": { "left":84, "top":8, "width":70.67, "height":15.50 }, "city center info": {"type":"OTHER", "name": "Weißensee", "alternative names":[], "country code": "DEU", "position": {"latitude":52.561340, "longitude":13.467865}, "population": 0 } }
]
}
}