OsmAnd+ and Traffic Data

I've been using OsmAnd+ for satellite navigation in the car for the longest time – it was a viable option for satnav on Sailfish OS (with its Android runtime), and even now that I treated myself to a used-but-rebuilt Google Pixel 8 with GrapheneOS and could theoretically use Google Maps, I prefer not to volunteer my movement data to Google. OsmAnd+ is nice because it works from offline maps and your movements aren't tracked, but OTOH it is missing Google Maps' dynamic routing that takes into account traffic jams and other holdups.

So one question that has been at the back of my mind for some time is whether OsmAnd+ will ever get a similar capability. The TL;DR is not anytime soon, apparently – but in the meantime it is, in fact, possible to get traffic data from Google and overlay it on the OsmAnd+ maps. This will not cause OsmAnd+ to route around traffic jams ahead of you, but you will at least have a chance to see where the hot spots are and avoid them on your own (and OsmAnd+ will of course notice if you leave the proposed route, and figure out a new one for you automatically). Of course, the Google traffic jam info is built from the movement data that Android users send to Google, so using the Google traffic data overlays without actually sending one's own data to Google in return is a form of freeloading, but given the fact that Google doesn't think twice about grabbing as much data from its users as they can get away with, I'm not losing any sleep about this. (The nice thing about GrapheneOS is that, even though it is a version of Android, it tries to not send any data to Google at all.)

Having got that sorted, here's how to enable Google traffic data in OsmAnd+:

  1. Go to the Extensions screen and enable the Online Maps extension.
  2. Go to the Maps and Resources screen and find and select the Map Sources entry. Use the three-dot menu at the top right to add an “Online Map source” with the following settings:
    • Name: Whatever you like, e.g., Google Traffic.
    • URL: Use https://mts0.google.com/vt/lyrs=h,traffic&x={1}&y={2}&z={0}&style=3 ; Note that there is a comma (not a period) between h and traffic.
    • Zoom Levels: I use 1–14 – it doesn't make a huge amount of sense to add traffic data to very zoomed-out maps.
    • Expiry: 5 (minutes) sounds about right to me.
    • Mercator Projection: Use Pseudo Mercator Projection (the default)
    • Storage Format: Use One file per tile (the default)
  3. Enable the overlay map by selecting the map profile you want (such as “Car”), then going to the Configure Maps screen and scrolling down to the Overlay Map item. Use the switch to enable the overlay map, then pick the Google Traffic map source you just created as the actual Overlay Map. Set the transparency to something you find suitable (something like 60% looks OK to me – if you set it too high, the roads become frayed because the Google data is pixel-based). You can also enable the transparency slider, which will be displayed on the map so you can adjust the transparency in real time (which is useful to find a nice setting). The Show map symbols item should be left off.

There you are! It's not quite as convenient as Google Maps, but it won't send any location data to Google (all it does is pull image tiles) and will at least give you a general idea of which stretches of road to avoid, or, if you end up stuck in a traffic jam, how far it seems to be until it lets up.