mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-03-16 11:37:46 +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));
|
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)
|
bool Style::isSpot(quint32 type)
|
||||||
{
|
{
|
||||||
return (type == TYPE(0x62) || type == TYPE(0x63));
|
return (type == TYPE(0x62) || type == TYPE(0x63));
|
||||||
@ -1011,6 +1005,11 @@ bool Style::isMajorRoad(quint32 type)
|
|||||||
return (type <= TYPE(0x04));
|
return (type <= TYPE(0x04));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Style::isWaterAreaPOI(quint32 type)
|
||||||
|
{
|
||||||
|
return (type == 0x6603);
|
||||||
|
}
|
||||||
|
|
||||||
Style::POIClass Style::poiClass(quint32 type)
|
Style::POIClass Style::poiClass(quint32 type)
|
||||||
{
|
{
|
||||||
if ((type >= 0x2a00 && type < 0x2b00) || type == 0x2c0a || type == 0x2d02)
|
if ((type >= 0x2a00 && type < 0x2b00) || type == 0x2c0a || type == 0x2d02)
|
||||||
|
@ -112,7 +112,7 @@ public:
|
|||||||
static bool isMajorRoad(quint32 type);
|
static bool isMajorRoad(quint32 type);
|
||||||
static bool isWaterArea(quint32 type);
|
static bool isWaterArea(quint32 type);
|
||||||
static bool isMilitaryArea(quint32 type);
|
static bool isMilitaryArea(quint32 type);
|
||||||
static bool isInfrastructureArea(quint32 type);
|
static bool isWaterAreaPOI(quint32 type);
|
||||||
static POIClass poiClass(quint32 type);
|
static POIClass poiClass(quint32 type);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -391,8 +391,7 @@ void IMGMap::processPolygons(QList<IMG::Poly> &polygons,
|
|||||||
if (poly.label.text().isEmpty())
|
if (poly.label.text().isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (Style::isWaterArea(poly.type) || Style::isMilitaryArea(poly.type)
|
if (Style::isWaterArea(poly.type) || Style::isMilitaryArea(poly.type)) {
|
||||||
|| Style::isInfrastructureArea(poly.type)) {
|
|
||||||
const Style::Polygon &style = _img.style()->polygon(poly.type);
|
const Style::Polygon &style = _img.style()->polygon(poly.type);
|
||||||
TextPointItem *item = new TextPointItem(
|
TextPointItem *item = new TextPointItem(
|
||||||
centroid(poly.points).toPoint(), &poly.label.text(),
|
centroid(poly.points).toPoint(), &poly.label.text(),
|
||||||
@ -526,7 +525,8 @@ void IMGMap::processPoints(QList<IMG::Point> &points,
|
|||||||
IMG::Point &point = points[i];
|
IMG::Point &point = points[i];
|
||||||
const Style::Point &style = _img.style()->point(point.type);
|
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;
|
continue;
|
||||||
|
|
||||||
const QString *label = point.label.text().isEmpty()
|
const QString *label = point.label.text().isEmpty()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user