1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Properly parse the ScaleHint tag

This commit is contained in:
Martin Tůma 2020-02-29 21:40:13 +01:00
parent a898ff2807
commit d7f0cda4b2

View File

@ -110,8 +110,11 @@ void WMS::layer(QXmlStreamReader &reader, CTX &ctx,
QXmlStreamAttributes attr = reader.attributes();
double minHint = attr.value("min").toString().toDouble();
double maxHint = attr.value("max").toString().toDouble();
scaleDenominator.setMin(hint2denominator(minHint));
scaleDenominator.setMax(hint2denominator(maxHint));
if (minHint > 0)
scaleDenominator.setMin(hint2denominator(minHint));
if (maxHint > 0)
scaleDenominator.setMax(hint2denominator(maxHint));
reader.skipCurrentElement();
} else if (reader.name() == "MinScaleDenominator") {
double sd = reader.readElementText().toDouble();
if (sd > 0)