Skip to content

Commit f6cd6c6

Browse files
Zoom level already checked in fetchMap
1 parent 8ecbce8 commit f6cd6c6

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/OpenStreetMap-esp32.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,6 @@ std::optional<std::unique_ptr<MemoryBuffer>> OpenStreetMap::urlToBuffer(const St
377377

378378
bool OpenStreetMap::fetchTile(CachedTile &tile, uint32_t x, uint32_t y, uint8_t zoom, String &result)
379379
{
380-
if (!zoom || zoom > OSM_MAX_ZOOM)
381-
{
382-
result = "Invalid zoom level: " + String(zoom);
383-
return false;
384-
}
385-
386380
const uint32_t worldTileWidth = 1 << zoom;
387381
if (x >= worldTileWidth || y >= worldTileWidth)
388382
{

0 commit comments

Comments
 (0)