Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2014-12-26 11:36:33 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:36:00 +0300
commita4718a235ea5e7e917ad307241c1753a3b0ea5c2 (patch)
treeae9eb94e9eec77ddd3313c239d92865fcf3bfef1 /map/ruler.cpp
parent825fcd4f55fd41b006abc9de9c2a7db1e8852224 (diff)
Replace DistanceOnEarth fn call with more convenient one.
Diffstat (limited to 'map/ruler.cpp')
-rw-r--r--map/ruler.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/map/ruler.cpp b/map/ruler.cpp
index 2bdeb9f21d..47fa36c6a1 100644
--- a/map/ruler.cpp
+++ b/map/ruler.cpp
@@ -17,7 +17,6 @@
#include "../indexer/mercator.hpp"
-#include "../geometry/distance_on_sphere.hpp"
#include "../geometry/transformations.hpp"
#include "../base/string_utils.hpp"
@@ -569,9 +568,7 @@ void Ruler::update()
m2::PointD pt1 = screen.PtoG(pivot());
m2::PointD pt0 = screen.PtoG(pivot() - m2::PointD(minPxWidth, 0));
- double const distanceInMetres = ms::DistanceOnEarth(
- MercatorBounds::YToLat(pt0.y), MercatorBounds::XToLon(pt0.x),
- MercatorBounds::YToLat(pt1.y), MercatorBounds::XToLon(pt1.x));
+ double const distanceInMetres = MercatorBounds::DistanceOnEarth(pt0, pt1);
// convert metres to units for calculating m_metresDiff
double metersDiff = CalcMetresDiff(distanceInMetres);