Skip to content

Conversation

cafesilencio
Copy link

Description

When the MapboxRouteLineView::initializeLayers is called any existing route line related layers will be removed and the layers will be re-added with the current options. Previously the layers would only be initialized if they previously didn't exist. Calling initializeLayers will always result in the same map state with regard to the layers related to the route line.

Screenshots or Gifs

@github-actions github-actions bot requested a review from dzinad January 9, 2023 21:02
@cafesilencio cafesilencio force-pushed the sb-NAVAND-653-reset-route-line-layers branch from de2f25e to 3ba04b4 Compare January 9, 2023 21:04
@cafesilencio cafesilencio requested review from Zayankovsky and removed request for dzinad January 9, 2023 21:04
@cafesilencio cafesilencio marked this pull request as draft January 9, 2023 21:05
@cafesilencio cafesilencio force-pushed the sb-NAVAND-653-reset-route-line-layers branch 2 times, most recently from cb71365 to 33a1383 Compare January 9, 2023 21:09
@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Merging #6793 (9905db4) into main (50859cd) will increase coverage by 0.04%.
The diff coverage is 98.11%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #6793      +/-   ##
============================================
+ Coverage     72.93%   72.98%   +0.04%     
- Complexity     5662     5667       +5     
============================================
  Files           786      786              
  Lines         30456    30505      +49     
  Branches       3607     3607              
============================================
+ Hits          22214    22263      +49     
  Misses         6810     6810              
  Partials       1432     1432              
Impacted Files Coverage Δ
...tion/ui/maps/route/line/api/MapboxRouteLineView.kt 88.65% <96.42%> (+0.61%) ⬆️
...i/maps/internal/route/line/MapboxRouteLineUtils.kt 87.47% <100.00%> (+0.33%) ⬆️

@cafesilencio cafesilencio force-pushed the sb-NAVAND-653-reset-route-line-layers branch 2 times, most recently from 101fb7c to e9e1363 Compare January 9, 2023 23:20
@cafesilencio cafesilencio marked this pull request as ready for review January 9, 2023 23:35
@cafesilencio cafesilencio force-pushed the sb-NAVAND-653-reset-route-line-layers branch 3 times, most recently from 9d45d3f to 14a7396 Compare January 25, 2023 17:01
@github-actions
Copy link

github-actions bot commented Jan 25, 2023

Changelog

Features

  • Introduced PredictiveCacheOptions.Builder#predictiveCacheMapsOptionsList as an alternative for deprecated PredictiveCacheOptions.Builder#predictiveCacheMapsOptions. This allows to use different PredictiveCacheLocationOptions for different zoom level ranges. [#6868](https://github.com/mapbox/mapbox-navigation-android/pull/6868)

Bug fixes and improvements

Fixed "global reference table overflow" in case an application accumulates and keeps links to RouteProgress#upcomingRoadObjects

  • Make the location switch to map matching faster with MapboxTripStarter.enableMapMatching [#6906](https://github.com/mapbox/mapbox-navigation-android/pull/6906)
  • ⚠️ If you're recreating the MapboxRouteLineView instance, for example to change the MapboxRouteLineOptions, make sure that your first interaction restores the state and re-applies the options by calling MapboxRouteLineApi.getRouteDrawData and passing the result to MapboxRouteLineView.renderRouteDrawData. This is a necessary change to fix an issue where MapboxRouteLineOptions provided in a new instance of MapboxRouteLineView were ignored if the style object used with render functions already had route line layers initialized. [#6793](https://github.com/mapbox/mapbox-navigation-android/pull/6793)
  • Fixed an issue with NavigationView that caused left frame to overlap with maneuver view in landscape mode during active navigation. [#6914](https://github.com/mapbox/mapbox-navigation-android/pull/6914)
  • Introduced VoiceInstructionsPrefetcher MapboxSpeechAPI#generatePredownloaded to use predownloaded voice instructions instead of downloading them on demand. Example usage can be found in the examples directory ( see MapboxVoiceActivity). [#6771](https://github.com/mapbox/mapbox-navigation-android/pull/6771)
  • Enabled voice instructions predownloading for those who use MapboxAudioGuidance. [#6771](https://github.com/mapbox/mapbox-navigation-android/pull/6771)
  • Fixed an issue where with low connectivity voice instruction might have been played too late for those who use MapboxAudioGuidance. If you use MapboxSpeechAPI directly, switch to voice instructions predownloading as described above if you encounter said issue. [#6771](https://github.com/mapbox/mapbox-navigation-android/pull/6771)
  • Fixed rendering of 3 digit speed limit values in MapboxSpeedInfoView. [#6919](https://github.com/mapbox/mapbox-navigation-android/pull/6919)
  • Updated MapboxNavigationApp to ignore detach calls, if the LifecycleOwner wasn't attached first. [#6920](https://github.com/mapbox/mapbox-navigation-android/pull/6920)

Known issues ⚠️

Other changes

Android Auto Changelog

Features

Bug fixes and improvements

Seth Bourget and others added 2 commits February 3, 2023 12:08
@LukasPaczos LukasPaczos force-pushed the sb-NAVAND-653-reset-route-line-layers branch from 14a7396 to 9905db4 Compare February 3, 2023 12:33
@LukasPaczos
Copy link

LukasPaczos commented Feb 3, 2023

In the interest of pushing this work forward I updated the PR with a minimal set of changes needed to resolve the issue reported upstream.

If we want to consider expanding the API surface, let's discuss this separately.

@LukasPaczos LukasPaczos merged commit 1d809a4 into main Feb 3, 2023
@LukasPaczos LukasPaczos deleted the sb-NAVAND-653-reset-route-line-layers branch February 3, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants