Version 5.0.1: Changed all WPF projects to Sdk format

This commit is contained in:
ClemensF 2020-03-29 21:43:21 +02:00
parent 49e15ce424
commit 54f8de93fe
23 changed files with 278 additions and 520 deletions

View file

@ -239,12 +239,6 @@ namespace MapControl
/// </summary>
public ViewTransform ViewTransform { get; } = new ViewTransform();
/// <summary>
/// Gets a MatrixTransform that can be used to transform from cartesian map coordinates
/// to view coordinates.
/// </summary>
public MatrixTransform MapToViewTransform { get; } = new MatrixTransform();
/// <summary>
/// Gets the horizontal and vertical scaling factors from cartesian map coordinates to view
/// coordinates at the specified location, i.e. pixels per meter.
@ -739,7 +733,6 @@ namespace MapControl
}
ViewScale = ViewTransform.Scale;
MapToViewTransform.Matrix = ViewTransform.MapToViewMatrix;
OnViewportChanged(new ViewportChangedEventArgs(projectionChanged, Center.Longitude - centerLongitude));

View file

@ -13,8 +13,8 @@ using System.Windows.Media;
namespace MapControl
{
/// <summary>
/// A path element with a Data property that holds a Geometry in cartesian map coordinates
/// or view coordinates. Cartesian coordinates can optionally be relative to an origin Location.
/// A path element with a Data property that holds a Geometry in view coordinates or
/// cartesian map coordinates that are relative to an origin Location.
/// </summary>
public partial class MapPath : IMapElement
{
@ -90,26 +90,19 @@ namespace MapControl
protected virtual void UpdateData()
{
if (parentMap != null && Data != null)
if (parentMap != null && Data != null && Location != null)
{
if (dataTransform == null)
{
Data.Transform = dataTransform = new MatrixTransform();
}
if (Location != null)
{
var viewPos = LocationToView(Location);
var scale = parentMap.GetScale(Location);
var matrix = new Matrix(scale.X, 0, 0, scale.Y, 0, 0);
matrix.Rotate(parentMap.Heading);
matrix.Translate(viewPos.X, viewPos.Y);
dataTransform.Matrix = matrix;
}
else
{
dataTransform.Matrix = parentMap.ViewTransform.MapToViewMatrix;
}
var viewPos = LocationToView(Location);
var scale = parentMap.GetScale(Location);
var transform = new Matrix(scale.X, 0d, 0d, scale.Y, 0d, 0d);
transform.Rotate(parentMap.Heading);
transform.Translate(viewPos.X, viewPos.Y);
dataTransform.Matrix = transform;
}
}

View file

@ -7,8 +7,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("Clemens Fischer")]
[assembly: AssemblyCopyright("Copyright © 2020 Clemens Fischer")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyVersion("5.0.0")]
[assembly: AssemblyFileVersion("5.0.0")]
[assembly: AssemblyVersion("5.0.1")]
[assembly: AssemblyFileVersion("5.0.1")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -9,7 +9,7 @@
<AssemblyOriginatorKeyFile>..\..\MapControl.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<Product>XAML Map Control</Product>
<Version>5.0.0</Version>
<Version>5.0.1</Version>
<Description>XAML Map Control Library</Description>
<Authors>Clemens Fischer</Authors>
<Copyright>Copyright © 2020 Clemens Fischer</Copyright>