Java SDK
Current version:v7.3.1
View changelog
- Global directions
- Travel time matrix for multiple points
- Geocoding V5 and V6
- Map matching
- Fastest route between multiple points
- Static map images
- Snap traces to road network
- Geospatial analysis
- Isochrones
The Mapbox Java SDK is an open-source toolkit for building Java and Android projects that require geospatial features like directions, geocoding, static map images, and spatial calculations. It provides convenient methods for accessing Mapbox Web Services APIs, as well as classes for handling GeoJSON spatial data and helper functions for client-side spatial processing. While it utilizes AndroidX annotations , it does not rely on the Android SDK API, making it versatile for various Java applications.
Available packages
Here are the current Java SDK dependencies that you can use in your Android or Java project.
GeoJSON: Java classes that model the GeoJSON spec, for defining vector geometries like Points, Linestrings, Polygons, and Features.
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-geojson:7.3.1'
Services: Convenient wrappers to interact with Mapbox's Web services APIs: Matrix, Geocoding, Tilequery, Optimization, Static Image, Map Matching, and Isochrone.
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:7.3.1'
Turf: A java port of the turf.js library for client-side geospatial processing.
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:7.3.1'
Core: Color, text, and networking utility classes.
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-core:7.3.1'
Access tokens
You will need to have a Mapbox access token if you plan to use any of the features of the Services package, as these all request resources from Mapbox APIs. An access token is not needed if you plan to use GeoJSON, Turf, or certain parts of the Core package.
Learn more about how Mapbox access tokens work.
Support and contributions
- For support using the Java SDK, browse Stack Overflow or contact support.
- For reproducible bugs and feature requests, open an issue in the Java SDK's GitHub repository.
- To contribute to this project, see the contributing guidelines on GitHub.