Unify route focus rendering#1892
Merged
Merged
Conversation
📝 WalkthroughWalkthroughRoute rendering now uses zoom-dependent width profiles and per-polyline width caches. Route-stop layers receive explicit zoom-scaling state, while map state and controllers propagate that state across Google Maps and MapLibre. Selected-trip geometry and scheduled stop ordering are also integrated. ChangesZoom-aware route rendering
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant VehicleSelection
participant RouteMapController
participant MapRenderState
participant MapRenderer
participant RouteStopLayer
VehicleSelection->>RouteMapController: select vehicle trip
RouteMapController->>RouteMapController: load trip shape and schedule
RouteMapController->>MapRenderState: publish selected geometry and stop scaling state
MapRenderState->>MapRenderer: provide render snapshot
MapRenderer->>MapRenderer: resolve profile widths at camera zoom
MapRenderer->>RouteStopLayer: render stops with zoom scaling flag
MapRenderer->>MapRenderer: update retained widths on camera settle
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
bmander
marked this pull request as ready for review
July 16, 2026 17:16
bmander
force-pushed
the
agent/route-focus-rendering
branch
from
July 16, 2026 17:32
472ca7f to
42c3d35
Compare
This was referenced Jul 16, 2026
This was referenced Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Single-route view used a thinner base line and kept route-stop circles at full size while a route focused from stop mode used a thicker, zoom-scaled presentation. This made equivalent route-focus states look inconsistent.
The rendering policy is now explicit and shared, so the line thickness, zoom endpoint, multiplier schedule, and stop-circle behavior remain aligned between both entry points.
Validation
./gradlew :onebusaway-android:testObaGoogleDebugUnitTest --tests org.onebusaway.android.map.RouteViewGeometryTest --tests org.onebusaway.android.map.render.RouteLineWidthProfileTest --tests org.onebusaway.android.map.render.MapRenderStateRouteStopScaleTest --tests org.onebusaway.android.map.render.StopZoomBandTest --tests org.onebusaway.android.map.render.RoutePolylineRenderPipelineTest./gradlew :onebusaway-android:compileObaMaplibreDebugKotlingit diff --checkSummary by CodeRabbit
Enhancements
Bug Fixes