mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 07:55:13 +00:00
Removed string.Empty
This commit is contained in:
parent
e67d7ee1e3
commit
37b3809b8f
6 changed files with 13 additions and 17 deletions
|
|
@ -84,20 +84,16 @@ namespace MapControl
|
|||
|
||||
var styleElement = layerElement
|
||||
.Elements(wmts + "Style")
|
||||
.FirstOrDefault(s => s.Attribute("isDefault")?.Value == "true");
|
||||
|
||||
if (styleElement == null)
|
||||
{
|
||||
styleElement = layerElement
|
||||
.Elements(wmts + "Style")
|
||||
.FirstOrDefault();
|
||||
}
|
||||
.FirstOrDefault(s => s.Attribute("isDefault")?.Value == "true")
|
||||
?? layerElement
|
||||
.Elements(wmts + "Style")
|
||||
.FirstOrDefault();
|
||||
|
||||
var style = styleElement?.Element(ows + "Identifier")?.Value;
|
||||
|
||||
if (string.IsNullOrEmpty(style))
|
||||
{
|
||||
throw new ArgumentException($"No Style element found in Layer \"{layer}\".");
|
||||
style = "default";
|
||||
}
|
||||
|
||||
var urlTemplate = ReadUrlTemplate(capabilitiesElement, layerElement, layer, style, capabilitiesUrl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue