Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mapbox/mapbox-gl-native-android
Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
https://github.com/mapbox/mapbox-gl-native-android
android c-plus-plus geojson java map mapbox mapbox-gl maps opengl openstreetmap vector-tiles
Last synced: 3 months ago
JSON representation
Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
- Host: GitHub
- URL: https://github.com/mapbox/mapbox-gl-native-android
- Owner: mapbox
- License: other
- Archived: true
- Created: 2019-10-08T15:52:14.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-21T13:46:32.000Z (over 1 year ago)
- Last Synced: 2024-09-25T22:33:53.575Z (3 months ago)
- Topics: android, c-plus-plus, geojson, java, map, mapbox, mapbox-gl, maps, opengl, openstreetmap, vector-tiles
- Language: Java
- Homepage: https://mapbox.com/mobile
- Size: 9.1 MB
- Stars: 218
- Watchers: 113
- Forks: 114
- Open Issues: 147
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Code of conduct: CODE-OF-CONDUCT.md
Awesome Lists containing this project
README
# [Mapbox Maps SDK for Android](https://www.mapbox.com/android-sdk/)
The latest version of Mapbox Maps SDK is now available at [mapbox/mapbox-maps-android](https://github.com/mapbox/mapbox-maps-android). This version offers superior performance, features, and developer experience, and is the recommended mobile SDK solution for all Mapbox customers.
Mapbox maintains this repo to address bug fixes and security vulnerabilities. Please note that this project will cease to receive updates, including compatibility and bugfixes, after April 4, 2023. [Here is a helpful guide](https://docs.mapbox.com/android/maps/guides/) about our latest SDK features and how to migrate to our latest version.
[![Circle CI build status](https://circleci.com/gh/mapbox/mapbox-gl-native-android/tree/master.svg?style=shield)](https://circleci.com/gh/mapbox/mapbox-gl-native-android/tree/master)
[![](https://www.mapbox.com/android-docs/assets/overview-map-sdk-322-9abe118316efb5910b6101e222a2e57c.png)](https://docs.mapbox.com/android/maps/overview/)
The Mapbox Maps SDK for Android is a library based on Mapbox GL Native for embedding interactive map views with scalable, customizable vector maps onto Android devices.
## Getting Started
This particular README is for people who are interested in working on and improving the Maps SDK for Android. If you're looking for more general information and instructions on the Maps SDK:
Visit [https://docs.mapbox.com/android/maps/overview](https://docs.mapbox.com/android/maps/overview/) to see current documentation on the Maps SDK for Android.
Visit [https://docs.mapbox.com/android/api/map-sdk](https://docs.mapbox.com/android/api/map-sdk/) to view the Maps SDK's current API reference Javadoc files.
See [the Mapbox website's Android install flow](https://www.mapbox.com/install/android/) to install and use the Mapbox Maps SDK for Android in an application.
### Setup environment
These instructions are for developers interested in making code-level contributions to the SDK itself. If you instead want to use the SDK in your app, see above.
#### Getting the source
Clone the git repository and pull in submodules:
```bash
git clone [email protected]:mapbox/mapbox-gl-native-android.git && cd mapbox-gl-native-android
git submodule update --init --recursive
```#### Installing dependencies
- Latest stable [Android Studio](https://developer.android.com/studio/index.html) and Android SDK.
### Opening the project
Open the root folder of this repository in Android Studio.
### Project configuration
#### Setup Mapbox Access token for dependency download
Add a Mapbox access token with scope set to `DOWNLOADS:READ` in the root `build.gradle`.
```groovy
allprojects {
repositories {
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = "INSERT_MAPBOX_ACCESS_TOKEN_HERE"
}
}
}
}
```#### Setup Checkstyle
Mapbox uses specific IDE settings related to code and check style.
See [checkstyle guide](https://github.com/mapbox/mapbox-gl-native-android/wiki/Setting-up-Mapbox-checkstyle) for configuration details.##### Setup Mapbox Access Token for Mapbox vector tiles
_The test application (used for development purposes) uses Mapbox vector tiles, which require a Mapbox account and API access token. Obtain a free access token on the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/)._
With the first gradle invocation, gradle will take the value of the `MAPBOX_ACCESS_TOKEN` environment variable and save it to `MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml`. If the environment variable wasn't set, you can edit `developer-config.xml` manually and add your access token to the `mapbox_access_token` resource.
### Additional resources
#### Symbolicating native crashes
When hitting native crashes you can use ndk-stack to symbolicate crashes.
More information in [this](https://github.com/mapbox/mapbox-gl-native-android/wiki/Getting-line-numbers-from-an-Android-crash-with-ndk-stack) guide.