1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +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(); QXmlStreamAttributes attr = reader.attributes();
double minHint = attr.value("min").toString().toDouble(); double minHint = attr.value("min").toString().toDouble();
double maxHint = attr.value("max").toString().toDouble(); double maxHint = attr.value("max").toString().toDouble();
if (minHint > 0)
scaleDenominator.setMin(hint2denominator(minHint)); scaleDenominator.setMin(hint2denominator(minHint));
if (maxHint > 0)
scaleDenominator.setMax(hint2denominator(maxHint)); scaleDenominator.setMax(hint2denominator(maxHint));
reader.skipCurrentElement();
} else if (reader.name() == "MinScaleDenominator") { } else if (reader.name() == "MinScaleDenominator") {
double sd = reader.readElementText().toDouble(); double sd = reader.readElementText().toDouble();
if (sd > 0) if (sd > 0)