public abstract class MapboxMapMatching extends com.mapbox.core.MapboxService<MapMatchingResponse,MapMatchingService>
The Mapbox Map Matching API snaps fuzzy, inaccurate traces from a GPS unit or a phone to the OpenStreetMap road and path network using the Directions API. This produces clean paths that can be displayed on a map or used for other analysis.
Modifier and Type | Class and Description |
---|---|
static class |
MapboxMapMatching.Builder
Builds your map matching query by adding parameters.
|
Modifier | Constructor and Description |
---|---|
protected |
MapboxMapMatching() |
Modifier and Type | Method and Description |
---|---|
protected abstract java.lang.String |
baseUrl() |
static MapboxMapMatching.Builder |
builder()
Build a new
MapboxMapMatching object with the initial values set for
baseUrl() , profile() , geometries() , and user() . |
void |
enqueueCall(retrofit2.Callback<MapMatchingResponse> callback)
Wrapper method for Retrofits
Call.enqueue(Callback) call returning a response specific
to the Map Matching API. |
retrofit2.Response<MapMatchingResponse> |
executeCall()
Wrapper method for Retrofits
Call.execute() call returning a response specific to the
Map Matching API. |
protected com.google.gson.GsonBuilder |
getGsonBuilder() |
protected retrofit2.Call<MapMatchingResponse> |
initializeCall() |
protected com.google.gson.GsonBuilder getGsonBuilder()
getGsonBuilder
in class com.mapbox.core.MapboxService<MapMatchingResponse,MapMatchingService>
protected retrofit2.Call<MapMatchingResponse> initializeCall()
initializeCall
in class com.mapbox.core.MapboxService<MapMatchingResponse,MapMatchingService>
public retrofit2.Response<MapMatchingResponse> executeCall() throws java.io.IOException
Call.execute()
call returning a response specific to the
Map Matching API.executeCall
in class com.mapbox.core.MapboxService<MapMatchingResponse,MapMatchingService>
java.io.IOException
- Signals that an I/O exception of some sort has occurredpublic void enqueueCall(retrofit2.Callback<MapMatchingResponse> callback)
Call.enqueue(Callback)
call returning a response specific
to the Map Matching API. Use this method to make a directions request on the Main Thread.enqueueCall
in class com.mapbox.core.MapboxService<MapMatchingResponse,MapMatchingService>
callback
- a Callback
which is used once the MapMatchingResponse
is
created.@NonNull protected abstract java.lang.String baseUrl()
baseUrl
in class com.mapbox.core.MapboxService<MapMatchingResponse,MapMatchingService>
public static MapboxMapMatching.Builder builder()
MapboxMapMatching
object with the initial values set for
baseUrl()
, profile()
, geometries()
, and user()
.MapboxMapMatching.Builder
object for creating this object