  const int PAN_TIMEOUT = 100;
  const bool DRAW_MODEL_PATH = false;
  const qreal REROUTE_DISTANCE = 25;
  const float MAX_ZOOM = 17;
  const float MIN_ZOOM = 14;
  const float MAX_PITCH = 50;
  const float MIN_PITCH = 0;
  const float MAP_SCALE = 2;
  
 
</s> remove           float distance = std::max(0.0f, float(segment.distance()) - along_geometry);
          emit distanceChanged(distance);
 </s> add           float distance_to_maneuver = segment.distance() - along_geometry;
          emit distanceChanged(std::max(0.0f, distance_to_maneuver)); </s> remove   double last_maneuver_distance = 1000;
 </s> add  </s> remove         // Handle transition to next route segment
        auto next_segment = segment.nextRouteSegment();
        if (next_segment.isValid()) {
          auto next_maneuver = next_segment.maneuver();
          if (next_maneuver.isValid()) {
            float next_maneuver_distance = next_maneuver.position().distanceTo(to_QGeoCoordinate(*last_position));
            // Switch to next route segment
            if (next_maneuver_distance < REROUTE_DISTANCE && next_maneuver_distance > last_maneuver_distance) {
 </s> add           // Transition to next route segment
          if (distance_to_maneuver < -MANEUVER_TRANSITION_THRESHOLD) {
            auto next_segment = segment.nextRouteSegment();
            if (next_segment.isValid()) { </s> remove         }
 </s> add  </s> remove             emit instructionsChanged(banner_0, distance < show_at);
 </s> add             emit instructionsChanged(banner_0, distance_to_maneuver < show_at);
const float MANEUVER_TRANSITION_THRESHOLD = 10;

  const int PAN_TIMEOUT = 100;
  const bool DRAW_MODEL_PATH = false;
  const qreal REROUTE_DISTANCE = 25;
const float MANEUVER_TRANSITION_THRESHOLD = 10;

  const float MAX_ZOOM = 17;
  const float MIN_ZOOM = 14;
  const float MAX_PITCH = 50;
  const float MIN_PITCH = 0;
  const float MAP_SCALE = 2;
  
keep keep add keep keep keep keep keep keep
 nav: simplify segment transition (#21383) 
selfdrive/ui/qt/maps/map.cc