diff --git a/gpxsee.qrc b/gpxsee.qrc
index 0c5d86cb..70029704 100644
--- a/gpxsee.qrc
+++ b/gpxsee.qrc
@@ -58,6 +58,9 @@
icons/map/arrow.png
+ icons/map/arrow@2x.png
+ icons/map/water-arrow.png
+ icons/map/water-arrow@2x.png
diff --git a/icons/map/arrow@2x.png b/icons/map/arrow@2x.png
new file mode 100644
index 00000000..3dffad2c
Binary files /dev/null and b/icons/map/arrow@2x.png differ
diff --git a/icons/map/water-arrow.png b/icons/map/water-arrow.png
new file mode 100644
index 00000000..50d1f8b3
Binary files /dev/null and b/icons/map/water-arrow.png differ
diff --git a/icons/map/water-arrow@2x.png b/icons/map/water-arrow@2x.png
new file mode 100644
index 00000000..a57bb6ad
Binary files /dev/null and b/icons/map/water-arrow@2x.png differ
diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp
index dfecb211..02a7616c 100644
--- a/src/map/IMG/rastertile.cpp
+++ b/src/map/IMG/rastertile.cpp
@@ -25,12 +25,6 @@ static const QColor shieldBgColor1("#dd3e3e");
static const QColor shieldBgColor2("#379947");
static const QColor shieldBgColor3("#4a7fc1");
-static const QImage *arrow()
-{
- static QImage img(":/map/arrow.png");
- return &img;
-}
-
static QFont pixelSizeFont(int pixelSize)
{
QFont f;
@@ -308,17 +302,17 @@ void RasterTile::processPolygons(const QList &polygons,
}
void RasterTile::processLines(QList &lines,
- QList &textItems)
+ QList &textItems, const QImage &arrow, const QImage &waterArrow)
{
std::stable_sort(lines.begin(), lines.end());
if (_zoom >= 22)
- processStreetNames(lines, textItems);
+ processStreetNames(lines, textItems, arrow, waterArrow);
processShields(lines, textItems);
}
void RasterTile::processStreetNames(const QList &lines,
- QList &textItems)
+ QList &textItems, const QImage &arrow, const QImage &waterArrow)
{
for (int i = 0; i < lines.size(); i++) {
const MapData::Poly &poly = lines.at(i);
@@ -334,7 +328,9 @@ void RasterTile::processStreetNames(const QList &lines,
const QColor *color = style.textColor().isValid()
? &style.textColor() : 0;
const QColor *hColor = Style::isContourLine(poly.type) ? 0 : &haloColor;
- const QImage *img = poly.oneway ? arrow() : 0;
+ const QImage *img = poly.oneway
+ ? Style::isWaterLine(poly.type)
+ ? &waterArrow : &arrow : 0;
TextPathItem *item = new TextPathItem(poly.points,
&poly.label.text(), _rect, fnt, color, hColor, img);
@@ -479,6 +475,10 @@ void RasterTile::render()
QList lines;
QList points;
QList textItems;
+ QImage arrow = (_ratio >= 2)
+ ? QImage(":/map/arrow@2x.png") : QImage(":/map/arrow.png");
+ QImage waterArrow = (_ratio >= 2)
+ ? QImage(":/map/water-arrow@2x.png") : QImage(":/map/water-arrow.png");
fetchData(polygons, lines, points);
ll2xy(polygons);
@@ -487,7 +487,7 @@ void RasterTile::render()
processPoints(points, textItems);
processPolygons(polygons, textItems);
- processLines(lines, textItems);
+ processLines(lines, textItems, arrow, waterArrow);
_pixmap.setDevicePixelRatio(_ratio);
_pixmap.fill(Qt::transparent);
diff --git a/src/map/IMG/rastertile.h b/src/map/IMG/rastertile.h
index 8002c8b8..9ba1724d 100644
--- a/src/map/IMG/rastertile.h
+++ b/src/map/IMG/rastertile.h
@@ -45,13 +45,13 @@ private:
void processPolygons(const QList &polygons,
QList &textItems);
void processLines(QList &lines,
- QList &textItems);
+ QList &textItems, const QImage &arrow, const QImage &waterArrow);
void processPoints(QList &points,
QList &textItems);
void processShields(const QList &lines,
QList &textItems);
void processStreetNames(const QList &lines,
- QList &textItems);
+ QList &textItems, const QImage &arrow, const QImage &waterArrow);
Projection _proj;
Transform _transform;
diff --git a/src/map/IMG/style.h b/src/map/IMG/style.h
index e04ae3e3..559dde73 100644
--- a/src/map/IMG/style.h
+++ b/src/map/IMG/style.h
@@ -104,6 +104,9 @@ public:
static bool isWaterArea(quint32 type)
{return ((type >= TYPE(0x3c) && type <= TYPE(0x44))
|| (type & 0xffff00) == TYPE(0x10b));}
+ static bool isWaterLine(quint32 type)
+ {return (type == TYPE(0x26) || type == TYPE(0x18)
+ || type == TYPE(0x1f));}
static bool isMilitaryArea(quint32 type)
{return (type == TYPE(0x04) || type == 0x10901);}
static bool isNatureReserve(quint32 type)