MCPcopy Create free account
hub / github.com/comaps/comaps / GetDistance

Method GetDistance

qt/draw_widget.cpp:471–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469}
470
471std::string DrawWidget::GetDistance(search::Result const & res) const
472{
473 platform::Distance dist;
474 if (auto const position = m_framework.GetCurrentPosition())
475 {
476 auto const ll = mercator::ToLatLon(*position);
477 double dummy;
478 (void)m_framework.GetDistanceAndAzimut(res.GetFeatureCenter(), ll.m_lat, ll.m_lon, -1.0, dist, dummy);
479 }
480 return dist.ToString();
481}
482
483void DrawWidget::CreateFeature()
484{

Callers 3

FillWeightsFunction · 0.45
ToJavaDistanceFunction · 0.45
OnSearchResultsMethod · 0.45

Calls 5

GetDistanceAndAzimutMethod · 0.80
ToLatLonFunction · 0.50
GetCurrentPositionMethod · 0.45
GetFeatureCenterMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected