Android PluginsLEGACY
- Show annotations on the map
- Add in-app place searching
- Load GeoJSON files onto the map
- Display traffic and 3D buildings
- Change the map's language
- Offline mapping
- Quickly add markers
- Visualize map scale
Mapbox Plugins for Android are built on top of the Maps SDK. They provide extra features in lightweight dependencies. Whether you're looking to include traffic on top of your map or show the user location as a layer, plugins offer customizable APIs with a few lines of code to get started. Separating features into different plugins also allows for a more aggressive updating timeline.
What are Mapbox Plugins?
Mapbox Plugins for Android are a collection of libraries that extend our Maps, Navigation, and Java SDKs for Android to help you integrate powerful mapping features into your applications. Use plugins to show a user's location, display traffic or building overlays, or search for places. With these plugins, you can pick the features that your app needs without losing the ability to customize; all bundled into lightweight dependencies.
By using a plugin, you also include the Maps SDK for Android which means that you'll need to set up your project to use the Maps SDK if you haven't already. Head over to the Maps SDK Getting Started documentation to learn more. The example below shows how to install the Traffic Plugin, but the process is the same for other plugins.
How plugins work
Mapbox plugins cover many of our SDKs for Android. They can be used together or separately depending on your needs. A brief summary of each plugin and its purpose is provided below:
- Annotation: Set and adjust the visual properties of annotations on a Mapbox map with minimal code.
- Building: Add 3D buildings to your map style with as few as two lines of code. Take this further by allowing users to toggle the layer visibility.
- Localization: Change the map's language based on the device's default language settings or other runtime variables.
- MarkerView: Add map markers that are Android system
View
s. - Offline: Download map tiles and view already-downloaded regions for offline mapping.
- Places: Add UI components such as a Place Picker or Autocomplete search built on top of the Mapbox Geocoding API. Each component includes an
intentBuilder
which starts an activity for results and returns a Carmen Feature. - Scale bar: Display numbers and a line to help visualize how far various map features are from one another at a certain zoom level.
- Traffic: Add realtime traffic data to your map.
Prerequisites
Before using any of the Mapbox Plugins for Android, you will need:
- The latest version of Android Studio.
- JDK version 7.0 or higher.
- A recent version of the Android SDK.
- Android API Level 14 or higher (Android 4.0.3 and above).
- A Mapbox access token.
Available documentation
- Guides. Each plugin has an associated guide which contains both technical descriptions about the plugin and its features, as well as, conceptual explanations of the different components and how they work together.
- Examples See the code in action inside of our demo app and use the source code as a good starting point for your project.
Maps SDK compatibility
The Mapbox Plugins for Android are heavily dependent on the major semantic versioning number of the Maps SDK. They either won't compile or hide runtime bugs when paired with a different major version of the Maps SDK. Each plugin's dependency name has a vX
suffix which states the major version of the Maps SDK that the plugin is compatible with. This suffix makes the transition between versions easier and more educated without the need to jump into changelogs and compare repositories.
Support and contributions
- If you are looking for support using this SDK, either reach out through Stack Overflow or through our contact page.
- If you find a bug and can provide steps to reliably reproduce it, open an issue in the /mapbox-plugins-android repository on GitHub and apply the bug label.
- If you have a feature request, open an issue in the /mapbox-plugins-android repository on GitHub, and apply the enhancement label.
- If you want to contribute, look over our contribution guidelines and open a pull request with your changes.