UPDATE:  Effective March 1st, 2025, Google has updated the Directions API library to legacy status and has replaced it with the new Routes API.  The replacement Routes API is changing their billing structure from an included $200 credit, to limits per API. Full pricing details on the Routes API can be seen at the Google Maps Pricing Page.


TABLE OF CONTENTS


With your Custom Screen and Paid DAKboard Subscription, you can use the Traffic & Transit Times Block. To use the Traffic integration with your DAKboard Paid Subscription and Custom Screens, you'll need to provide a Google API Key. This article will show you how to add your block, get a Google API Key, and configure your block. 



Adding the Traffic & Transit Times Block:


To add the Traffic & Transit Times Block, open your Custom Screen Editor, click on the Add A Block button, open the Transportation & Maps section, or search for Traffic & Transit Times. See below:



Position your block, then follow the steps below to create your Google API Key.


Create a Google API Key:


Open https://console.cloud.google.com/apis/credentials and log in or create an account if necessary. Once logged in, click on the Create Credentials button and select the API key.


Note: You may need to create a project first. Complete this step if prompted to do so.



Next, you'll be presented with a pop-up containing your API key:



Copy this key to your clipboard, then go back to your DAKboard account and edit the traffic block on your custom screen. Paste the API key into the Google API Key field: 




Enable the Directions/Routes API:


Back in the Google console, enable the Directions/Routes API here:


https://console.cloud.google.com/apis/library/routes.googleapis.com


Click the enable button for (Directions/Routes):




Add Billing Information: 


Lastly, to use the Google API, you will need to add billing information to your Google account. You can do so here: https://console.cloud.google.com/billing.  Normal usage for a single route in DAKboard is expected to make roughly 1500 API calls monthly.


Until March 1st 2025, Google will use a Legacy $200 free usage monthly, each API call consumes 0.005 USD.


You must have a valid API key and a billing account to access our APIs. When you enable billing, you will get $200 free usage every month for Maps, Routes, or Places. Based on the millions of users using our APIs today, most of them can continue to use Google Maps Platform for free with this credit. Having a billing account helps us understand our developers’ needs better and allows you to scale seamlessly.


This $200 monthly credit is more than enough to use the Traffic data on DAKboard.


Effective March 1st, 2025, Google's is changing their billing structure from an included $200 credit, to limits per API.  Full pricing details can be seen at the Google Map Pricing Page.  The traffic route API includes 10,000 API calls monthly.


Additional Optional Configurations:

Add Restrictions to the API key for Added Security:


While not necessary, it is recommended to restrict your API key for use only with the Directions/Routes API. You can do this in your Google account by editing the API key (click the pencil icon). Under the API Restrictions tab, you can specify access to only the Directions/Routes API:




Save your changes, and it will be effective within 5 minutes. 



Traffic Settings Tab:


The Traffic Settings tab is where you will enter the Google API Key, name your Block, and set up the route you want information on. See below:



These settings are detailed below:


  • Google API Key: This is where you enter your API Key you generated above.
  • Name: This will be the Display Name for your Traffic & Transit Block.
  • Origin: This is where you enter your Starting Address.
  • Destination: This is where you enter the End Address.
  • Avoid: This will allow you to choose what kinds of routes to avoid. The options are below:
    • Tolls: Avoid all Toll roads if possible.
    • Highways: Avoid all Highways if possible.
    • Ferries: Avoid all Ferries if possible.
  • Route: This will present you with all available routes you can choose from to display the transit times. Use the Refresh Routes button to give you the latest options. 



Rules Tab:


With your Traffic & Transit Times Block, you have a Rules Tab, as seen below:




The Rules Tab can be used to add effects to your block. It uses an IF/THEN statement to accomplish this. As an example, you can use it to set colors to the Text of your Transit Times as follows:




In the example above, when your Transit Time value equals 10 minutes, your text color will be green, when it is 20, it will be yellow, and when it is 30, it will be red. You can modify this further by changing what the Transit Time matches for the IF statement, selecting different actions in the THEN statement, or even adding more THEN results with the AND button. See below:


  • IF Statement Value Matches:

  • THEN Statement Actions:



  • Additional THEN Actions:



This way, you can customize your results.



Formatting Tab:


The Formatting tab can make further changes to your block. See below:



These additions are detailed below:


  • Units: This allows you to select between Imperial (Miles) or Metric (KM) for your block.
  • Text: This allows you to select what font you want to use as well as the size, color, and positioning of the font in your block.
  • Background: This allows you to set a color, gradient, and blur effects for the background of your block.
  • Block Title: This allows you to put a title on your block for use with Custom CSS or just to organize your blocks in your editor. 



The Advanced dropdown menus. This links to special formatting you can do with your blocks. To learn more about this, check out our article Advanced Features of the Custom Screen Editor.



Schedule Tab:

This tab allows you to schedule when you can see this block. See our article Content Scheduling to learn how to use this tool.



Helpful Articles:


Having trouble?  See if these articles help.


How to Use the Custom Screen Live Editor
Advanced Features of the Custom Screen Editor

Content Scheduling