1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-18 19:52:09 +01:00

Removed the artificial POI zoom level limits

This commit is contained in:
Martin Tůma 2021-07-09 07:56:35 +02:00
parent 34e3e04e03
commit 3d7e64a470
3 changed files with 0 additions and 73 deletions

View File

@ -27,27 +27,6 @@ static QString convertUnits(const QString &str)
return ok ? QString::number(qRound(number * 0.3048)) : str; return ok ? QString::number(qRound(number * 0.3048)) : str;
} }
static int minPOIZoom(Style::POIClass cl)
{
switch (cl) {
case Style::Food:
case Style::Shopping:
case Style::Services:
return 26;
case Style::Accommodation:
case Style::Recreation:
return 25;
case Style::ManmadePlaces:
case Style::NaturePlaces:
case Style::Transport:
case Style::Community:
case Style::Elementary:
return 23;
default:
return 0;
}
}
static QFont pixelSizeFont(int pixelSize) static QFont pixelSizeFont(int pixelSize)
{ {
QFont f; QFont f;
@ -450,9 +429,6 @@ void RasterTile::processPoints(QList<TextItem*> &textItems)
const Style::Point &style = _style->point(point.type); const Style::Point &style = _style->point(point.type);
bool poi = Style::isPOI(point.type); bool poi = Style::isPOI(point.type);
if (poi && _zoom < minPOIZoom(Style::poiClass(point.type)))
continue;
const QString *label = point.label.text().isEmpty() const QString *label = point.label.text().isEmpty()
? 0 : &(point.label.text()); ? 0 : &(point.label.text());
const QImage *img = style.img().isNull() ? 0 : &style.img(); const QImage *img = style.img().isNull() ? 0 : &style.img();

View File

@ -1126,39 +1126,6 @@ const Style::Point &Style::point(quint32 type) const
return (it == _points.constEnd()) ? null : *it; return (it == _points.constEnd()) ? null : *it;
} }
Style::POIClass Style::poiClass(quint32 type)
{
if ((type >= 0x2a00 && type < 0x2b00) || type == 0x2c0a || type == 0x2d02
|| (type & 0xffff00) == TYPE(0x10b))
return Food;
else if ((type >= 0x2b00 && type < 0x2c00)
|| (type & 0xffff00) == TYPE(0x10c))
return Accommodation;
else if ((type >= 0x2c00 && type < 0x2e00)
|| (type & 0xffff00) == TYPE(0x10d) || (type & 0xffff00) == TYPE(0x10e))
return Recreation;
else if ((type >= 0x2e00 && type < 0x2f00)
|| (type & 0xffff00) == TYPE(0x10f))
return Shopping;
else if ((type >= 0x2f00 && type < 0x2f0f) || type == 0x2f17
|| (type >= 0x11001 && type < 0x1100f))
return Transport;
else if ((type >= 0x2f0f && type < 0x3000)
|| (type >= 0x1100f && type < 0x11100))
return Services;
else if ((type >= 0x3000 && type < 0x3100)
|| (type & 0xffff00) == TYPE(0x111))
return Community;
else if (type >= 0x4000 && type < 0x6000)
return Elementary;
else if (type >= 0x6400 && type < 0x6500)
return ManmadePlaces;
else if (type >= 0x6500 && type < 0x6700)
return NaturePlaces;
else
return Unknown;
}
#ifndef QT_NO_DEBUG #ifndef QT_NO_DEBUG
static QString penColor(const QPen &pen) static QString penColor(const QPen &pen)
{ {

View File

@ -22,20 +22,6 @@ public:
ExtraSmall = 5 ExtraSmall = 5
}; };
enum POIClass {
Unknown,
Food,
Accommodation,
Recreation,
Shopping,
Transport,
Services,
Community,
Elementary,
ManmadePlaces,
NaturePlaces
};
class Polygon { class Polygon {
public: public:
Polygon() : _brush(Qt::NoBrush), _pen(Qt::NoPen) {} Polygon() : _brush(Qt::NoBrush), _pen(Qt::NoPen) {}
@ -136,8 +122,6 @@ public:
static bool isRaster(quint32 type) static bool isRaster(quint32 type)
{return (type == 0x10613);} {return (type == 0x10613);}
static POIClass poiClass(quint32 type);
private: private:
struct Section { struct Section {
quint32 offset; quint32 offset;