Commit 78273c7e authored by Dennis Nienhüser's avatar Dennis Nienhüser

Tweak auto zoom settings a bit

parent c72cbc2c
...@@ -277,21 +277,18 @@ void AutoNavigation::Private::adjustZoom( const GeoDataCoordinates &currentPosit ...@@ -277,21 +277,18 @@ void AutoNavigation::Private::adjustZoom( const GeoDataCoordinates &currentPosit
qreal distance = greatCircleDistance * radius; qreal distance = greatCircleDistance * radius;
if( speed != 0 ) { if( speed != 0 ) {
//time(in minutes) remaining to reach the border of the map // time (in seconds) remaining to reach the border of the map
qreal remainingTime = ( distance / speed ) * SEC2MIN; qreal remainingTime = distance / speed;
//tolerance time limits( in minutes ) before auto zooming // tolerance time limits (in seconds) before auto zooming
qreal thresholdLow = 1.0; qreal thresholdLow = 15;
qreal thresholdHigh = 12.0 * thresholdLow; qreal thresholdHigh = 120;
m_selfInteraction = true; m_selfInteraction = true;
if ( remainingTime < thresholdLow ) { if ( remainingTime < thresholdLow ) {
emit m_parent->zoomOut( Instant ); emit m_parent->zoomOut( Instant );
} }
else if ( remainingTime < thresholdHigh ) { else if ( remainingTime > thresholdHigh ) {
/* zoom level optimal, nothing to do */
}
else {
emit m_parent->zoomIn( Instant ); emit m_parent->zoomIn( Instant );
} }
m_selfInteraction = false; m_selfInteraction = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment