Map Tile API Developer's Guide

POI Map Filtered for a Specific Category

The user wants to see a certain location in the center of Berlin showing the Brandenburg Gate.

This request obtains a tile with the desired POI:

https://2.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/normal.day/20/563254/343903/256/png8
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}

The response image shows the Brandenburg Gate without a POI icon:

Figure 1. Center of Berlin in the location of the Brandenburg Gate

In order to obtain the category of this site, the metadata parameter specifies a request for a metadata response.

https://2.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/normal.day/20/563254/343903/256/png8
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&pois
&mgen=2
&metadata=metaonly

The result of the previous requests is a JSON object containing the information of the POIs of the tile.

{
  "metadata" : {
    "street labels":[ { "name":"Pariser Platz", "font size":"13", "vertices": 
    [ 168.73, 138.98, 204.18, 134.84, 215.62, 133.47, 243.81, 131.50 ] } ],
    
    "labels":[],
    "city center labels":[],
    "buildings":[
       {
          "id": "1609370975087560592", "sectors": [
             {
              "info": { "bottom height": 0, "height": 8 }, 
              "vertices": [ 8.44, 0, 10, 13.56, 110.66, 0 ], 
              "polygons": [ [ 0, 1, 2]], 
              "outlines": [ [ 2, 1, 0 ]] }, 
              {
                 "info":
                 {
                   "bottom height": 0, "height": 19.875 }, 
                   "vertices": [ 160, 220.62, 148, 115.44, 10, 13.56, 0, 13.56, 0, 48.62, 23.66, 256, 163.83, 256, 
                   110.66, 0, 132.39, 0, 158, 112.19, 144.72, 0, 168, 220.62, 172.31, 256, 0, 48.62 ], 
                   "polygons": [ [ 0, 1, 2, 3, 4, 5, 6], [ 7, 2, 1, 8], [ 8, 1, 9, 10], [ 11, 0, 6, 12]], 
                   "outlines": [ [ 5, 13 ], [ 3, 2, 7 ], [ 10, 9, 1, 0, 11, 12 ]] } ] } ],
                   "transit stops":[  ],
                   
                   "POIs":[
                      {
                         "name":"Brandenburg Gate",
                         "geoposition":
                         {
                           "latitude":52.516279, "longitude":13.377700
                         },
                         "bounding boxes":[
                           {
                             "icon box":[ 89, 177.50, 14, 14 ]
                           },
                           {
                             "annotation box":[ 53.55, 165.50, 84.91, 10.50 ] 
                           }
                           ],
                           "info": [
                             {
                               "PLACE NAME":"Brandenburg Gate", 
                               "PLACE CATEGORY":"Historical Monument", 
                               "PLACE ID":"800842663"
                             }
                          ]
                      }
                  ]
      }
}

The response provides the information that the Brandenburg Gate has the category Historical Monument. According to the /meta/pois resource, pois specifies the hexadecimal bitmask that creates the filter.

Request

In this request pois specifies how to filter for the desired POI category:

https://2.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/normal.day/20/563254/343903/256/png8
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&pois=000000001

Response

This request results in the following image that contains the POI icon for the Brandenburg Gate.

Figure 2. Center of Berlin showing the filtered POI Category