Skip to main content

Runtime styling

A newer version of the Maps SDK is available

This page uses v6.4.1 of the Mapbox Maps SDK. A newer version of the SDK is available. Learn about the latest version, v11.3.0, in the Maps SDK documentation.

Mapbox’s runtime styling features allow you direct control over every layer in your maps with code. It’s now possible to create dynamic maps and visualizations that aren’t possible with other mobile maps SDKs.

What is runtime styling?

You can use the Mapbox Studio style editor to create completely custom map styles. Runtime styling expands upon the design power of Mapbox Studio and exposes all the same properties and attributes directly to mobile developers in our Maps SDK.

Change the look and feel of your map dynamically by updating its visual appearance based on user interaction or context. Leverage the power of OpenGL for highly performant and complex data visualizations. With the Mapbox Maps SDK, it’s possible to mix in your own data and bring your map to life.

Example use cases

As examples of what’s possible with runtime styling, consider some of the following use cases:

Styling maps dynamically

At runtime, you can tailor the map specifically to your user interface. Adjust colors, text, and icons to match the style to your brand.

For maps that aren’t going to change in response to custom data or user interaction, consider creating a custom map style with Mapbox Studio.

Map interactivity

You can customize the map to respond dynamically to the actions your users take. Increase the text size of streets while a user is driving, emphasize points of interest tailored to a user’s preferences, or change the UI if users are at parks, trails, landmarks, or rivers.

Powerful data visualization

Mapbox maps build on top of OpenGL and can support rendering data without the traditional overhead of UIView-based map annotations.

Mapbox can support data visualizations that were slow or impossible with traditional map SDKs. Render heatmaps, visualize population density, or even go so far as updating the snow levels in the mountains to match recent snowfall.

Powerful annotations

The Mapbox Maps SDK gives you access to all the same tools we use to render our default map styles. Instead of using generic pin markers, enrich your place data or custom polygons with icons and labels that make your maps stand out.

Custom shapes

Draw custom shapes on the map the same way you would a custom UIView or CALayer. These shapes keep their geographic scale and can visualize everything from indoor floor plans to metro systems to hurricane tracks.

Next steps

Explore the iOS code examples to learn more about how to use runtime styling in your own apps.

Learn more about map styles and runtime styling in the following resources: