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

Method GetGlobalRect

libs/drape_frontend/tile_key.cpp:82–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82m2::RectD TileKey::GetGlobalRect(bool clipByDataMaxZoom) const
83{
84 int const zoomLevel = clipByDataMaxZoom ? ClipTileZoomByMaxDataZoom(m_zoomLevel) : m_zoomLevel;
85 ASSERT_GREATER(zoomLevel, 0, ());
86 double const worldSizeDivisor = 1 << (zoomLevel - 1);
87 // Mercator SizeX and SizeY are equal.
88 double const rectSize = mercator::Bounds::kRangeX / worldSizeDivisor;
89
90 double const startX = m_x * rectSize;
91 double const startY = m_y * rectSize;
92
93 return m2::RectD(startX, startY, startX + rectSize, startY + rectSize);
94}
95
96m2::PointI TileKey::GetTileCoords() const
97{

Callers 15

LoadViewportMethod · 0.45
DrapeEngineMethod · 0.45
CacheUserMarksFunction · 0.45
CacheUserLinesFunction · 0.45
RuleDrawerMethod · 0.45
RenderMethod · 0.45
BaseApplyFeatureMethod · 0.45
RenderAccuracyMethod · 0.45
RenderMyPositionMethod · 0.45

Calls 1

Tested by

no test coverage detected