mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-01-05 08:10:15 +01:00
Removed string.Empty
This commit is contained in:
parent
e67d7ee1e3
commit
37b3809b8f
|
|
@ -37,7 +37,7 @@ namespace MapControl
|
|||
/// <summary>
|
||||
/// Gets the WMS 1.3.0 CRS identifier.
|
||||
/// </summary>
|
||||
public string CrsId { get; protected set; } = string.Empty;
|
||||
public string CrsId { get; protected set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an optional projection center.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace MapControl
|
|||
async (layer, oldValue, newValue) => await layer.UpdateImageAsync());
|
||||
|
||||
public static readonly DependencyProperty WmsStylesProperty =
|
||||
DependencyPropertyHelper.Register<WmsImageLayer, string>(nameof(WmsStyles), string.Empty,
|
||||
DependencyPropertyHelper.Register<WmsImageLayer, string>(nameof(WmsStyles), "",
|
||||
async (layer, oldValue, newValue) => await layer.UpdateImageAsync());
|
||||
|
||||
public static readonly DependencyProperty WmsLayersProperty =
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -89,14 +89,14 @@ namespace SampleApplication
|
|||
else
|
||||
{
|
||||
mouseLocation.Visibility = Visibility.Collapsed;
|
||||
mouseLocation.Text = string.Empty;
|
||||
mouseLocation.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
private void MapPointerExited(object sender, PointerRoutedEventArgs e)
|
||||
{
|
||||
mouseLocation.Visibility = Visibility.Collapsed;
|
||||
mouseLocation.Text = string.Empty;
|
||||
mouseLocation.Text = "";
|
||||
}
|
||||
|
||||
private static string GetLatLonText(Location location)
|
||||
|
|
|
|||
|
|
@ -102,14 +102,14 @@ namespace SampleApplication
|
|||
else
|
||||
{
|
||||
mouseLocation.Visibility = Visibility.Collapsed;
|
||||
mouseLocation.Text = string.Empty;
|
||||
mouseLocation.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
private void MapPointerExited(object sender, PointerRoutedEventArgs e)
|
||||
{
|
||||
mouseLocation.Visibility = Visibility.Collapsed;
|
||||
mouseLocation.Text = string.Empty;
|
||||
mouseLocation.Text = "";
|
||||
}
|
||||
|
||||
private static string GetLatLonText(Location location)
|
||||
|
|
|
|||
|
|
@ -94,14 +94,14 @@ namespace SampleApplication
|
|||
else
|
||||
{
|
||||
mouseLocation.Visibility = Visibility.Collapsed;
|
||||
mouseLocation.Text = string.Empty;
|
||||
mouseLocation.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
private void MapMouseLeave(object sender, MouseEventArgs e)
|
||||
{
|
||||
mouseLocation.Visibility = Visibility.Collapsed;
|
||||
mouseLocation.Text = string.Empty;
|
||||
mouseLocation.Text = "";
|
||||
}
|
||||
|
||||
private void MapManipulationInertiaStarting(object sender, ManipulationInertiaStartingEventArgs e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue