mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-03-31 18:45:41 +02:00
Version 4.12.1 Added User-Agent HTTP header
This commit is contained in:
parent
ae09b0e55d
commit
644005c03e
|
|
@ -10,6 +10,7 @@ using System.Threading.Tasks;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
#if WINDOWS_UWP
|
#if WINDOWS_UWP
|
||||||
using Windows.Data.Xml.Dom;
|
using Windows.Data.Xml.Dom;
|
||||||
|
using Windows.Foundation;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Media;
|
using Windows.UI.Xaml.Media;
|
||||||
#else
|
#else
|
||||||
|
|
@ -242,7 +243,7 @@ namespace MapControl
|
||||||
|
|
||||||
private static IEnumerable<XmlElement> ChildElements(XmlElement element, string name)
|
private static IEnumerable<XmlElement> ChildElements(XmlElement element, string name)
|
||||||
{
|
{
|
||||||
return element.ChildNodes.OfType<XmlElement>().Where(e => e.LocalName == name);
|
return element.ChildNodes.OfType<XmlElement>().Where(e => (string)e.LocalName == name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
using MapControl;
|
using MapControl;
|
||||||
using MapControl.Caching;
|
|
||||||
using ViewModel;
|
using ViewModel;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
|
|
@ -13,6 +12,7 @@ namespace UniversalApp
|
||||||
|
|
||||||
public MainPage()
|
public MainPage()
|
||||||
{
|
{
|
||||||
|
ImageLoader.HttpClient.DefaultRequestHeaders.Add("User-Agent", "XAML Map Control Test Application");
|
||||||
//TileImageLoader.Cache = new ImageFileCache(TileImageLoader.DefaultCacheFolder);
|
//TileImageLoader.Cache = new ImageFileCache(TileImageLoader.DefaultCacheFolder);
|
||||||
//TileImageLoader.Cache = new FileDbCache(TileImageLoader.DefaultCacheFolder);
|
//TileImageLoader.Cache = new FileDbCache(TileImageLoader.DefaultCacheFolder);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -149,12 +149,10 @@
|
||||||
|
|
||||||
<map:MapItemsControl ItemsSource="{Binding Points}"
|
<map:MapItemsControl ItemsSource="{Binding Points}"
|
||||||
ItemContainerStyle="{StaticResource PointItemStyle}"
|
ItemContainerStyle="{StaticResource PointItemStyle}"
|
||||||
IsSynchronizedWithCurrentItem="True"
|
|
||||||
SelectionMode="Extended"/>
|
SelectionMode="Extended"/>
|
||||||
|
|
||||||
<map:MapItemsControl ItemsSource="{Binding Pushpins}"
|
<map:MapItemsControl ItemsSource="{Binding Pushpins}"
|
||||||
ItemContainerStyle="{StaticResource PushpinItemStyle}"
|
ItemContainerStyle="{StaticResource PushpinItemStyle}"/>
|
||||||
IsSynchronizedWithCurrentItem="True"/>
|
|
||||||
|
|
||||||
<map:Pushpin map:MapPanel.Location="65,-18" Content="Iceland"/>
|
<map:Pushpin map:MapPanel.Location="65,-18" Content="Iceland"/>
|
||||||
<map:Pushpin map:MapPanel.Location="71,25" Content="Norway"/>
|
<map:Pushpin map:MapPanel.Location="71,25" Content="Norway"/>
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,10 @@ namespace WpfApplication
|
||||||
{
|
{
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
|
ImageLoader.HttpClient.DefaultRequestHeaders.Add("User-Agent", "XAML Map Control Test Application");
|
||||||
//TileImageLoader.Cache = new MapControl.Caching.ImageFileCache(TileImageLoader.DefaultCacheFolder);
|
//TileImageLoader.Cache = new MapControl.Caching.ImageFileCache(TileImageLoader.DefaultCacheFolder);
|
||||||
//TileImageLoader.Cache = new MapControl.Caching.FileDbCache(TileImageLoader.DefaultCacheFolder);
|
//TileImageLoader.Cache = new MapControl.Caching.FileDbCache(TileImageLoader.DefaultCacheFolder);
|
||||||
|
//TileImageLoader.Cache = null;
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Runtime.Caching" />
|
<Reference Include="System.Runtime.Caching" />
|
||||||
<Reference Include="System.Xaml">
|
<Reference Include="System.Xaml">
|
||||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue