mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 22:18:56 +00:00
Added Heading Reset Button to sample applications
This commit is contained in:
parent
e3167b3e2c
commit
f478bf5c3b
8 changed files with 107 additions and 19 deletions
|
|
@ -5,6 +5,7 @@
|
|||
xmlns:local="clr-namespace:SampleApplication"
|
||||
Title="XAML MapControl - WPF Sample Application" Height="600" Width="900"
|
||||
Stylus.IsPressAndHoldEnabled="False">
|
||||
|
||||
<Grid>
|
||||
<Grid.Resources>
|
||||
<DataTemplate DataType="{x:Type local:PolylineItem}">
|
||||
|
|
@ -159,6 +160,17 @@
|
|||
Value="{Binding TargetZoomLevel, ElementName=map}"
|
||||
SmallChange="0.1"
|
||||
AutoToolTipPlacement="BottomRight" AutoToolTipPrecision="0"/>
|
||||
|
||||
<Button Margin="2" Padding="8" ToolTipService.ToolTip="Reset Heading" Click="ResetHeadingButtonClick"
|
||||
FontSize="16" FontFamily="Segoe MDL2 Assets" Content="">
|
||||
<Button.Visibility>
|
||||
<Binding Path="Heading" ElementName="map">
|
||||
<Binding.Converter>
|
||||
<local:HeadingToVisibilityConverter/>
|
||||
</Binding.Converter>
|
||||
</Binding>
|
||||
</Button.Visibility>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<local:OutlinedText
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace SampleApplication
|
|||
{
|
||||
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 SQLiteCache(TileImageLoader.DefaultCacheFolder);
|
||||
//TileImageLoader.Cache = null;
|
||||
|
|
@ -48,6 +48,11 @@ namespace SampleApplication
|
|||
}
|
||||
}
|
||||
|
||||
private void ResetHeadingButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
map.TargetHeading = 0d;
|
||||
}
|
||||
|
||||
private void MapMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (e.ClickCount == 2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue