Version 4.10.0: Updated target framework versions. Cleanup of TypeConverters, ImageLoader, MBTileSource.

This commit is contained in:
ClemensF 2018-08-14 23:13:58 +02:00
parent f2a9dd9d0d
commit d859a9c4f9
7 changed files with 123 additions and 14 deletions

View file

@ -1,9 +1,11 @@
using MapControl;
using MapControl.Caching;
using ViewModel;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Media;
namespace UniversalApp
{
@ -13,11 +15,40 @@ namespace UniversalApp
public MainPage()
{
//TileImageLoader.Cache = new ImageFileCache(TileImageLoader.DefaultCacheFolder);
TileImageLoader.Cache = new ImageFileCache(TileImageLoader.DefaultCacheFolder);
//TileImageLoader.Cache = new FileDbCache(TileImageLoader.DefaultCacheFolder);
InitializeComponent();
DataContext = ViewModel;
for (var x = -180d; x < 180d; x += 15d)
{
var location = new Location(0d, x);
var locations = new LocationCollection
{
new Location(0, x - 5),
new Location(5, x),
new Location(0, x + 5),
new Location(-5, x)
};
map.Children.Add(new MapPolygon
{
Fill = new SolidColorBrush(Colors.Red) { Opacity = 0.25 },
Stroke = new SolidColorBrush(Colors.Red),
StrokeThickness = 2,
StrokeLineJoin = PenLineJoin.Round,
Locations = locations,
Location = location,
});
map.Children.Add(new Pushpin
{
Content = x,
Location = location,
});
}
}
private void ImageOpacitySliderValueChanged(object sender, RangeBaseValueChangedEventArgs e)