How To: Map tile with real-time traffic

This has stopped working for me in the last few weeks. Any ideas why?

Do you mean the Bing Map API approach? Have you tried loading the URL directly in your browser and are you seeing any specific errors?

Have you tried the steps in the original post again? The map is provided by (Microsoft) Bing and the map maker is a third party tool, so I don’t have a whole lot of insights into how it works nor could I easily guess since I don’t personally use it.

1 Like

Yes, looks like the Bing Maps for enterprise APIs have been deprecated as of June 30th, resulting in the URL no longer working. There is some guidance on migrating over to Azure maps that I’ll have to look at further. If anyone has any instructions on how to do this that would be awesome!

1 Like

I’ve been looking for a way to create a traffic tile, but the method listed here is no longer a viable option. Is there a new way to do this? I appreciate the help!

This approach was originally documented by James as it was a neat way to display traffic data using a normal Media Tile, but now that we support Custom Tiles that opens up a much wider range of options.

Waze Traffic Map

For example, Waze offers an embeddable map that you can configure to fit your needs. And you can have it periodically refresh using the Refreshable URL Custom Tile in this thread so it’s displaying up-to-date traffic (though Waze recommends not going overboard with how often you refresh).

NY Traffic: https://embed.waze.com/iframe?zoom=12&lat=40.712775&lon=-74.005973

From a quick search, it seems like there’s a variety of parameters you can tweak:

  • lat/lon — center coordinates

  • zoom — zoom level (0-17)

  • pin=1 — show a pin marker

  • desc=1 — show description text

Change to Azure Maps

As Dmitri mentioned above, it looks like Bing Maps was transitioned to Azure Maps. I went through the setup process and it’s not nearly as straightforward as with the original Bing Maps Portal, but the high-level version was:

  1. Login or Create an Azure Account
  2. Ensure that account has an Azure subscription (eg. free trial)
  3. In the top search bar enter ā€˜maps’, then select Azure Maps Accounts
  4. Tap + Create and follow the prompts
    • I created a new Resource Group called Maps-Test and named my Instance Maps-Test-1 and left the default region and pricing tier, then hit Review + create to skip the various advanced settings
  5. After the resource is created, click Go to resource
  6. When viewing the Resource, tap the View Authentication and copy the Primary Key

Then you can use a URL like the following:

https://atlas.microsoft.com/map/static?subscription-key={YOUR_KEY}&zoom=10&tilesetId=microsoft.base.road&api-version=2024-04-01&center=-96.8900,33.0900&height=500&width=500&trafficLayer=microsoft.traffic.relative.main

:warning: I have not looked into the API limits closely, nor do I use this approach myself. From a brief search of their documentation, it looks like their free tier includes 1000 static map images per month, so it looks like an hourly refresh on a single dashboard would be supported with that.

Community Google Maps Approach

I don’t personally use it, but some community members have mentioned that they have had success searching for {My City} Traffic on Google and copying the image that is displayed. As noted in the linked thread, I don’t know how long the URLs last or their licensing restrictions or anything. The original ā€˜St Louis Traffic’ example from my 2020 reply still seems to be working 5~6 years later, but I don’t know if it accurately reflects the updated traffic or not.

Live Traffic Map - Google Search - Dynamic Image