mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-03-18 12:37:45 +01:00
Alwas show the area pictograms
This commit is contained in:
parent
59be4aaf1a
commit
c4e44c8796
src/map/ENC
@ -185,7 +185,7 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context)
|
|||||||
|| type == SUBTYPE(I_ACHARE, 3) || type == SUBTYPE(I_ACHARE, 9)
|
|| type == SUBTYPE(I_ACHARE, 3) || type == SUBTYPE(I_ACHARE, 9)
|
||||||
|| type == SUBTYPE(I_BERTHS, 6))
|
|| type == SUBTYPE(I_BERTHS, 6))
|
||||||
points->append(MapData::Point(baseType, polygon->bounds().center(),
|
points->append(MapData::Point(baseType, polygon->bounds().center(),
|
||||||
polygon->attributes(), polygon->HUNI()));
|
polygon->attributes(), polygon->HUNI(), true));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -286,13 +286,13 @@ static QString weed(uint type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MapData::Point::Point(uint type, const Coordinates &c, const QString &label)
|
MapData::Point::Point(uint type, const Coordinates &c, const QString &label)
|
||||||
: _type(SUBTYPE(type, 0)), _pos(c), _label(label)
|
: _type(SUBTYPE(type, 0)), _pos(c), _label(label), _polygon(false)
|
||||||
{
|
{
|
||||||
_id = ((quint64)order(_type))<<32 | (uint)qHash(c);
|
_id = ((quint64)order(_type))<<32 | (uint)qHash(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
|
MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
|
||||||
uint HUNI) : _pos(c), _attr(attr)
|
uint HUNI, bool polygon) : _pos(c), _attr(attr), _polygon(polygon)
|
||||||
{
|
{
|
||||||
uint subtype = 0;
|
uint subtype = 0;
|
||||||
|
|
||||||
|
@ -49,13 +49,15 @@ public:
|
|||||||
|
|
||||||
class Point {
|
class Point {
|
||||||
public:
|
public:
|
||||||
Point(uint type, const Coordinates &c, const Attributes &attr, uint HUNI);
|
Point(uint type, const Coordinates &c, const Attributes &attr,
|
||||||
|
uint HUNI, bool polygon = false);
|
||||||
Point(uint type, const Coordinates &s, const QString &label);
|
Point(uint type, const Coordinates &s, const QString &label);
|
||||||
|
|
||||||
const Coordinates &pos() const {return _pos;}
|
const Coordinates &pos() const {return _pos;}
|
||||||
uint type() const {return _type;}
|
uint type() const {return _type;}
|
||||||
const QString &label() const {return _label;}
|
const QString &label() const {return _label;}
|
||||||
const Attributes &attributes() const {return _attr;}
|
const Attributes &attributes() const {return _attr;}
|
||||||
|
bool polygon() const {return _polygon;}
|
||||||
|
|
||||||
bool operator<(const Point &other) const
|
bool operator<(const Point &other) const
|
||||||
{return _id < other._id;}
|
{return _id < other._id;}
|
||||||
@ -66,6 +68,7 @@ public:
|
|||||||
QString _label;
|
QString _label;
|
||||||
quint64 _id;
|
quint64 _id;
|
||||||
Attributes _attr;
|
Attributes _attr;
|
||||||
|
bool _polygon;
|
||||||
};
|
};
|
||||||
|
|
||||||
MapData(const QString &path);
|
MapData(const QString &path);
|
||||||
|
@ -313,7 +313,7 @@ void RasterTile::processPoints(QList<MapData::Point> &points,
|
|||||||
TextPointItem *item = new TextPointItem(pos + offset, label, fnt, img,
|
TextPointItem *item = new TextPointItem(pos + offset, label, fnt, img,
|
||||||
color, hColor, 0, 2, rotate);
|
color, hColor, 0, 2, rotate);
|
||||||
if (item->isValid() && (slMap.contains(point.pos())
|
if (item->isValid() && (slMap.contains(point.pos())
|
||||||
|| !item->collides(textItems))) {
|
|| (point.polygon() && img) || !item->collides(textItems))) {
|
||||||
textItems.append(item);
|
textItems.append(item);
|
||||||
if (lightsMap.contains(point.pos()))
|
if (lightsMap.contains(point.pos()))
|
||||||
lights.append(new TextPointItem(pos + _style->lightOffset(),
|
lights.append(new TextPointItem(pos + _style->lightOffset(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user