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:
parent
a898ff2807
commit
d7f0cda4b2
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user