mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
XDocument.LoadRootElementAsync
This commit is contained in:
parent
fedf5eba12
commit
cd40a627ce
6 changed files with 53 additions and 42 deletions
|
|
@ -114,7 +114,7 @@ namespace MapControl
|
|||
{
|
||||
using var stream = await ImageLoader.HttpClient.GetStreamAsync(uri);
|
||||
|
||||
element = XDocument.Load(stream).Root;
|
||||
element = await XDocument.LoadRootElementAsync(stream);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -170,7 +170,7 @@ namespace MapControl
|
|||
if (ServiceUri != null && ParentMap?.MapProjection != null)
|
||||
{
|
||||
if (WmsLayers == null &&
|
||||
ServiceUri.ToString().IndexOf("LAYERS=", StringComparison.OrdinalIgnoreCase) < 0)
|
||||
ServiceUri.OriginalString.IndexOf("LAYERS=", StringComparison.OrdinalIgnoreCase) < 0)
|
||||
{
|
||||
// Get first Layer from a GetCapabilities response.
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue