From 3d7e64a4702cb416b2342c6443374603a665c39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 9 Jul 2021 07:56:35 +0200 Subject: [PATCH] Removed the artificial POI zoom level limits --- src/map/IMG/rastertile.cpp | 24 ------------------------ src/map/IMG/style.cpp | 33 --------------------------------- src/map/IMG/style.h | 16 ---------------- 3 files changed, 73 deletions(-) diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index fc5748ac..9cd0a4ed 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -27,27 +27,6 @@ static QString convertUnits(const QString &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) { QFont f; @@ -450,9 +429,6 @@ void RasterTile::processPoints(QList &textItems) const Style::Point &style = _style->point(point.type); bool poi = Style::isPOI(point.type); - if (poi && _zoom < minPOIZoom(Style::poiClass(point.type))) - continue; - const QString *label = point.label.text().isEmpty() ? 0 : &(point.label.text()); const QImage *img = style.img().isNull() ? 0 : &style.img(); diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index f0b0b9e5..262eff8f 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -1126,39 +1126,6 @@ const Style::Point &Style::point(quint32 type) const 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 static QString penColor(const QPen &pen) { diff --git a/src/map/IMG/style.h b/src/map/IMG/style.h index 04be70b1..82afbed1 100644 --- a/src/map/IMG/style.h +++ b/src/map/IMG/style.h @@ -22,20 +22,6 @@ public: ExtraSmall = 5 }; - enum POIClass { - Unknown, - Food, - Accommodation, - Recreation, - Shopping, - Transport, - Services, - Community, - Elementary, - ManmadePlaces, - NaturePlaces - }; - class Polygon { public: Polygon() : _brush(Qt::NoBrush), _pen(Qt::NoPen) {} @@ -136,8 +122,6 @@ public: static bool isRaster(quint32 type) {return (type == 0x10613);} - static POIClass poiClass(quint32 type); - private: struct Section { quint32 offset;