Skip to content

Commit

Permalink
[ui] refactor vanishing point calculation to use EPSG:3857 projection
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasPaczos committed Oct 20, 2020
1 parent a3dfcaa commit 3b69582
Show file tree
Hide file tree
Showing 10 changed files with 349 additions and 342 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class ReplayActivity : AppCompatActivity(), OnMapReadyCallback {
this.mapboxMap = mapboxMap
mapboxMap.setStyle(Style.MAPBOX_STREETS) { style ->
mapboxMap.moveCamera(CameraUpdateFactory.zoomTo(15.0))
navigationMapboxMap = NavigationMapboxMap(mapView, mapboxMap, this, true)
navigationMapboxMap = NavigationMapboxMap(mapView, mapboxMap, this, null, true, true)
initializeFirstLocation()

mapboxNavigation?.attachFasterRouteObserver(
Expand All @@ -98,7 +98,7 @@ class ReplayActivity : AppCompatActivity(), OnMapReadyCallback {
RouteOptions.builder().applyDefaultParams()
.accessToken(Utils.getMapboxAccessToken(applicationContext))
.coordinates(originLocation.toPoint(), null, latLng.toPoint())
.alternatives(true)
.alternatives(false)
.profile(DirectionsCriteria.PROFILE_DRIVING_TRAFFIC)
.overview(DirectionsCriteria.OVERVIEW_FULL)
.annotationsList(
Expand Down
1 change: 1 addition & 0 deletions libnavigation-ui/api/current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ package com.mapbox.navigation.ui.route {
method public com.mapbox.navigation.ui.route.NavigationMapRoute.Builder withRouteStyleDescriptors(java.util.List<com.mapbox.navigation.ui.route.RouteStyleDescriptor!>!);
method public com.mapbox.navigation.ui.route.NavigationMapRoute.Builder withStyle(@StyleRes int);
method public com.mapbox.navigation.ui.route.NavigationMapRoute.Builder withVanishRouteLineEnabled(boolean);
method public com.mapbox.navigation.ui.route.NavigationMapRoute.Builder withVanishingRouteLineUpdateIntervalNano(long);
}

public interface OnRouteSelectionChangeListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public class RouteConstants {
public static final String MAPBOX_LOCATION_ID = "mapbox-location";
public static final double MINIMUM_ROUTE_LINE_OFFSET = .000000001;
public static final String LAYER_ABOVE_UPCOMING_MANEUVER_ARROW = "com.mapbox.annotations.points";
public static final double ROUTE_LINE_UPDATE_MAX_DISTANCE_THRESHOLD_IN_METERS = 1.0;
public static final String DEFAULT_ROUTE_DESCRIPTOR_PLACEHOLDER = "mapboxDescriptorPlaceHolderUnused";
public static final int POINT_DISTANCE_CALCULATION_FUN_CACHE_SIZE = 4500;
public static final double MAX_ELAPSED_SINCE_INDEX_UPDATE_NANO = 1_500_000_000; // 1.5s
}

This file was deleted.

Loading

0 comments on commit 3b69582

Please sign in to comment.