3 ms·
Ask HN: How Google Maps detect if I am passing under the bridge?
I recently noticed when I was commuting using Grab that Maps changes to Dark mode when I'm passing under the bridge. I'm curious to know how it detects? Is it done using the phone sensors or satellite data?
- oscarcp 5y agoAs far as I know the default behaviour of Google Maps is to switch light/dark mode depending on the feedback from the light sensor next to the front camera, so basically as soon as it detects a lack of light, it will switch to dark mode.
- oscarcp 5y agoOne detail, not all phones have the light sensor in the top bezel, some phones like OnePlus 7 Pro have it integrated inside the fingerprint scanner, so depending on your phone the light sensor might be located somewhere else.
- olvias55 5y agothat's a good question, I thought it just detect your location on the map