Venue Maps API Developer's Guide

Union Station Chicago using Models Full

This use case is a step-by-step guide to displaying Union Train Station in Chicago, IL, USA, using Models-Full resource.

Discover Venues in Chicago,IL, USA

In order to discover what venues are available in the city of Chicago, IL in United States of America, We are going to use HERE Geocoder API to determine the Longitudes, Latitudes of the top left point and the bottom right point of Chicago which represent the Bounding Box / Geographical Area that represents the city.

Figure 1. An illustration of the Bounding Box / Geographical Area of Chicago, IL, USA

Request to Geocoder API for Geographical Bounding Box of Chicago, IL, USA

http://geocoder.cit.api.here.com/6.2/geocode.xml?
  &app_id={YOUR_APP_ID}
  &app_code={YOUR_APP_CODE}
  &gen=8
  &searchtext=Chicago+USA

Based on the response, Under the MapView Element, The Bounding Box of Chicago is as follows:

<MapView>
        <TopLeft>
          <Latitude>42.02295</Latitude>
          <Longitude>-87.93948</Longitude>
        </TopLeft>
        <BottomRight>
          <Latitude>41.64459</Latitude>
          <Longitude>-87.52444</Longitude>
        </BottomRight>
</MapView>

By using the Bounding Box values returned by HERE Geocoder API we are going to send a request to Venue Maps API Discovery Service to discover the venues available in Chicago

https://discovery.venue.maps.cit.api.here.com/venues/discovery/v1
  ?app_id={YOUR_APP_ID}
  &app_code={YOUR_APP_CODE}
  &at=42.02295,-87.93948,41.64459,-87.52444

The result shows a large number of venues available

{
  "hostname" : "ip-10-96-40-53.eu-west-1.compute.internal",
  "totalHits" : 43,
  "forecastedHits" : 0,
  "bboxDiameter" : 54,
  "status" : {
    "code" : "200",
    "message" : "Ok"
  },
  "type" : "venues",
  "results" : {
    "items" : [{
        "id" : "DM_12886",
        "title" : "The Home Depot",
        "address" : {
          "countryCode" : "USA",
          "city" : "Chicago",
          "postalCode" : "60609",
          "street" : "S Western Blvd",
          "house" : "4555"
        },
        "position" : [-87.6828677, 41.8109771],
        "distance" : "4.798284499244405",
        "type" : "urn:nlp-types:venue",
        "vicinity" : "S Western Blvd 4555,60609,Chicago,USA",
        "size" : 1,
        "level" : "13",
        "minFloor" : 0,
        "maxFloor" : 0
      },  {
        "id" : "DM_12321",
        "title" : "Union Station Chicago",
        "address" : {
          "countryCode" : "USA",
          "city" : "Chicago",
          "postalCode" : "60661",
          "street" : "S Canal St",
          "house" : "225"
        },
        "position" : [-87.63970155, 41.87868805],
        "distance" : "9.138733185135166",
        "type" : "urn:nlp-types:venue",
        "vicinity" : "S Canal St 225,60661,Chicago,USA",
        "size" : 1,
        "level" : "13",
        "minFloor" : 0,
        "maxFloor" : 1
      }, ...
                 == CONTENT TRUNCATED ==
}

To Simplify the process, we are going to take Union Train Station as an example to proceed with, the steps explained starting from this point should be repeated for each venue.

Retrieving Full Model for Union Train Station

Based on the response of the discovery service, Union Train Station has a Venue ID of DM_12321, which we are going to use to send a request to models-full resource to retrieve all information for the venue.

http://static-3.venue.maps.cit.api.here.com/1/models-full/DM_12321.json?
  Policy={YOUR_GENERATED_POLICY}
  &Signature={YOUR_GENERATED_SIGNATURE}
  &Key-Pair-Id={YOUR_GENERATED_KEY_PAIR_ID}
  &app_id={YOUR_APP_ID}
  &app_code={YOUR_APP_CODE}

The result should be as follows:

{
  "content" : {
    "category" : {
      "id" : "public-transport",
      "nt" : "9707"
    },
    "placeId" : "",
    "names" : {
      "ENG" : "Union Station Chicago"
    },
    "addresses" : {
      "ENG" : {
        "postalCode" : "60661",
        "countryCode" : "USA",
        "houseNumber" : "225",
        "streetName" : "S Canal St",
        "district" : "IL",
        "city" : "Chicago"
      }
    },
    "type" : 1,
    "contentId" : "1177729"
  },
  "connectors" : [{
      "destination2" : "Lv25710Ds_1936574",
      "connectorClass" : "ESCALATOR",
      "destination1" : "Lv25711Ds_1936575"
    },.... == CONTENT TRUNCATED == 
  ],
  "ownerID" : "DM_Q4",
  "address" : ",USA,,,Chicago,IL,S Canal St,225,,60661,Union Station Chicago,,,",
  "levels" : [{
      "outerAreas" : [{
          "polygon" : [[41.87825912317281, -87.63950829994175], [41.87826168678344, -87.63931104493098],  ... ]],
          "spaces" : [{
              "content" : {
                "category" : {
                  "id" : "facility",
                  "source" : "36"
                },
                "searchTags" : ["Adams St exit", "Canal St exit", "Clinton St exit", "Jackson St exit", "mail box", "phones", "postage", "waiting area", "seating", "baggage lockers"],
                "placeId" : "",
                "names" : {
                  "ENG" : "Great Hall"
                },
                "addresses" : {},
                "contentId" : "1174701"
              },
              "polygon" : [[41.879020162825505, -87.6404487849516], [41.87900783828652, -87.64044849602021],.... ]],
              "accessorRefs" : [{
                  "direction" : "ENTER-EXIT",
                  "gml:id" : "acc25710_1614207"
                }, ....
              ],
              "gml:id" : "Lv25710Ds_1908894",
              "spaceId" : "Great Hall_Lv25710Ds_1908894",
              "routingGraph" : {
                "nodes" : [{
                    "point" : [41.87867133054623, -87.64024126138176],
                    "name" : "P1908894_17"
                  }, .... 
                ],
                "links" : [{
                    "link" : ["P1908894_1", "P1908894_acc25710_1614206"],
                    "gml:id" : "L1908894_0"
                  }, .... 
                ]
              },
              "accessorDistances" : [{
                  "distance" : 46,
                  "accessorRef" : "acc25710_1621520"
                }, ... 
              ],
              "isClosed" : false,
              "centroid" : [41.87866689755419, -87.64036876393982]
            }, ...
      "tiles" : [[269016, 389725], [269016, 389726], [269016, 389723], [269016, 389724], [269016, 389722], [269018, 389724], [269018, 389723], [269018, 389722], [269020, 389726], [269020, 389725], [269020, 389724], [269018, 389726], [269020, 389723], [269018, 389725], [269022, 389725], [269021, 389722], [269022, 389726], [269021, 389723], [269017, 389724], [269017, 389725], [269017, 389726], [269015, 389722], [269015, 389723], [269017, 389722], [269015, 389724], [269017, 389723], [269015, 389725], [269015, 389726], [269019, 389723], [269019, 389722], [269019, 389725], [269019, 389724], [269021, 389725], [269021, 389724], [269021, 389726], [269022, 389722], [269022, 389723], [269022, 389724], [269020, 389722]]
    }, {
      "outerAreas" : [{
          "polygon" : [[41.879180663132324,  .... 
      ],
      "tiles" : [[269019, 389723], [269019, 389722],  .... 
    }
  ],
  "groundLevel" : 0,
  "gml:id" : "DM_12321",
  "accessors" : [{
      "polygon" : [[41.87881543615436, -87.6387313914614], [41.87872023905603, -87.63873099947658]],
      "gml:id" : "acc25710_1614190",
      "preferred" : "false"
    }, .... 
  ],
  "centroid" : [41.878687949989924, -87.63970150019898]
}

Displaying Union Train Station

As the Full Model contains all the information needed to draw the venue, all the Points of Interest Information, in addition to the Routing Information; the resource could be freely used by any other platform/technology to Draw the venue and Make the venue interactive and Also to make routing inside the venue possible. All Venue Maps API Models could be retrieved in JSON format which is completely Language-independent.

A Sample of a client that uses Models-Full to display interactive Venue Maps is Yahoo! Please click to see Union Train Station on Yahoo!Maps

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.