public abstract static class MapboxRouteTiles.Builder
extends java.lang.Object
BoundingBox
, and a version.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract MapboxRouteTiles.Builder |
accessToken(java.lang.String accessToken)
Required to call when this is being built.
|
abstract MapboxRouteTiles.Builder |
baseUrl(java.lang.String baseUrl)
Optionally change the APIs base URL to something other then the default Mapbox one.
|
abstract MapboxRouteTiles.Builder |
boundingBox(com.mapbox.geojson.BoundingBox boundingBox)
The bounding box of which to download map route tiles.
|
MapboxRouteTiles |
build()
This uses the provided parameters set using the
MapboxRouteTiles.Builder and first checks that all
values are valid, and creates a new MapboxRouteTiles object with the values provided. |
abstract MapboxRouteTiles.Builder |
clientAppName(java.lang.String clientAppName)
Base package name or other simple string identifier.
|
abstract MapboxRouteTiles.Builder |
interceptor(okhttp3.Interceptor interceptor)
Adds an optional interceptor to set in the OkHttp client.
|
abstract MapboxRouteTiles.Builder |
networkInterceptor(okhttp3.Interceptor interceptor)
Adds an optional network interceptor to set in the OkHttp client.
|
abstract MapboxRouteTiles.Builder |
version(java.lang.String version)
The version of map tiles being requested.
|
public abstract MapboxRouteTiles.Builder boundingBox(@NonNull com.mapbox.geojson.BoundingBox boundingBox)
boundingBox
- of which to download map route tilespublic abstract MapboxRouteTiles.Builder version(@NonNull java.lang.String version)
MapboxRouteTileVersions
API.version
- of which to downloadpublic abstract MapboxRouteTiles.Builder accessToken(@NonNull java.lang.String accessToken)
ServicesException
will be thrown.accessToken
- Mapbox access token, You must have a Mapbox account inorder to use
the Route Tiles APIpublic abstract MapboxRouteTiles.Builder baseUrl(@NonNull java.lang.String baseUrl)
baseUrl
- base url used as end pointpublic abstract MapboxRouteTiles.Builder clientAppName(@NonNull java.lang.String clientAppName)
clientAppName
- base package name or other simple string identifierpublic abstract MapboxRouteTiles.Builder interceptor(okhttp3.Interceptor interceptor)
interceptor
- to set for OkHttppublic abstract MapboxRouteTiles.Builder networkInterceptor(okhttp3.Interceptor interceptor)
interceptor
- to set for OkHttppublic MapboxRouteTiles build()
MapboxRouteTiles.Builder
and first checks that all
values are valid, and creates a new MapboxRouteTiles
object with the values provided.com.mapbox.core.exceptions.ServicesException
- when a provided parameter is detected to be incorrect