Accessing Speed Limit Data via HERE Location Services

May 21, 2019

Speed Limit DataThe HERE APIs/SDKs are rich with data that can enhance your map-based application. When your mapping application is enabled by HERE Location Services it can do much more than track a GPS signal or provide routing information. Additional data can include weather, POIs (Places), traffic information and speed limits, just to name a few.

One piece of data that many app builders find particularly valuable is speed limits. Speed limit data has several applications, including calculating more accurate ETAs and tracking driver behavior to provide alerts when a driver has exceeded the posted speed limit.

Since ADCi is a licensed reseller of HERE Location Services (APIs/SDKs), customers often ask us about how to access available speed limit data. We’re happy to help by providing this example of how to get a speed limit using a Lat/Long location:

1. Do a reverse geocode to find the appropriate “referenceId” (the Link ID equivalent). Here is what that call looks like:<app_id>&app_code=<app_code>&gen=9&jsonattributes=1&language=en-US&locationattributes=linkInfo&maxresults=1&mode=retrieveAddresses&prox=41.884430,-87.638783,25

The results for this call contain referenceId = "776372180” and functionalClass = 4.

referenceId and functionalClass #1

2. Input the referenceId and functionalClass values into this call to determine the level and tile values:<app_id>&app_code=<app_code>&layer=ROAD_GEOM_FC4&attributes=LINK_ID&values=776372180

In this example, the level = 12, tile x = 2101, and tile y = 3001

referenceId and functionalClass #2

3. Input the level, tile x, and tile y values into this call to determine the speed limit for referenceId (Link ID) 776372180:<app_id>&app_code=<app_code>&layer=SPEED_LIMITS_FC4&level=12&tilex=2101&tiley=3001

By completing steps 1 through 3, you’ll find the speed limit for referenceId (LinkID) 776372180 is 48 kph or 30 mph.

Note: In order for the code to work the user has to input their own <app_id> and <app_code>.

Ready to get started with HERE Location Services? Contact ADCi today!

Contacts ADCi

Share This Article