Tabnine Logo
MapboxMapMatching
Code IndexAdd Tabnine to your IDE (free)

How to use
MapboxMapMatching
in
com.mapbox.api.matching.v5

Best Java code snippets using com.mapbox.api.matching.v5.MapboxMapMatching (Showing top 12 results out of 315)

origin: mapbox/mapbox-java

@Override
protected Call<MapMatchingResponse> initializeCall() {
 return getService().getCall(
  ApiCallHelper.getHeaderUserAgent(clientAppName()),
  user(),
  profile(),
  coordinates(),
  accessToken(),
  geometries(),
  radiuses(),
  steps(),
  overview(),
  timestamps(),
  annotations(),
  language(),
  tidy(),
  roundaboutExits(),
  bannerInstructions(),
  voiceInstructions(),
  voiceUnits(),
  waypoints(),
  waypointNames(),
  approaches());
}
origin: mapbox/mapbox-java

private List<MapMatchingMatching> generateRouteOptions(Response<MapMatchingResponse> response) {
 List<MapMatchingMatching> matchings = response.body().matchings();
 List<MapMatchingMatching> modifiedMatchings = new ArrayList<>();
 for (MapMatchingMatching matching : matchings) {
  modifiedMatchings.add(matching.toBuilder().routeOptions(
   RouteOptions.builder()
    .profile(profile())
    .coordinates(formatCoordinates(coordinates()))
    .annotations(annotations())
    .approaches(approaches())
    .language(language())
    .radiuses(radiuses())
    .user(user())
    .voiceInstructions(voiceInstructions())
    .bannerInstructions(bannerInstructions())
    .roundaboutExits(roundaboutExits())
    .geometries(geometries())
    .overview(overview())
    .steps(steps())
    .voiceUnits(voiceUnits())
    .requestUuid(PLACEHOLDER_UUID)
    .accessToken(accessToken())
    .approaches(approaches())
    .waypointNames(waypointNames())
    .baseUrl(baseUrl())
    .build()
  ).build());
 }
 return modifiedMatchings;
}
origin: mapbox/mapbox-java

public Response<MapMatchingResponse> executeCall() throws IOException {
 Response<MapMatchingResponse> response = getCall().execute();
 if (response.isSuccessful()) {
  if (response.body() != null && !response.body().matchings().isEmpty()) {
    response.body()
     .toBuilder()
     .matchings(generateRouteOptions(response))
     .build(),
    new okhttp3.Response.Builder()
  errorDidOccur(null, response);
origin: com.mapbox.mapboxsdk/mapbox-sdk-services

if (!MapboxUtils.isAccessTokenValid(mapMatching.accessToken())) {
 throw new ServicesException("Using Mapbox Services requires setting a valid access token.");
origin: mapbox/mapbox-java

public Response<MapMatchingResponse> executeCall() throws IOException {
 Response<MapMatchingResponse> response = getCall().execute();
 if (response.isSuccessful()) {
  if (response.body() != null && !response.body().matchings().isEmpty()) {
    response.body()
     .toBuilder()
     .matchings(generateRouteOptions(response))
     .build(),
    new okhttp3.Response.Builder()
  errorDidOccur(null, response);
origin: mapbox/mapbox-java

if (!MapboxUtils.isAccessTokenValid(mapMatching.accessToken())) {
 throw new ServicesException("Using Mapbox Services requires setting a valid access token.");
origin: com.mapbox.mapboxsdk/mapbox-sdk-services

@Override
protected Call<MapMatchingResponse> initializeCall() {
 return getService().getCall(
  ApiCallHelper.getHeaderUserAgent(clientAppName()),
  user(),
  profile(),
  coordinates(),
  accessToken(),
  geometries(),
  radiuses(),
  steps(),
  overview(),
  timestamps(),
  annotations(),
  language(),
  tidy(),
  roundaboutExits(),
  bannerInstructions(),
  voiceInstructions(),
  voiceUnits(),
  waypoints(),
  waypointNames(),
  approaches());
}
origin: com.mapbox.mapboxsdk/mapbox-sdk-services

private List<MapMatchingMatching> generateRouteOptions(Response<MapMatchingResponse> response) {
 List<MapMatchingMatching> matchings = response.body().matchings();
 List<MapMatchingMatching> modifiedMatchings = new ArrayList<>();
 for (MapMatchingMatching matching : matchings) {
  modifiedMatchings.add(matching.toBuilder().routeOptions(
   RouteOptions.builder()
    .profile(profile())
    .coordinates(formatCoordinates(coordinates()))
    .annotations(annotations())
    .approaches(approaches())
    .language(language())
    .radiuses(radiuses())
    .user(user())
    .voiceInstructions(voiceInstructions())
    .bannerInstructions(bannerInstructions())
    .roundaboutExits(roundaboutExits())
    .geometries(geometries())
    .overview(overview())
    .steps(steps())
    .voiceUnits(voiceUnits())
    .requestUuid(PLACEHOLDER_UUID)
    .accessToken(accessToken())
    .approaches(approaches())
    .waypointNames(waypointNames())
    .baseUrl(baseUrl())
    .build()
  ).build());
 }
 return modifiedMatchings;
}
origin: com.mapbox.mapboxsdk/mapbox-sdk-services

public Response<MapMatchingResponse> executeCall() throws IOException {
 Response<MapMatchingResponse> response = getCall().execute();
 if (response.isSuccessful()) {
  if (response.body() != null && !response.body().matchings().isEmpty()) {
    response.body()
     .toBuilder()
     .matchings(generateRouteOptions(response))
     .build(),
    new okhttp3.Response.Builder()
  errorDidOccur(null, response);
origin: mapbox/mapbox-java

if (!MapboxUtils.isAccessTokenValid(mapMatching.accessToken())) {
 throw new ServicesException("Using Mapbox Services requires setting a valid access token.");
origin: mapbox/mapbox-java

@Override
protected Call<MapMatchingResponse> initializeCall() {
 return getService().getCall(
  ApiCallHelper.getHeaderUserAgent(clientAppName()),
  user(),
  profile(),
  coordinates(),
  accessToken(),
  geometries(),
  radiuses(),
  steps(),
  overview(),
  timestamps(),
  annotations(),
  language(),
  tidy(),
  roundaboutExits(),
  bannerInstructions(),
  voiceInstructions(),
  voiceUnits(),
  waypoints(),
  waypointNames(),
  approaches());
}
origin: mapbox/mapbox-java

private List<MapMatchingMatching> generateRouteOptions(Response<MapMatchingResponse> response) {
 List<MapMatchingMatching> matchings = response.body().matchings();
 List<MapMatchingMatching> modifiedMatchings = new ArrayList<>();
 for (MapMatchingMatching matching : matchings) {
  modifiedMatchings.add(matching.toBuilder().routeOptions(
   RouteOptions.builder()
    .profile(profile())
    .coordinates(formatCoordinates(coordinates()))
    .annotations(annotations())
    .approaches(approaches())
    .language(language())
    .radiuses(radiuses())
    .user(user())
    .voiceInstructions(voiceInstructions())
    .bannerInstructions(bannerInstructions())
    .roundaboutExits(roundaboutExits())
    .geometries(geometries())
    .overview(overview())
    .steps(steps())
    .voiceUnits(voiceUnits())
    .requestUuid(PLACEHOLDER_UUID)
    .accessToken(accessToken())
    .approaches(approaches())
    .waypointNames(waypointNames())
    .baseUrl(baseUrl())
    .build()
  ).build());
 }
 return modifiedMatchings;
}
com.mapbox.api.matching.v5MapboxMapMatching

Javadoc

The Mapbox map matching interface (v5)

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.

Most used methods

  • accessToken
  • annotations
  • approaches
  • bannerInstructions
  • baseUrl
  • clientAppName
  • coordinates
  • errorDidOccur
  • formatCoordinates
  • generateRouteOptions
  • geometries
  • getCall
  • geometries,
  • getCall,
  • getRetrofit,
  • getService,
  • language,
  • overview,
  • profile,
  • radiuses,
  • roundaboutExits,
  • steps

Popular in Java

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Kernel (java.awt.image)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JButton (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now