mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Added land and see areas labels
This commit is contained in:
parent
3e60d0c84a
commit
be75165088
@ -288,7 +288,7 @@ MapData::Point::Point(uint type, const Coordinates &c, const QString &label,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MapData::Poly::Poly(uint type, const Polygon &path,
|
MapData::Poly::Poly(uint type, const Polygon &path, const QString &label,
|
||||||
const QVector<QByteArray> ¶ms, uint HUNI) : _type(type), _path(path)
|
const QVector<QByteArray> ¶ms, uint HUNI) : _type(type), _path(path)
|
||||||
{
|
{
|
||||||
if (type == TYPE(DEPARE) && params.size())
|
if (type == TYPE(DEPARE) && params.size())
|
||||||
@ -302,7 +302,8 @@ MapData::Poly::Poly(uint type, const Polygon &path,
|
|||||||
_label = QString::fromUtf8("\xE2\x86\x95") + UNIT_SPACE
|
_label = QString::fromUtf8("\xE2\x86\x95") + UNIT_SPACE
|
||||||
+ QString::number(clr) + UNIT_SPACE + hUnits(HUNI);
|
+ QString::number(clr) + UNIT_SPACE + hUnits(HUNI);
|
||||||
}
|
}
|
||||||
}
|
} else if (type>>16 == LNDARE || type>>16 == SEAARE)
|
||||||
|
_label = label;
|
||||||
}
|
}
|
||||||
|
|
||||||
MapData::Line::Line(uint type, const QVector<Coordinates> &path,
|
MapData::Line::Line(uint type, const QVector<Coordinates> &path,
|
||||||
@ -647,6 +648,9 @@ MapData::Attr MapData::polyAttr(const ISO8211::Record &r, uint OBJL)
|
|||||||
const QVector<QVariant> &av = ATTF->data().at(i);
|
const QVector<QVariant> &av = ATTF->data().at(i);
|
||||||
uint key = av.at(0).toUInt();
|
uint key = av.at(0).toUInt();
|
||||||
|
|
||||||
|
if (key == OBJNAM)
|
||||||
|
label = QString::fromLatin1(av.at(1).toByteArray());
|
||||||
|
|
||||||
if ((OBJL == RESARE && key == CATREA)
|
if ((OBJL == RESARE && key == CATREA)
|
||||||
|| (OBJL == I_RESARE && key == CATREA)
|
|| (OBJL == I_RESARE && key == CATREA)
|
||||||
|| (OBJL == ACHARE && key == CATACH)
|
|| (OBJL == ACHARE && key == CATACH)
|
||||||
@ -707,7 +711,7 @@ MapData::Poly *MapData::polyObject(const ISO8211::Record &r,
|
|||||||
Attr attr(polyAttr(r, OBJL));
|
Attr attr(polyAttr(r, OBJL));
|
||||||
|
|
||||||
return (path.isEmpty() ? 0 : new Poly(SUBTYPE(OBJL, attr.subtype()), path,
|
return (path.isEmpty() ? 0 : new Poly(SUBTYPE(OBJL, attr.subtype()), path,
|
||||||
attr.params(), HUNI));
|
attr.label(), attr.params(), HUNI));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MapData::processRecord(const ISO8211::Record &record,
|
bool MapData::processRecord(const ISO8211::Record &record,
|
||||||
|
@ -13,8 +13,8 @@ class MapData
|
|||||||
public:
|
public:
|
||||||
class Poly {
|
class Poly {
|
||||||
public:
|
public:
|
||||||
Poly(uint type, const Polygon &path, const QVector<QByteArray> ¶ms,
|
Poly(uint type, const Polygon &path, const QString &label,
|
||||||
uint HUNI);
|
const QVector<QByteArray> ¶ms, uint HUNI);
|
||||||
|
|
||||||
RectC bounds() const {return _path.boundingRect();}
|
RectC bounds() const {return _path.boundingRect();}
|
||||||
const Polygon &path() const {return _path;}
|
const Polygon &path() const {return _path;}
|
||||||
|
@ -78,6 +78,7 @@
|
|||||||
#define RESARE 112
|
#define RESARE 112
|
||||||
#define RIVERS 114
|
#define RIVERS 114
|
||||||
#define ROADWY 116
|
#define ROADWY 116
|
||||||
|
#define SEAARE 119
|
||||||
#define SLCONS 122
|
#define SLCONS 122
|
||||||
#define SISTAT 123
|
#define SISTAT 123
|
||||||
#define SILTNK 125
|
#define SILTNK 125
|
||||||
|
@ -334,6 +334,7 @@ void Style::pointStyle(qreal ratio)
|
|||||||
_points[TYPE(CURENT)] = Point(QImage(":/marine/current.png"));
|
_points[TYPE(CURENT)] = Point(QImage(":/marine/current.png"));
|
||||||
_points[SUBTYPE(WEDKLP, 0)] = Point(QImage(":/marine/kelp.png"));
|
_points[SUBTYPE(WEDKLP, 0)] = Point(QImage(":/marine/kelp.png"));
|
||||||
_points[SUBTYPE(WEDKLP, 1)] = Point(QImage(":/marine/kelp.png"));
|
_points[SUBTYPE(WEDKLP, 1)] = Point(QImage(":/marine/kelp.png"));
|
||||||
|
_points[TYPE(SEAARE)].setHaloColor(QColor());
|
||||||
|
|
||||||
_points[SUBTYPE(SMCFAC, 7)] = Point(svg2img(":/POI/restaurant-11.svg",
|
_points[SUBTYPE(SMCFAC, 7)] = Point(svg2img(":/POI/restaurant-11.svg",
|
||||||
ratio), Small);
|
ratio), Small);
|
||||||
|
Loading…
Reference in New Issue
Block a user