mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-02-17 16:20:48 +01:00
Compare commits
12 Commits
d4f48f71bb
...
14afa87f5b
Author | SHA1 | Date | |
---|---|---|---|
14afa87f5b | |||
b5f288133a | |||
6c768f4a61 | |||
8bfb6c7a7d | |||
5943ac2d89 | |||
57476bbe08 | |||
a9de6d9655 | |||
4e4f82fc9e | |||
0f380c73e5 | |||
93bc3bb107 | |||
fb0c8c8b76 | |||
ee20b02dfa |
@ -153,7 +153,7 @@
|
|||||||
<!-- City areas -->
|
<!-- City areas -->
|
||||||
<rule e="way" closed="yes" k="landuse" v="cemetery">
|
<rule e="way" closed="yes" k="landuse" v="cemetery">
|
||||||
<area src=":/patterns/cemetery.svg" symbol-width="30" symbol-height="28"/>
|
<area src=":/patterns/cemetery.svg" symbol-width="30" symbol-height="28"/>
|
||||||
<rule e="way" k="*" v="*" zoom-max="19">
|
<rule e="way" k="*" v="*" zoom-min="15">
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
@ -185,14 +185,12 @@
|
|||||||
<!-- Area overlays -->
|
<!-- Area overlays -->
|
||||||
<rule e="way" k="landuse" v="military" zoom-min="10">
|
<rule e="way" k="landuse" v="military" zoom-min="10">
|
||||||
<area src=":/patterns/military-area.svg" symbol-height="32"/>
|
<area src=":/patterns/military-area.svg" symbol-height="32"/>
|
||||||
<rule e="way" k="military" v="range|base|airfield|training_area" zoom-max="16">
|
|
||||||
<caption fill="#ff4040" font-size="10" font-style="italic" text-transform="uppercase" k="name" stroke="#ffffff" stroke-width="1"/>
|
<caption fill="#ff4040" font-size="10" font-style="italic" text-transform="uppercase" k="name" stroke="#ffffff" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
<rule e="way" k="boundary" v="protected_area|national_park" zoom-min="10" zoom-max="14">
|
||||||
<rule e="way" k="boundary" v="protected_area|national_park" zoom-min="10">
|
|
||||||
<rule e="way" k="protect_class" v="pr_2">
|
<rule e="way" k="protect_class" v="pr_2">
|
||||||
<area src=":/patterns/nature-reserve.svg" symbol-height="32"/>
|
<area src=":/patterns/nature-reserve.svg" symbol-height="32"/>
|
||||||
<rule e="way" k="*" v="*" zoom-max="16">
|
<rule e="way" k="*" v="*" zoom-max="12">
|
||||||
<caption fill="#9ac269" font-size="10" font-style="italic" text-transform="uppercase" k="name" stroke="#ffffff" stroke-width="1"/>
|
<caption fill="#9ac269" font-size="10" font-style="italic" text-transform="uppercase" k="name" stroke="#ffffff" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
@ -204,12 +202,16 @@
|
|||||||
</rule>
|
</rule>
|
||||||
<rule e="way" k="building" v="civic">
|
<rule e="way" k="building" v="civic">
|
||||||
<area fill="#cfc4b3" stroke="#cdccc4" stroke-width="0.1"/>
|
<area fill="#cfc4b3" stroke="#cdccc4" stroke-width="0.1"/>
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1"/>
|
<rule e="way" k="*" v="*" zoom-min="16">
|
||||||
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" priority="-10"/>
|
||||||
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="way" k="building" v="cathedral|church|basilica">
|
<rule e="way" k="building" v="cathedral|church|basilica">
|
||||||
<area fill="#a19d96" stroke="#cdccc4" stroke-width="0.1"/>
|
<area fill="#a19d96" stroke="#cdccc4" stroke-width="0.1"/>
|
||||||
|
<rule e="way" k="*" v="*" zoom-min="16">
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<rule e="any" k="addr:housenumber" v="*" zoom-min="19">
|
<rule e="any" k="addr:housenumber" v="*" zoom-min="19">
|
||||||
<caption fill="#aaaaaa" font-size="9" k="addr:housenumber" priority="-100"/>
|
<caption fill="#aaaaaa" font-size="9" k="addr:housenumber" priority="-100"/>
|
||||||
@ -285,13 +287,23 @@
|
|||||||
<!-- Roads & tracks -->
|
<!-- Roads & tracks -->
|
||||||
<rule e="way" k="highway" v="footway|path" zoom-min="16">
|
<rule e="way" k="highway" v="footway|path" zoom-min="16">
|
||||||
<rule e="way" k="area" v="~|no">
|
<rule e="way" k="area" v="~|no">
|
||||||
|
<rule e="way" k="tunnel" v="~|no">
|
||||||
<line stroke="#aba083" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
<line stroke="#aba083" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
<rule e="way" k="tunnel" v="yes|true">
|
||||||
|
<line stroke="#eeeeee" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
||||||
|
</rule>
|
||||||
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="way" k="highway" v="steps" zoom-min="16">
|
<rule e="way" k="highway" v="steps" zoom-min="16">
|
||||||
<rule e="way" k="area" v="~|no">
|
<rule e="way" k="area" v="~|no">
|
||||||
|
<rule e="way" k="tunnel" v="~|no">
|
||||||
<line stroke="#38352b" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
<line stroke="#38352b" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
<rule e="way" k="tunnel" v="yes|true">
|
||||||
|
<line stroke="#eeeeee" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
||||||
|
</rule>
|
||||||
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule e="way" k="highway" v="track">
|
<rule e="way" k="highway" v="track">
|
||||||
@ -512,10 +524,13 @@
|
|||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<!-- Town & vilage names -->
|
<!-- Town & vilage names -->
|
||||||
<rule e="node" k="place" v="locality" zoom-min="12">
|
<rule e="node" k="place" v="locality" zoom-min="14">
|
||||||
<caption fill="#000000" font-size="10" k="name" priority="10" stroke="#FFFFFF" stroke-width="1"/>
|
<caption fill="#000000" font-size="10" k="name" priority="10" stroke="#FFFFFF" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="node" k="place" v="village|hamlet" zoom-min="11">
|
<rule e="node" k="place" v="hamlet" zoom-min="12">
|
||||||
|
<caption fill="#000000" font-size="12" k="name" priority="20" stroke="#FFFFFF" stroke-width="1"/>
|
||||||
|
</rule>
|
||||||
|
<rule e="node" k="place" v="village" zoom-min="11">
|
||||||
<caption fill="#000000" font-size="12" k="name" priority="20" stroke="#FFFFFF" stroke-width="1"/>
|
<caption fill="#000000" font-size="12" k="name" priority="20" stroke="#FFFFFF" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="node" k="place" v="town" zoom-min="9">
|
<rule e="node" k="place" v="town" zoom-min="9">
|
||||||
@ -569,10 +584,10 @@
|
|||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<!-- City POIs -->
|
<!-- City POIs -->
|
||||||
<rule e="any" k="amenity|building" v="hospital" zoom-min="14">
|
<rule e="any" k="amenity|building" v="hospital" zoom-min="15">
|
||||||
<rule e="any" k="name" v="*">
|
<rule e="any" k="name" v="*">
|
||||||
<symbol id="hospital" src=":/POI/hospital-11.svg" symbol-width="11" priority="20"/>
|
<symbol id="hospital" src=":/POI/hospital-11.svg" symbol-width="11" priority="20"/>
|
||||||
<rule e="any" k="*" v="*" zoom-min="15">
|
<rule e="any" k="*" v="*" zoom-min="16">
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="hospital"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="hospital"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
@ -581,18 +596,22 @@
|
|||||||
<symbol id="doctor" src=":/POI/doctor-11.svg" symbol-width="11"/>
|
<symbol id="doctor" src=":/POI/doctor-11.svg" symbol-width="11"/>
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="doctor"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="doctor"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="any" k="amenity|building" v="police" zoom-min="14">
|
<rule e="any" k="amenity|building" v="police" zoom-min="15">
|
||||||
<symbol id="police" src=":/POI/police-11.svg" symbol-width="11" priority="19"/>
|
<symbol id="police" src=":/POI/police-11.svg" symbol-width="11" priority="19"/>
|
||||||
<rule e="any" k="*" v="*" zoom-min="17">
|
<rule e="any" k="*" v="*" zoom-min="17">
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="police"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="police"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="any" k="amenity|building" v="fire_station" zoom-min="14">
|
<rule e="any" k="amenity|building" v="fire_station" zoom-min="15">
|
||||||
<symbol id="fire-station" src=":/POI/fire-station-11.svg" symbol-width="11" priority="18"/>
|
<symbol id="fire-station" src=":/POI/fire-station-11.svg" symbol-width="11" priority="18"/>
|
||||||
<rule e="any" k="*" v="*" zoom-min="17">
|
<rule e="any" k="*" v="*" zoom-min="17">
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="fire-station"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="fire-station"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
|
<rule e="any" k="barrier" v="border_control|checkpoint" zoom-min="15">
|
||||||
|
<symbol id="checkpoint" src=":/POI/entrance-alt1-11.svg" symbol-width="11" priority="20"/>
|
||||||
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="checkpoint"/>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<rule e="any" k="aeroway" v="helipad" zoom-min="14">
|
<rule e="any" k="aeroway" v="helipad" zoom-min="14">
|
||||||
<symbol id="heliport" src=":/POI/heliport-11.svg" symbol-width="11"/>
|
<symbol id="heliport" src=":/POI/heliport-11.svg" symbol-width="11"/>
|
||||||
@ -698,7 +717,7 @@
|
|||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="any" k="amenity|building" v="library" zoom-min="16">
|
<rule e="any" k="amenity|building" v="library" zoom-min="16">
|
||||||
<symbol id="library" src=":/POI/lbrary-11.svg" symbol-width="11"/>
|
<symbol id="library" src=":/POI/library-11.svg" symbol-width="11"/>
|
||||||
<rule e="any" k="*" v="*" zoom-min="17">
|
<rule e="any" k="*" v="*" zoom-min="17">
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="library"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="library"/>
|
||||||
</rule>
|
</rule>
|
||||||
@ -736,6 +755,18 @@
|
|||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="castle"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="castle"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
|
<rule e="any" k="amenity" v="townhall" zoom-min="16">
|
||||||
|
<symbol id="townhall" src=":/POI/town-hall-11.svg" symbol-width="11"/>
|
||||||
|
<rule e="any" k="*" v="*" zoom-min="17">
|
||||||
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="townhall"/>
|
||||||
|
</rule>
|
||||||
|
</rule>
|
||||||
|
<rule e="any" k="amenity" v="school|university" zoom-min="16">
|
||||||
|
<symbol id="school" src=":/POI/school-11.svg" symbol-width="11"/>
|
||||||
|
<rule e="any" k="*" v="*" zoom-min="17">
|
||||||
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="school"/>
|
||||||
|
</rule>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<rule e="any" k="sport" v="swimming" zoom-min="16">
|
<rule e="any" k="sport" v="swimming" zoom-min="16">
|
||||||
<symbol id="swimming" src=":/POI/swimming-11.svg" symbol-width="11"/>
|
<symbol id="swimming" src=":/POI/swimming-11.svg" symbol-width="11"/>
|
||||||
|
@ -697,11 +697,12 @@ bool MapData::readPoints(const VectorTile *tile, int zoom, QList<Point> *list)
|
|||||||
|
|
||||||
for (unsigned i = 0; i < points[zoom - info.min]; i++) {
|
for (unsigned i = 0; i < points[zoom - info.min]; i++) {
|
||||||
qint32 lat, lon;
|
qint32 lat, lon;
|
||||||
|
Point p(subfile.pos());
|
||||||
|
|
||||||
if (!(subfile.readVInt32(lat) && subfile.readVInt32(lon)))
|
if (!(subfile.readVInt32(lat) && subfile.readVInt32(lon)))
|
||||||
return false;
|
return false;
|
||||||
Point p(Coordinates(tile->pos.lon() + MD(lon),
|
p.coordinates = Coordinates(tile->pos.lon() + MD(lon),
|
||||||
tile->pos.lat() + MD(lat)));
|
tile->pos.lat() + MD(lat));
|
||||||
|
|
||||||
if (!subfile.readByte(sb))
|
if (!subfile.readByte(sb))
|
||||||
return false;
|
return false;
|
||||||
|
@ -37,7 +37,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct Point {
|
struct Point {
|
||||||
Point(const Coordinates &c) : id(qHash(c)), coordinates(c) {}
|
Point(quint64 id) : id(id) {}
|
||||||
|
|
||||||
quint64 id;
|
quint64 id;
|
||||||
Coordinates coordinates;
|
Coordinates coordinates;
|
||||||
|
@ -161,7 +161,6 @@ void RasterTile::processAreaLabels(const QVector<PainterPath> &paths,
|
|||||||
QList<const Style::TextRender*> labels(_style->areaLabels(_zoom));
|
QList<const Style::TextRender*> labels(_style->areaLabels(_zoom));
|
||||||
QList<const Style::Symbol*> symbols(_style->areaSymbols(_zoom));
|
QList<const Style::Symbol*> symbols(_style->areaSymbols(_zoom));
|
||||||
QList<PathText> items;
|
QList<PathText> items;
|
||||||
QSet<QByteArray> set;
|
|
||||||
|
|
||||||
for (int i = 0; i < paths.size(); i++) {
|
for (int i = 0; i < paths.size(); i++) {
|
||||||
const PainterPath &path = paths.at(i);
|
const PainterPath &path = paths.at(i);
|
||||||
@ -207,17 +206,12 @@ void RasterTile::processAreaLabels(const QVector<PainterPath> &paths,
|
|||||||
|
|
||||||
QPointF pos = p.p->path->labelPos.isNull()
|
QPointF pos = p.p->path->labelPos.isNull()
|
||||||
? centroid(p.p->pp) : ll2xy(p.p->path->labelPos);
|
? centroid(p.p->pp) : ll2xy(p.p->path->labelPos);
|
||||||
if (p.ti && p.lbl && set.contains(*p.lbl))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color,
|
PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color,
|
||||||
hColor);
|
hColor);
|
||||||
if (item->isValid() && rectNearPolygon(p.p->pp, item->boundingRect())
|
if (item->isValid() && rectNearPolygon(p.p->pp, item->boundingRect())
|
||||||
&& !item->collides(textItems)) {
|
&& !item->collides(textItems))
|
||||||
textItems.append(item);
|
textItems.append(item);
|
||||||
if (p.ti && p.lbl)
|
else
|
||||||
set.insert(*p.lbl);
|
|
||||||
} else
|
|
||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user