Avalonia MapPath

This commit is contained in:
ClemensFischer 2024-05-25 18:58:51 +02:00
parent 8e4110b600
commit 25d4d7f417
8 changed files with 120 additions and 11 deletions

View file

@ -65,6 +65,8 @@ namespace MapControl
public MapImageLayer()
{
IsHitTestVisible = false;
loadingProgress = new Progress<double>(p => SetValue(LoadingProgressProperty, p));
updateTimer = this.CreateTimer(UpdateInterval);
@ -145,7 +147,6 @@ namespace MapControl
{
Opacity = 0d,
Stretch = Stretch.Fill,
IsHitTestVisible = false // avoid touch capture issues
});
}
}

View file

@ -13,6 +13,9 @@ using Windows.UI.Xaml.Media;
#elif WINUI
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
#elif AVALONIA
using DependencyProperty = Avalonia.AvaloniaProperty;
using PathFigureCollection = Avalonia.Media.PathFigures;
#endif
namespace MapControl

View file

@ -66,7 +66,7 @@ namespace MapControl
protected MapTileLayerBase()
{
MapPanel.SetRenderTransform(this, new MatrixTransform());
IsHitTestVisible = false;
loadingProgress = new Progress<double>(p => SetValue(LoadingProgressProperty, p));
@ -76,6 +76,7 @@ namespace MapControl
#if UWP || WINUI
MapPanel.InitMapElement(this);
#endif
MapPanel.SetRenderTransform(this, new MatrixTransform());
}
public ITileImageLoader TileImageLoader

View file

@ -36,11 +36,7 @@ namespace MapControl
public int Column { get; }
public int Row => Y;
public Image Image { get; } = new Image
{
Stretch = Stretch.Fill,
IsHitTestVisible = false // avoid touch capture issues
};
public Image Image { get; } = new Image { Stretch = Stretch.Fill };
public bool IsPending { get; set; } = true;