From now on, your mobile maps can make subtle style changes in response to app conditions using runtime styling. This new feature is the focus of the next releases of our Android and iOS SDKs, available in beta today. All of the design flexibility available in our map design tools is now available at runtime, in code, using APIs that work just like the built-in frameworks that you are used to on mobile platforms.

We’ve been playing with this feature building a fun app called Lush that styles the map in response to the phone’s motion sensor data. The world is depicted as a gray and cracking wasteland until the user gets active. Walking or running makes the map lush and green. When the user stops moving, the world begins to decay again.

Inactivity leads to a decaying map

We’ve made use of two distinct map styles, along with a range of in-between values for colors, textures, and icon imagery. Runtime styling lets you adjust and update these smoothly in response to motion sensor data or other events happening on the phone or in the app.

Being active makes the map green again

This is an example of the power afforded by runtime styling combined with robust sensor APIs such as iOS’s Core Motion. Check out the code as an Xcode project that you can build for your own iOS device. You can choose between walking detection, running detection, and testing mode where you can just shake the device for a sampling of how it works.

We’d love to see what you build with our Android and iOS SDKs. Tweet us at @mapbox and show us what you’ve got!