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

Function GetZoomLevel

libs/drape_frontend/visual_params.cpp:324–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324double GetZoomLevel(double screenScale)
325{
326 VisualParams const & p = VisualParams::Instance();
327 auto const pxLen = static_cast<double>(p.GetTileSize());
328 auto const len = pxLen * screenScale;
329 auto const factor = mercator::Bounds::kRangeX / len;
330 return math::Clamp(GetDrawTileScale(fabs(std::log2(factor))), 1.0, scales::GetUpperStyleScale() + 1.0);
331}
332
333float CalculateRadius(ScreenBase const & screen, ArrayView<float> const & zoom2radius)
334{

Callers 5

ExtractZoomFactorsFunction · 0.70
GetNormalizedZoomLevelFunction · 0.70
ReadFeatureIndexMethod · 0.70
UpdateViewportMethod · 0.50
CreateBookmarkMethod · 0.50

Calls 5

ClampFunction · 0.85
GetDrawTileScaleFunction · 0.85
log2Function · 0.85
GetUpperStyleScaleFunction · 0.85
GetTileSizeMethod · 0.80

Tested by

no test coverage detected