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:
Diffstat (limited to 'map/framework.cpp')
-rw-r--r--map/framework.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/map/framework.cpp b/map/framework.cpp
index ae8e8aa441..1653d68734 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -1148,17 +1148,20 @@ void Framework::ShowBookmarkCategory(kml::MarkGroupId categoryId, bool animation
ShowRect(rect, -1 /* maxScale */, animation);
}
-void Framework::ShowFeatureByMercator(m2::PointD const & pt)
+void Framework::ShowFeature(FeatureID const & featureId)
{
StopLocationFollow();
place_page::BuildInfo info;
- info.m_mercator = pt;
+ info.m_featureId = featureId;
+ info.m_match = place_page::BuildInfo::Match::FeatureOnly;
m_currentPlacePageInfo = BuildPlacePageInfo(info);
+
if (m_drapeEngine != nullptr)
{
- m_drapeEngine->SetModelViewCenter(pt, scales::GetUpperComfortScale(), true /* isAnim */,
- true /* trackVisibleViewport */);
+ auto const pt = m_currentPlacePageInfo->GetMercator();
+ auto const scale = scales::GetUpperComfortScale();
+ m_drapeEngine->SetModelViewCenter(pt, scale, true /* isAnim */, true /* trackVisibleViewport */);
}
ActivateMapSelection(m_currentPlacePageInfo);
}
@@ -3176,20 +3179,18 @@ bool Framework::ParseEditorDebugCommand(search::SearchParams const & params)
auto const features = FindFeaturesByIndex(index);
for (auto const & fid : features)
{
- FeaturesLoaderGuard guard(m_featuresFetcher.GetDataSource(), fid.m_mwmId);
- auto ft = guard.GetFeatureByIndex(fid.m_index);
- if (!ft)
+ if (!fid.IsValid())
continue;
// Show the first feature on the map.
if (!isShown)
{
- ShowFeatureByMercator(feature::GetCenter(*ft));
+ ShowFeature(fid);
isShown = true;
}
// Log found features.
- LOG(LINFO, ("Feature found:", fid, mercator::ToLatLon(feature::GetCenter(*ft))));
+ LOG(LINFO, ("Feature found:", fid));
}
}
return true;