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

Function GetScreenScale

libs/drape_frontend/visual_params.cpp:315–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315double GetScreenScale(double zoomLevel)
316{
317 VisualParams const & p = VisualParams::Instance();
318 auto const factor = pow(2.0, GetTileScaleBase(zoomLevel));
319 auto const len = mercator::Bounds::kRangeX / factor;
320 auto const pxLen = static_cast<double>(p.GetTileSize());
321 return len / pxLen;
322}
323
324double GetZoomLevel(double screenScale)
325{

Callers 5

CacheUserLinesFunction · 0.85
ApplyScaleFunction · 0.85
MyPositionControllerMethod · 0.85
OnSetCenterMethod · 0.85
SetFollowAndRotateMethod · 0.85

Calls 2

GetTileScaleBaseFunction · 0.85
GetTileSizeMethod · 0.80

Tested by

no test coverage detected