Mapbox Mobile lets you style every element of the map to your exact specifications. Making a map that matches your company’s identity and that looks great is simple, but it’s also possible to push custom styling much further.
You can use mobile device sensors to dynamically change the presentation of your map to best suit the user’s circumstances and surrounding environment. We’ve connected the iPhone’s ambient light sensor to Mapbox Mobile for an example of day- and night-style navigation system modes.
The brightness indicator moves right along the slider as the ambient light becomes stronger. When the indicator passes the user-set threshold (the circular knob), the map style automatically switches to Light, which is designed to be more legible under intense sunlight or other bright conditions.
As the device is moved away from the light source, the indicator moves left and the style switches back to Dark.
We’re really excited about the infinite possibilities of vector-based maps, especially on sensor-rich devices like smartphones. Let us know @Mapbox what amazing (or bizarre!) sensor-based styles you’re able to come up with.
Check out the code for this demo on GitHub and feel free to contribute or use it in your projects.