mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Do not duplicate the area descriptions where (most) maps have POIs
This commit is contained in:
parent
ce6d6298bb
commit
465b146001
@ -990,12 +990,6 @@ bool Style::isMilitaryArea(quint32 type)
|
||||
return (type == TYPE(0x04));
|
||||
}
|
||||
|
||||
bool Style::isInfrastructureArea(quint32 type)
|
||||
{
|
||||
return ((type >= TYPE(0x07) && type <= TYPE(0xc)) || type == TYPE(0x13)
|
||||
|| type == TYPE(0x1a) || type == TYPE(0x19));
|
||||
}
|
||||
|
||||
bool Style::isSpot(quint32 type)
|
||||
{
|
||||
return (type == TYPE(0x62) || type == TYPE(0x63));
|
||||
@ -1011,6 +1005,11 @@ bool Style::isMajorRoad(quint32 type)
|
||||
return (type <= TYPE(0x04));
|
||||
}
|
||||
|
||||
bool Style::isWaterAreaPOI(quint32 type)
|
||||
{
|
||||
return (type == 0x6603);
|
||||
}
|
||||
|
||||
Style::POIClass Style::poiClass(quint32 type)
|
||||
{
|
||||
if ((type >= 0x2a00 && type < 0x2b00) || type == 0x2c0a || type == 0x2d02)
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
static bool isMajorRoad(quint32 type);
|
||||
static bool isWaterArea(quint32 type);
|
||||
static bool isMilitaryArea(quint32 type);
|
||||
static bool isInfrastructureArea(quint32 type);
|
||||
static bool isWaterAreaPOI(quint32 type);
|
||||
static POIClass poiClass(quint32 type);
|
||||
|
||||
private:
|
||||
|
@ -391,8 +391,7 @@ void IMGMap::processPolygons(QList<IMG::Poly> &polygons,
|
||||
if (poly.label.text().isEmpty())
|
||||
continue;
|
||||
|
||||
if (Style::isWaterArea(poly.type) || Style::isMilitaryArea(poly.type)
|
||||
|| Style::isInfrastructureArea(poly.type)) {
|
||||
if (Style::isWaterArea(poly.type) || Style::isMilitaryArea(poly.type)) {
|
||||
const Style::Polygon &style = _img.style()->polygon(poly.type);
|
||||
TextPointItem *item = new TextPointItem(
|
||||
centroid(poly.points).toPoint(), &poly.label.text(),
|
||||
@ -526,7 +525,8 @@ void IMGMap::processPoints(QList<IMG::Point> &points,
|
||||
IMG::Point &point = points[i];
|
||||
const Style::Point &style = _img.style()->point(point.type);
|
||||
|
||||
if (point.poi && _zoom < minPOIZoom(Style::poiClass(point.type)))
|
||||
if (point.poi && (_zoom < minPOIZoom(Style::poiClass(point.type))
|
||||
|| Style::isWaterAreaPOI(point.type)))
|
||||
continue;
|
||||
|
||||
const QString *label = point.label.text().isEmpty()
|
||||
|
Loading…
Reference in New Issue
Block a user