Skip to main content

Java SDK

Current version:v7.3.1View changelog

  • check
    Global directions
  • check
    Travel time matrix for multiple points
  • check
    Geocoding V5 and V6
  • check
    Map matching
  • check
    Fastest route between multiple points
  • check
    Static map images
  • check
    Snap traces to road network
  • check
    Geospatial analysis
  • check
    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

Was this page helpful?