I suppose this isn't exactly a new feature but it is new to me since I don't travel through tunnels very often. What exactly is the software using when it decides to switch over to night mode when in a tunnel? GPS Location? A light sensor? A combination of both?

  • simply from rich google map data.
    – yrajabi
    Sep 30, 2012 at 20:39
  • I don't think the map data on its own explains it--I travel all the time on the roads directly above without it switching. But yes, you couldn't do it with poor map data...just ask Apple! Oct 1, 2012 at 0:34
  • So, I think it uses also altitude value from GPS to determine whether you are in the tunnel or the road above it! As in its new feature, In-door navigation through some buildings, It uses altitude to determine in which floor you are (I'm not sure!).
    – yrajabi
    Oct 1, 2012 at 9:00
  • The last time I used the in-building navigation, you had to manually select the floor. I don't think it is using altitude, either that or I never have a lock on enough sats to derive an altitude value. I park below I-95 and I'm always being routed directly from I-95 instead of the city streets that are underneath it (where I start). I guess thats why I initially assumed altitude wasn't used. Oct 1, 2012 at 12:01

4 Answers 4


Hard to say without knowing which device and firmware version we're talking about, so what follows is my speculation.

I have a Garmin Nuvi which continues navigating in a tunnel, turns and all, despite losing its satellite reception. Mine doesn't switch to night mode, but it clearly knows it is in a tunnel from the map data. Since loss of reception is a given in a tunnel, the device must be dead-reckoning while it's in there. (Re-broadcasting is out because it would affect the signal timing which is key to calculating a fix). In fact, I have tested this by entering a tunnel fast and decelerating once inside it. The device alerted that it had lost reception and continued to display my entry speed, "passing" turnouts and the tunnel exit before I did.

From that, I inferred that the firmware was using map information, possibly cross-checked with loss of satellite lock, to know when I've entered a tunnel.

  • Hadn't thought about the satellite lock. So would it switch to night mode even if the tunnel was lit (I don't have a lighted nearby)? I guess I could put a flashlight on it. Oct 1, 2012 at 0:40

Recently I was driving in Italy and I realized that this Google Maps feature works more precise in Italy than in my home country Germany.

I tested it a little bit in Italy and I found the following:

  • it does not matter if the tunnel is lighted or not, it always goes into night mode
  • drive into a tunnel and keep the speed constant through the whole tunnel and it will work perfectly
  • accelerate in the tunnel, then it will turn off the night mode too late
  • reduce the speed in the tunnel, then it will turn off the night mode too early
  • stop in the tunnel for several minutes, then it will turn off night mode after a while and won't turn it on again

From these observations I conclude that in Italy it relies entirely on map data and approximates when you leave the tunnel only by the speed you drove before the tunnel.


Perhaps it uses the ambient light sensor in your phone and changes to night mode when there is less ambient light.

  • AFAIK, Google Maps doesn't use light sensors for tunnels and night mode. Sometimes I put my phone inside a bag or car compartment and it doesn't turn to night mode despite the darkness.
    – Andrew T.
    Sep 13, 2021 at 5:58

Easy solution to force night mode that I found.

  1. go to settings
  2. go to date and time
  3. disable automatic date and time.
  4. set your time to 7pm or later.

That should set the app to night mode you can change the time back when you're done traveling

(Galaxy S7. Version 7.0)

  • This doesn't answer how Google Maps detects when the user is inside a tunnel though.
    – Andrew T.
    Sep 13, 2021 at 5:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .