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
path: root/map
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2019-04-22 17:42:09 +0300
committerTatiana Yan <tatiana.kondakova@gmail.com>2019-04-22 18:47:33 +0300
commita2c0d79675f8ce23c2c3cee57122d6106f5de208 (patch)
tree187b54c7b136a1001c415bc59155fb2dcbdfcf68 /map
parentddc65679bc06c72e4946a476360541cd87db51e3 (diff)
[booking][search] review fixes
Diffstat (limited to 'map')
-rw-r--r--map/framework.cpp4
-rw-r--r--map/search_api.cpp4
-rw-r--r--map/viewport_search_callback.cpp1
-rw-r--r--map/viewport_search_callback.hpp2
4 files changed, 6 insertions, 5 deletions
diff --git a/map/framework.cpp b/map/framework.cpp
index 7cdcf744c4..829cc0bc17 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -313,6 +313,10 @@ void Framework::OnUserPositionChanged(m2::PointD const & position, bool hasPosit
void Framework::OnViewportChanged(ScreenBase const & screen)
{
+ // Drape engine may spuriously call OnViewportChanged. Filter out the calls that
+ // change the viewport from the drape engine's point of view but leave it almost
+ // the same from the point of view of the framework and all its subsystems such as search api.
+ // Additional filtering may be done by each subsystem.
auto const isSameViewport = m2::IsEqual(screen.ClipRect(), m_currentModelView.ClipRect(),
kMwmPointAccuracy, kMwmPointAccuracy);
if (isSameViewport)
diff --git a/map/search_api.cpp b/map/search_api.cpp
index 42ca752b70..c5d96e6a7d 100644
--- a/map/search_api.cpp
+++ b/map/search_api.cpp
@@ -40,8 +40,8 @@ using BookmarkIdDoc = pair<bookmarks::Id, bookmarks::Doc>;
double const kDistEqualQueryMeters = 100.0;
double const kDistEqualQueryMercator = MercatorBounds::MetersToMercator(kDistEqualQueryMeters);
-// 200 sqared kilometers.
-auto const kMaxAreaToLoadAllHotelsInViewport = 200000000.0;
+// 200 squared kilometers.
+double const kMaxAreaToLoadAllHotelsInViewport = 2e8;
// Cancels search query by |handle|.
void CancelQuery(weak_ptr<ProcessorHandle> & handle)
diff --git a/map/viewport_search_callback.cpp b/map/viewport_search_callback.cpp
index 40f89c0866..eb3f9457f2 100644
--- a/map/viewport_search_callback.cpp
+++ b/map/viewport_search_callback.cpp
@@ -1,7 +1,6 @@
#include "map/viewport_search_callback.hpp"
#include "search/result.hpp"
-#include "search/utils.hpp"
#include "base/assert.hpp"
diff --git a/map/viewport_search_callback.hpp b/map/viewport_search_callback.hpp
index 78e508c01a..9397f567c3 100644
--- a/map/viewport_search_callback.hpp
+++ b/map/viewport_search_callback.hpp
@@ -9,8 +9,6 @@
#include "geometry/rect2d.hpp"
#include <functional>
-#include <string>
-#include <vector>
namespace search
{