Version 4.2.0

This commit is contained in:
ClemensF 2017-10-08 17:35:07 +02:00
parent 9f8ef8acb0
commit fd02476c6b
17 changed files with 174 additions and 141 deletions

View file

@ -10,9 +10,13 @@ using System.Threading.Tasks;
#if WINDOWS_UWP
using Windows.Data.Xml.Dom;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Imaging;
#else
using System.Windows;
using System.Xml;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
#endif
namespace MapControl
@ -81,25 +85,25 @@ namespace MapControl
set { SetValue(TransparentProperty, value); }
}
protected override bool UpdateImage(BoundingBox boundingBox)
protected override ImageSource GetImage(BoundingBox boundingBox)
{
if (ServerUri == null)
{
return false;
return null;
}
var projectionParameters = ParentMap.MapProjection.WmsQueryParameters(boundingBox, Version);
if (string.IsNullOrEmpty(projectionParameters))
{
return false;
return null;
}
UpdateImage(GetRequestUri("GetMap"
var uri = GetRequestUri("GetMap"
+ "&LAYERS=" + Layers + "&STYLES=" + Styles + "&FORMAT=" + Format
+ "&TRANSPARENT=" + (Transparent ? "TRUE" : "FALSE") + "&" + projectionParameters));
+ "&TRANSPARENT=" + (Transparent ? "TRUE" : "FALSE") + "&" + projectionParameters);
return true;
return new BitmapImage(uri);
}
public async Task<IList<string>> GetLayerNamesAsync()