mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 06:26:41 +00:00
Avalonia sample application
This commit is contained in:
parent
5a738f7a71
commit
8da77b7a15
2 changed files with 21 additions and 18 deletions
|
|
@ -68,32 +68,20 @@ namespace SampleApplication
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
AddTestLayers();
|
||||
}
|
||||
|
||||
partial void AddTestLayers();
|
||||
|
||||
private void OnMapDoubleTapped(object sender, TappedEventArgs e)
|
||||
{
|
||||
if (e.Source == map)
|
||||
{
|
||||
map.TargetCenter = map.ViewToLocation(e.GetPosition(map));
|
||||
}
|
||||
map.TargetCenter = map.ViewToLocation(e.GetPosition(map));
|
||||
}
|
||||
|
||||
private void ResetHeadingButtonClick(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||
private void ResetHeadingButtonClick(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||
{
|
||||
map.TargetHeading = 0d;
|
||||
}
|
||||
}
|
||||
|
||||
public class MapHeadingToVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return (double)value != 0d;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue