1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-18 19:52:09 +01:00

Enable empty WMTS styles

This commit is contained in:
Martin Tůma 2019-02-15 20:32:53 +01:00
parent ec9d81c65a
commit 1444a88ad0

View File

@ -179,7 +179,7 @@ void WMTS::layer(QXmlStreamReader &reader, CTX &ctx)
QString s = style(reader);
if (isDefault)
ctx.defaultStyle = s;
if (!s.isEmpty() && s == ctx.setup.style())
if (s == ctx.setup.style())
ctx.hasStyle = true;
} else if (reader.name() == "Format") {
if (reader.readElementText() == ctx.setup.format())
@ -257,7 +257,8 @@ bool WMTS::parseCapabilities(const QString &path, CTX &ctx)
_errorString = ctx.setup.style() + ": style not provided";
return false;
}
if (ctx.setup.style().isEmpty() && ctx.defaultStyle.isEmpty()) {
if (!ctx.hasStyle && ctx.setup.style().isEmpty()
&& ctx.defaultStyle.isEmpty()) {
_errorString = "Default style not provided";
return false;
}