1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-31 10:54:24 +02:00

Make caching work for both IMG and GMAP maps

This commit is contained in:
2020-02-10 19:38:45 +01:00
parent dde8903013
commit 378fa8dc0e
3 changed files with 13 additions and 9 deletions

View File

@@ -4,6 +4,8 @@
#include "mapdata.h"
#define CACHED_SUBDIVS_COUNT 2048 // ~32MB for both caches together
struct PolyCTX
{
PolyCTX(const RectC &rect, int bits, QList<MapData::Poly> *polygons,
@@ -45,6 +47,12 @@ inline bool pointCb(VectorTile *tile, void *context)
}
MapData::MapData() : _typ(0), _style(0), _valid(false)
{
_polyCache.setMaxCost(CACHED_SUBDIVS_COUNT);
_pointCache.setMaxCost(CACHED_SUBDIVS_COUNT);
}
MapData::~MapData()
{
TileTree::Iterator it;