2018-02-09 17:43:47 +01:00
|
|
|
|
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
2025-01-01 18:57:55 +01:00
|
|
|
|
// Copyright © Clemens Fischer
|
2018-02-09 17:43:47 +01:00
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
2024-05-22 11:25:32 +02:00
|
|
|
|
#if UWP
|
2018-02-11 19:46:31 +01:00
|
|
|
|
using Windows.UI.Xaml.Media;
|
2018-02-09 17:43:47 +01:00
|
|
|
|
using Windows.UI.Xaml.Shapes;
|
2024-05-22 11:25:32 +02:00
|
|
|
|
#else
|
|
|
|
|
|
using Microsoft.UI.Xaml.Media;
|
|
|
|
|
|
using Microsoft.UI.Xaml.Shapes;
|
2021-06-14 21:41:37 +02:00
|
|
|
|
#endif
|
2018-02-09 17:43:47 +01:00
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
2020-03-28 21:53:38 +01:00
|
|
|
|
public partial class MapPath : Path
|
2018-02-09 17:43:47 +01:00
|
|
|
|
{
|
2021-01-17 00:31:30 +01:00
|
|
|
|
public MapPath()
|
|
|
|
|
|
{
|
2023-01-24 16:22:02 +01:00
|
|
|
|
Stretch = Stretch.None;
|
2021-01-17 00:31:30 +01:00
|
|
|
|
MapPanel.InitMapElement(this);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-01-23 18:42:10 +01:00
|
|
|
|
private void SetMapTransform(Matrix matrix)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Data.Transform is MatrixTransform transform)
|
|
|
|
|
|
{
|
|
|
|
|
|
transform.Matrix = matrix;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
Data.Transform = new MatrixTransform { Matrix = matrix };
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2018-02-09 17:43:47 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|