mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-31 09:05:14 +01:00
Enable empty WMTS styles
This commit is contained in:
parent
ec9d81c65a
commit
1444a88ad0
@ -179,7 +179,7 @@ void WMTS::layer(QXmlStreamReader &reader, CTX &ctx)
|
|||||||
QString s = style(reader);
|
QString s = style(reader);
|
||||||
if (isDefault)
|
if (isDefault)
|
||||||
ctx.defaultStyle = s;
|
ctx.defaultStyle = s;
|
||||||
if (!s.isEmpty() && s == ctx.setup.style())
|
if (s == ctx.setup.style())
|
||||||
ctx.hasStyle = true;
|
ctx.hasStyle = true;
|
||||||
} else if (reader.name() == "Format") {
|
} else if (reader.name() == "Format") {
|
||||||
if (reader.readElementText() == ctx.setup.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";
|
_errorString = ctx.setup.style() + ": style not provided";
|
||||||
return false;
|
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";
|
_errorString = "Default style not provided";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user