From d7f0cda4b23f4f4cb1c93801e614554419e54397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 29 Feb 2020 21:40:13 +0100 Subject: [PATCH] Properly parse the ScaleHint tag --- src/map/wms.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/map/wms.cpp b/src/map/wms.cpp index fa17124f..cff20e02 100644 --- a/src/map/wms.cpp +++ b/src/map/wms.cpp @@ -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)