mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Version 1.4.0: Fixed RenderTransform issue in MapRectangle, removed ManipulationModes.Rotate from default ManipulationMode in Map.WinRT, added setting of FileSystemAccessRule in ImageFileCache to enable cache write access for multiple users.
This commit is contained in:
parent
aa04fd0551
commit
14cc7bcea2
14 changed files with 39 additions and 41 deletions
|
|
@ -21,7 +21,9 @@ namespace MapControl
|
|||
|
||||
public Map()
|
||||
{
|
||||
ManipulationMode = ManipulationModes.All;
|
||||
ManipulationMode = ManipulationModes.Scale | ManipulationModes.ScaleInertia |
|
||||
ManipulationModes.TranslateX | ManipulationModes.TranslateY | ManipulationModes.TranslateInertia;
|
||||
|
||||
ManipulationDelta += OnManipulationDelta;
|
||||
PointerWheelChanged += OnPointerWheelChanged;
|
||||
PointerPressed += OnPointerPressed;
|
||||
|
|
|
|||
|
|
@ -17,11 +17,6 @@ namespace MapControl
|
|||
/// </summary>
|
||||
public class MapImage : MapRectangle
|
||||
{
|
||||
private static readonly Transform imageTransform = new MatrixTransform
|
||||
{
|
||||
Matrix = new Matrix(1d, 0d, 0d, -1d, 0d, 1d)
|
||||
};
|
||||
|
||||
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
|
||||
"Source", typeof(ImageSource), typeof(MapImage),
|
||||
new PropertyMetadata(null, (o, e) => ((MapImage)o).SourceChanged((ImageSource)e.NewValue)));
|
||||
|
|
@ -34,11 +29,7 @@ namespace MapControl
|
|||
|
||||
private void SourceChanged(ImageSource image)
|
||||
{
|
||||
Fill = new ImageBrush
|
||||
{
|
||||
ImageSource = image,
|
||||
RelativeTransform = imageTransform
|
||||
};
|
||||
Fill = new ImageBrush { ImageSource = image };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,11 +34,6 @@ namespace MapControl
|
|||
"East", typeof(double), typeof(MapRectangle),
|
||||
new PropertyMetadata(double.NaN, (o, e) => ((MapRectangle)o).UpdateData()));
|
||||
|
||||
public MapRectangle()
|
||||
{
|
||||
Data = new RectangleGeometry();
|
||||
}
|
||||
|
||||
public double South
|
||||
{
|
||||
get { return (double)GetValue(SouthProperty); }
|
||||
|
|
@ -65,8 +60,6 @@ namespace MapControl
|
|||
|
||||
protected override void UpdateData()
|
||||
{
|
||||
var geometry = (RectangleGeometry)Data;
|
||||
|
||||
if (ParentMap != null &&
|
||||
!double.IsNaN(South) && !double.IsNaN(North) &&
|
||||
!double.IsNaN(West) && !double.IsNaN(East) &&
|
||||
|
|
@ -75,13 +68,15 @@ namespace MapControl
|
|||
var p1 = ParentMap.MapTransform.Transform(new Location(South, West));
|
||||
var p2 = ParentMap.MapTransform.Transform(new Location(North, East));
|
||||
|
||||
geometry.Rect = new Rect(p1.X, p1.Y, p2.X - p1.X, p2.Y - p1.Y);
|
||||
RenderTransform = ParentMap.ViewportTransform;
|
||||
Data = new RectangleGeometry
|
||||
{
|
||||
Rect = new Rect(p1.X, p1.Y, p2.X - p1.X, p2.Y - p1.Y),
|
||||
Transform = ParentMap.ViewportTransform
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
geometry.Rect = Rect.Empty;
|
||||
ClearValue(RenderTransformProperty);
|
||||
ClearValue(DataProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ using System.Windows;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("1.3.10")]
|
||||
[assembly: AssemblyFileVersion("1.3.10")]
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("1.3.10")]
|
||||
[assembly: AssemblyFileVersion("1.3.10")]
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue