forked from organicmaps/organicmaps
Disabled coordinates on the map in the lower right corner
This commit is contained in:
parent
27ee9c27bc
commit
f2ca69f776
3 changed files with 0 additions and 49 deletions
|
@ -224,7 +224,6 @@ Framework::Framework()
|
|||
m_informationDisplay.enableDebugPoints(true);
|
||||
#endif
|
||||
|
||||
m_informationDisplay.enableCenter(true);
|
||||
m_informationDisplay.enableRuler(true);
|
||||
m_informationDisplay.setRulerParams(m_minRulerWidth, m_metresMinWidth, m_metresMaxWidth);
|
||||
|
||||
|
@ -823,10 +822,6 @@ void Framework::DrawAdditionalInfo(shared_ptr<PaintEvent> const & e)
|
|||
|
||||
m_informationDisplay.setDebugInfo(0, GetDrawScale());
|
||||
|
||||
m2::PointD const center = m_navigator.Screen().GlobalRect().GlobalCenter();
|
||||
m_informationDisplay.setCenter(m2::PointD(MercatorBounds::XToLon(center.x),
|
||||
MercatorBounds::YToLat(center.y)));
|
||||
|
||||
m_informationDisplay.enableRuler(true);
|
||||
|
||||
m_informationDisplay.doDraw(pDrawer);
|
||||
|
|
|
@ -42,12 +42,10 @@ InformationDisplay::InformationDisplay(Framework * fw)
|
|||
InitCountryStatusDisplay(fw);
|
||||
InitCompassArrow(fw);
|
||||
InitLocationState(fw);
|
||||
InitCenterLabel();
|
||||
InitDebugLabel();
|
||||
|
||||
enableDebugPoints(false);
|
||||
enableRuler(false);
|
||||
enableCenter(false);
|
||||
enableDebugInfo(false);
|
||||
enableMemoryWarning(false);
|
||||
enableBenchmarkInfo(false);
|
||||
|
@ -112,17 +110,6 @@ void InformationDisplay::InitLocationState(Framework * fw)
|
|||
m_locationState.reset(new location::State(p));
|
||||
}
|
||||
|
||||
void InformationDisplay::InitCenterLabel()
|
||||
{
|
||||
gui::CachedTextView::Params p;
|
||||
|
||||
p.m_depth = graphics::rulerDepth;
|
||||
p.m_position = graphics::EPosUnderLeft;
|
||||
p.m_pivot = m2::PointD(0, 0);
|
||||
|
||||
m_centerLabel.reset(new gui::CachedTextView(p));
|
||||
}
|
||||
|
||||
void InformationDisplay::InitDebugLabel()
|
||||
{
|
||||
gui::CachedTextView::Params p;
|
||||
|
@ -141,7 +128,6 @@ void InformationDisplay::setController(gui::Controller *controller)
|
|||
m_controller->AddElement(m_compassArrow);
|
||||
m_controller->AddElement(m_locationState);
|
||||
m_controller->AddElement(m_ruler);
|
||||
m_controller->AddElement(m_centerLabel);
|
||||
m_controller->AddElement(m_debugLabel);
|
||||
}
|
||||
|
||||
|
@ -177,11 +163,6 @@ void InformationDisplay::setDisplayRect(m2::RectI const & rect)
|
|||
|
||||
m_ruler->setPivot(pt);
|
||||
|
||||
m2::PointD centerLabelPivot(m_displayRect.maxX() - 4 * m_visualScale,
|
||||
m_displayRect.maxY() - 30 * m_visualScale);
|
||||
|
||||
m_centerLabel->setPivot(centerLabelPivot);
|
||||
|
||||
m2::PointD debugLabelPivot(m_displayRect.minX() + 10,
|
||||
m_displayRect.minY() + 20 + 5 * m_visualScale);
|
||||
|
||||
|
@ -228,26 +209,6 @@ void InformationDisplay::setVisualScale(double visualScale)
|
|||
|
||||
m_ruler->setFont(gui::Element::EActive, m_fontDesc);
|
||||
m_debugLabel->setFont(gui::Element::EActive, m_fontDesc);
|
||||
m_centerLabel->setFont(gui::Element::EActive, m_fontDesc);
|
||||
}
|
||||
|
||||
void InformationDisplay::enableCenter(bool doEnable)
|
||||
{
|
||||
m_centerLabel->setIsVisible(doEnable);
|
||||
}
|
||||
|
||||
void InformationDisplay::setCenter(m2::PointD const & pt)
|
||||
{
|
||||
m_centerPtLonLat = pt;
|
||||
|
||||
ostringstream out;
|
||||
|
||||
out << fixed << setprecision(4)
|
||||
<< m_centerPtLonLat.y
|
||||
<< ", "
|
||||
<< m_centerPtLonLat.x;
|
||||
|
||||
m_centerLabel->setText(out.str());
|
||||
}
|
||||
|
||||
void InformationDisplay::enableDebugInfo(bool doEnable)
|
||||
|
|
|
@ -89,11 +89,9 @@ private:
|
|||
shared_ptr<CountryStatusDisplay> m_countryStatusDisplay;
|
||||
shared_ptr<CompassArrow> m_compassArrow;
|
||||
shared_ptr<location::State> m_locationState;
|
||||
shared_ptr<gui::CachedTextView> m_centerLabel;
|
||||
shared_ptr<gui::CachedTextView> m_debugLabel;
|
||||
|
||||
void InitRuler(Framework * fw);
|
||||
void InitCenterLabel();
|
||||
void InitDebugLabel();
|
||||
void InitLocationState(Framework * fw);
|
||||
void InitCompassArrow(Framework * fw);
|
||||
|
@ -117,9 +115,6 @@ public:
|
|||
void enableRuler(bool doEnable);
|
||||
void setRulerParams(unsigned pxMinWidth, double metresMinWidth, double metresMaxWidth);
|
||||
|
||||
void enableCenter(bool doEnable);
|
||||
void setCenter(m2::PointD const & latLongPt);
|
||||
|
||||
void enableDebugInfo(bool doEnable);
|
||||
void setDebugInfo(double frameDuration, int currentScale);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue