Skip to content

Commit

Permalink
Speed-up zooming a bit.
Browse files Browse the repository at this point in the history
~ changed Viewport::zoomMap coefficients
  • Loading branch information
green-anger committed Nov 9, 2018
1 parent f666ce2 commit 213eabb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/src/Viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ const float Viewport::maxLen_ = defs::earthRadius * 2 * 3.5f;
const float Viewport::minUnitInPixel_ = minLen_ / 1920 /*pixels*/ * unitInMeter_;
const float Viewport::maxUnitInPixel_ = maxLen_ / 1080 /*pixels*/ * unitInMeter_;
const std::map<float, float> Viewport::zoomMap_ = {
{ unitInMeter_ * 0.2, 0.02 * unitInMeter_ },
{ unitInMeter_ * 0.5, 0.05 * unitInMeter_ },
{ unitInMeter_ * 1.0, 0.1 * unitInMeter_ },
{ unitInMeter_ * 10.0, 0.2 * unitInMeter_ },
{ unitInMeter_ * 50.0, 0.5 * unitInMeter_ },
{ unitInMeter_ * 100.0, 1 * unitInMeter_ },
{ unitInMeter_ * 500.0, 10 * unitInMeter_ },
{ unitInMeter_ * 0.2, 0.05 * unitInMeter_ },
{ unitInMeter_ * 0.5, 0.1 * unitInMeter_ },
{ unitInMeter_ * 1.0, 0.2 * unitInMeter_ },
{ unitInMeter_ * 10.0, 0.5 * unitInMeter_ },
{ unitInMeter_ * 50.0, 2.0 * unitInMeter_ },
{ unitInMeter_ * 100.0, 5 * unitInMeter_ },
{ unitInMeter_ * 500.0, 20 * unitInMeter_ },
{ unitInMeter_ * 1000.0, 50 * unitInMeter_ },
{ unitInMeter_ * 2500.0, 125 * unitInMeter_ },
{ unitInMeter_ * 5000.0, 250 * unitInMeter_ },
Expand Down

0 comments on commit 213eabb

Please sign in to comment.