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

Function FormatFullAddress

libs/search/ranker.cpp:310–318  ·  view source on GitHub ↗

TODO: Share common formatting code for search results and place page.

Source from the content-addressed store, hash-verified

308
309// TODO: Share common formatting code for search results and place page.
310string FormatFullAddress(ReverseGeocoder::Address const & addr, string const & region)
311{
312 /// @todo Print "near" for not exact addresses.
313 /// Add some threshold for addr:interpolation or refactor ReverseGeocoder?
314 if (addr.GetDistance() != 0)
315 return region;
316
317 return FormatStreetAndHouse(addr) + (region.empty() ? "" : ", ") + region;
318}
319
320} // namespace
321

Callers 1

MakeResultMethod · 0.85

Calls 3

FormatStreetAndHouseFunction · 0.85
GetDistanceMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected