Mobile Maps SDK

The Mobile Maps SDKs power the most compelling map experiences available on iOS and Android. Version 10 brings new capabilities, amazing performance and a modern developer experience.

Faster than ever

v10 makes our industry-leading map performance even faster. Map loads are 25-40% faster in real-world scenarios. Bandwidth requirements are cut by up to 18% when using local fonts.

BOSTON ZL9
SAN FRANCISCO ZL14
TOKYO ZL13
V10
legacy

25-40%
faster in real-world scenarios

18%
achievable bandwidth savings

Three dimensions in eight lines of code

Enabling 3D terrain is amazingly simple. Smart default gesture support provides intuitive interaction in two dimensions or three.

A new way to experience the world

Seamlessly wrap your map into a 3D globe at low zooms for a more intuitive and realistic experience, with full styling control over the look and feel of the stars and atmosphere.

Localize your mobile maps with internationalization

Reduce custom styles, save time, and deliver mobile maps to a global audience based on the system level settings for local language and worldview. 34 languages and eight worldviews supported. Internationalization is currently in Private Preview. If you’d like access to the feature please reach out to your Account Manager or contact us.

Read more

Get the perfect shot

New camera capabilities let you show users every inch of map that you want to highlight--and do it in ways they’ve never seen before. Integration with platforms’ native animation systems means your scenes will be performant and familiar to design.

Less code == fewer bugs

A refactored and modular architecture reduces the need for boilerplate and the potential for developer error. A new domain-specific language makes working with styles more intuitive.

class SimpleMapActivity : AppCompatActivity() {  
    
  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_simple_map)
    mapView.getMapboxMap().loadStyle(
      style(Style.MAPBOX_STREETS) {
        +image("test-image") {
          bitmap(BitmapFactory.decodeResource(resources, R.drawable.red_marker))
        }
‍        +geoJsonSource("source-id") {
          geometry(Point.fromLngLat(0.0, 0.0))
        }
        +symbolLayer("symbol-layer-id", "source-id") {
          iconImage("test-image")
          iconOpacity(0.8)
          iconAllowOverlap(true)
          iconSize(0.9)
        }
      }
    )
  }

  override fun onStart() {    
    super.onStart()
    mapView.onStart()  
  }  
    
  override fun onStop() {    
    super.onStop()    
    mapView.onStop()  
  }  

  override fun onLowMemory() {         
    super.onLowMemory()         
    mapView.onLowMemory()  
  }

  override fun onDestroy() {         
    super.onDestroy()    
    mapView.onDestroy()  
  }
}

Modern foundations

A complete rewrite in Kotlin and Swift ensures a seamless experience for developers. v10 also brings support for emerging standards like SPM and Metal.

"Swift" logo.
"Kotlin" logo.
"Metal API" logo

Tested & trusted

"AccuWeather" logo.

Maps are an integral part of the entire AccuWeather experience. The Mapbox Maps SDKs helped streamline development cycles and enabled AccuWeather to consolidate from six different mapping providers to just one.

Explore the showcase
"All Trails" logo.

With 100,000 trails, reviews, and photos from 10 million outdoor enthusiasts, AllTrails is working to build the largest collection of hand-curated trail guides to help everyone explore the outdoors with confidence.

Explore the showcase
"Lonely planet" logo

Lonely Planet uses Mapbox’s platform to help travelers discover where to go by plotting areas of interest in the Trips App.

Explore the showcase
"Roadtrippers" logo.

If you can’t wait to get on the road again, Roadtrippers gets you off the beaten path, going places that you’ve never been, and seeing things that you may never see again.

Explore the showcase
"Strava" logo.

If it's been run or ridden, it's on Strava. Every activity is projected on a totally custom, modern-minimalistic map style designed to highlight the details runners and cyclists love to see.

Explore the showcase
"Suunto" logo.

Whether you're exploring the highest peaks or just out for a neighborhood jog, the Suunto App on iOS and Android makes every move count.

Explore the showcase
"Zenly" logo.

With an interactive map, Zenly lets you see exactly where friends are and use our directions tools to meet up with them - all without leaving the app.

Explore the showcase

Getting Started

How to get started with the Mapbox Mobile SDKs.

Migration Guide

Resources for upgrading your app to v10.

API Docs

Detailed documentation for Android and iOS.

Example Code

A growing list of recipes for common tasks using the Mapbox Mobile SDKs.

Source Repos

Dig into the SDK code on Github.

Frequently Asked Questions

What is v10?

v10 is the latest version of the Mapbox Maps SDK for iOS and Android. It succeeds the 6.x line on iOS and the 9.x line on Android. v10 brings substantial performance improvements; new features like 3D terrain and a more powerful camera; modern technical foundations; and a better developer experience.

How much faster is v10?

Using real-world map styles and locations, v10’s overall Time To Render Completion (TTRC) is typically 25 to 35% faster than earlier versions of the SDK on iOS and 25 to 40% faster on Android.

What is v10’s impact on network efficiency?

Thanks to local glyph capabilities and other optimizations, v10’s bandwidth requirements for initial map load can be up to 18% smaller than earlier versions of the SDK. Glyphs are the individual symbols that comprise a font. The Mapbox platform gives users deep control over the fonts used in a map style. Typically, those fonts must be downloaded along with the map style. These resources can be a significant portion of initial network activity, particularly for CJK fonts with large character sets.

v10 includes support for local glyphs--the already-downloaded font characters made available by the mobile operating system in accordance with its locale. Using local glyphs avoids the need to download fonts, which can result in substantial efficiency gains.

How does v10 improve caching?

Efficient map rendering depends upon multiple types of resource caching. Earlier versions of the Maps SDK employed basic heuristics to determine what to cache, when, and for how long. v10’s new predictive ambient cache examines how the map is being used--including everything from coarse heading to search activity--to make better guesses about what resources should be fetched for future use. Resources are retrieved with less network overhead and improved tolerance for intermittent connectivity. And cache expiration has been improved to boost efficiency and ensure that maps, navigation and other services stay in sync as data is updated.

What 3D capabilities are available in v10?

v10 includes 3D terrain and skybox support, as well the new globe view API on a preview basis. In order to unlock the full potential of 3D, these new features are paired with a new and more powerful camera system.

Additional 3D capabilities are under development and will be announced by email and blog as they become available.

What can the new camera system do?

Prior versions of the Maps SDK included support for basic animations with easing, including simple panning, rotation, pitch, and the parabolic flyTo method. These methods remain available, but are now augmented with support for complex transformations through 3D space. Advanced camera support is integrated with the native iOS and Android animation frameworks, providing a familiar experience for developers and a performant one for end users.

How has v10 been optimized for navigation?

Navigation use cases have been prioritized throughout the development of Maps SDK v10. Label positions are more stable as the camera follows a route. A new approach to tile loading when viewing the map at high-pitch orientations improves efficiency and level of detail. Support for nine-part images reduces highway shields’ storage impact and improves their flexibility. A predictive caching system preloads resources intelligently when a trip is underway. The user location puck has been rewritten to be more accurate and flexible--in 2 or 3 dimensions. And optimized distance and within expressions provide highly performant feature filtering along routelines. These and other improvements combine with the Mapbox Navigation SDK to provide a superb nav experience.

What is the Snapshotter and how has it been enhanced?

The Maps SDK Snapshotter provides programmatic methods for generating static images of rendered maps. These images are often used in apps for thumbnails, previews, or in other circumstances where the full capabilities of a Mapbox Map instance are not required. Snapshotter is broadly comparable to the Mapbox Static Images API, but it consumes more local resources and has fewer styling limitations. In v10, the Snapshotter has become even more powerful, adding support for capturing runtime styling changes to the map.

What is Metal? How do I use it with Mapbox Maps?

Metal is an Apple API for interfacing with GPUs. It is the successor to OpenGL on Apple platforms. Metal fills the same functional role as OpenGL, but offers substantially improved performance and a more efficient interface to underlying hardware.

Apple deprecated OpenGL support in summer 2018. Since that time, iOS and Mac developers have been strongly encouraged to begin using Metal, in anticipation of Apple products ceasing to support OpenGL. A specific date for the end of OpenGL support has not been announced, but the current deprecation period has already lasted longer than many observers expected. By using the Maps SDK v10, your maps will render with Metal and be fully supported for your iOS users now and into the future. Unlike some competing SDKs, v10's Metal support is not based on an inefficient translation layer that rewrites OpenGL calls into Metal: it's designed from scratch to fully unlock this technology's potential.

If you upgrade to the Maps SDK v10 for iOS, Metal support will be automatically enabled for your end users. No other changes are necessary unless you have implemented custom OpenGL layers by using the MGLOpenGLStyleLayer API. If you have, those layers must be ported to Metal using the Maps SDK’s MGLMetalStyleLayer API.

Does the Maps SDK v10 support both Metal and OpenGL?

Not on iOS. The iOS SDK v10 only supports Metal. Metal is supported on all devices that use Apple A7 chips and newer (iPhone 5S, 5SE, iPhone 6 and later, as well as iPad Air, iPad Mini 2, iPad Mini 3 and later), which make up over 99% of all active iOS devices. It is not available on the iPhone 5 or iPad 4 (less than 1% of all active iOS devices). We will continue to support the legacy Maps SDK for iOS with OpenGL rendering only.

Metal is only available on Apple devices. The Android SDK v10 continues to use OpenGL.

How has support for working with styles been improved?

Although undeniably powerful, manipulating styles and Mapbox Expressions was a sometimes awkward experience for developers using earlier versions of the SDK. In v10, a domain-specific language (DSL) improves the experience of changing styles on both iOS and Android. By melding the JSON of the Mapbox Style Specification with familiar primitives from each platform, these DSLs ensure that Swift and Kotlin developers will find the experience of working with styles and expressions much more intuitive than in the past.

How does v10 reduce crashes?

The Maps SDK v10 substantially reduces crashing behavior in two ways: architectural changes that improve object lifecycle handling and remove common sources of error; and capturing all C++ exceptions so that they can be properly handled.

How has object lifecycle handling been improved?

The Maps SDK v10 has removed one of the biggest pitfalls in the Legacy SDK: object lifecycle errors. Previously, the SDK implemented Style, Layer, and Source objects that mirrored the same objects in the core C++ library. In C++, Layer and Source objects belonged to the Style object, which could be reset in ways that resulted in stranded Layer and Source objects in the SDK. In the Maps SDK v10, everything is handled in the Map object so that style changes do not result in dangling pointers, crashes, or other lifecycle issues.

How has exception handling been improved?

The Maps SDK v10 captures all C++ exceptions from the core library, preventing them from leaking to the platform. Leaky exceptions are problematic because they can cause crashes and because they typically provide insufficient detail for developers working to identify the root problem.

How is the Maps SDK v10 distributed?

The Maps SDK v10 for iOS is published on the Mapbox website and via Swift Package Manager and Cocoapods. The Maps SDK v10 for Android is published via Maven.

How is the Maps SDK v10 licensed?

The Mapbox iOS SDK v10 is available to customers for distribution in their applications according to the Mapbox Terms of Service.

Where is the source code for the Maps SDK v10?

You can find Maps SDK v10 source code for iOS and Android at https://github.com/mapbox/mapbox-maps-ios and https://github.com/mapbox/mapbox-maps-android, respectively.

What is the minimum deployment target for v10?

For Apple devices, the minimum deployment target for Maps SDK v10 is iOS 11. For Android, the minimum deployment target for Maps SDK v10.0 is Android API level 21 (Lollipop).

Does Mapbox continue to support earlier versions of the SDK?

Yes. To avoid disruptions for customers and users during the migration to v10, the legacy Object-C and Java SDKs are still supported at this time.

Which features will be backported to earlier versions of the SDK?

The legacy Maps SDKs will continue to receive bugfixes. We may also publish compatibility changes to ensure that customers who are unable to quickly transition to v10 do not experience regressions. However, most new functionality will not be backported to the legacy Maps SDK. We encourage customers to begin planning their upgrade to v10 as soon as possible.

Can I use my own Tile/Fonts/Icons/Styles APIs with Maps SDK v10?

Yes. You can use the Mapbox Maps SDK with one or more map resources (tiles, fonts, icons, styles, etc.) served via your own APIs for a variety of use cases, whether that’s running an application on a private network or integrating with legacy or custom application implementations.

Can I authenticate against my own API with the Maps SDK v10?

Yes. By replacing the default HTTP network requestor with a custom implementation, you can add custom authentication headers or modify requests as necessary to authorize requests against your own service. Doing so will not interfere with the SDK’s ability to validate your Mapbox token for use with our services.

Will my users still be counted as MAUs if I use my own custom APIs with Maps SDK v10?

Yes. Any active installed instances of the Mapbox Maps SDK that renders a map is tracked as a Mobile Active User for metering and billing purposes.

How much does the Maps SDK v10 cost?

Pricing for the Maps SDK v10 release is consistent with recent releases of our mobile SDKs. We have a large free tier allowing up to 25,000 monthly active users (MAUs). For pricing beyond 25,000 users, please see the pricing calculator on https://www.mapbox.com/pricing/.

Can I use the Maps SDK v10 from Objective-C?

Not directly. If your iOS application is written in Objective-C, you will need to write a Swift compatibility shim for those parts of the public API that your application uses. This is because the SDK uses pure Swift constructs that cannot be used from Objective-C directly, for example, associated enums, default values, the `Result type` and similar.