The Mapbox Maps SDK v10 is now ready for production use as a release candidate. The Maps SDK v10 offers 3D maps, improved performance, and a robust API for faster development and greater stability.
To start building with the Maps SDK v10, see the v10 documentation.
The Mapbox Maps SDK for Android is a toolset for displaying maps inside of your Android application.
Mapbox's demo app on the Google Play Store includes many examples of how to use the Mapbox Maps SDK for Android. The demo app and examples page will illustrate the power of the Mapbox Maps SDK for Android.
For information about migrating from older versions of the Mapbox Maps SDK for Android to newer ones, see:
- v8.x.x to v9.x.x: Applications implementing this version of the Maps SDK must support AndroidX.
- v7.x.x to v8.x.x: This version change improved the method for counting monthly active users. No migration guide is required, but you can read more about these changes in the changelog and the Pricing by products guide.
- v6.x.x to v7.x.x
- v5.x.x to v6.x.x
- v4.x.x to v5.x.x
You must include the Mapbox wordmark and attribution notice on any map that uses the Mapbox Maps SDK for Android. The SDK provides an attribution layout that includes all required information and can be customized either in xml or using the
You may adjust the position of the Mapbox wordmark and attribution notice, but they must stay visible on the map. You may also change the background and text color of the attribution notice to match your design aesthetics, but all information must be legible.
You may not otherwise alter the Mapbox wordmark or text attribution notice.
Learn more about what kinds of attribution Mapbox requires and why.
Mapbox Telemetry is a powerful location analytics platform included in this SDK. By default, the SDK sends anonymized location and usage data to Mapbox whenever the host app causes it to be gathered. The Mapbox Terms of Service require your app to provide users with a way to individually opt out of Mapbox Telemetry, which is provided automatically as part of the attribution control. If you hide the attribution control, you must provide an alternative opt out for your users to use.
XML attributes can be added inside of the XML
MapView to further customize map behavior, such as setting the starting camera position, enabling tilt, or adjusting the compass' location on the screen. All
MapView XML attributes start with
mapbox_ for identification and for removing any potential conflicts with other libraries. Due to the current implementation of Android Studio, you can't autogenerate
MapView attributes by typing. View the full list of
MapView attributes here.
Some examples of
MapView attributes are:
<com.mapbox.mapboxsdk.maps.MapView mapbox:mapbox_cameraTargetLat="-36.84" mapbox:mapbox_cameraTargetLng="174.76" mapbox:mapbox_cameraZoom="10" mapbox:mapbox_cameraBearing="34.33" mapbox:mapbox_cameraTilt="50.25" mapbox:mapbox_cameraZoomMax="12.41" mapbox:mapbox_cameraZoomMin="6" mapbox:mapbox_uiRotateGestures="false"/>
xmlns:mapbox="http://schemas.android.com/tools" to the XML file's root
ViewGroup element if you use any
MapView XML attribute.
Many parts of the Mapbox Maps SDK for Android are based on GeoJSON, an open standard file format for representing map data. Many Maps SDK methods take GeoJSON geometries as a parameter or return GeoJSON features. For example, the Maps SDK has a
GeoJSONSource class for adding data to a map style, and one helpful Maps SDK's querying method returns a list of GeoJSON
The Mapbox Java SDK's GeoJSON module provides GeoJSON support to the Maps SDK. Although it's not required to use the Maps SDK, becoming more familiar with GeoJSON will greatly enhance your understanding and usage of the Maps SDK. Make sure to read how to use the Java SDK's GeoJSON module with the Maps SDK.