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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user