mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-01-20 23:50:17 +01:00
More cleanup on version 2.3.1.
This commit is contained in:
parent
b2063e2c6c
commit
f04025067c
|
|
@ -7,7 +7,7 @@ using System.Windows.Media.Animation;
|
|||
|
||||
namespace MapControl
|
||||
{
|
||||
internal static partial class Extensions
|
||||
internal static class Extensions
|
||||
{
|
||||
public static void BeginAnimation(this DependencyObject obj, DependencyProperty property, Timeline animation)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ using Windows.UI.Xaml.Media.Animation;
|
|||
|
||||
namespace MapControl
|
||||
{
|
||||
internal static partial class Extensions
|
||||
internal static class Extensions
|
||||
{
|
||||
public static void BeginInvoke(this CoreDispatcher dispatcher, Action action)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@
|
|||
<Compile Include="BingMapsTileLayer.cs" />
|
||||
<Compile Include="BingMapsTileSource.cs" />
|
||||
<Compile Include="Extensions.Silverlight.cs" />
|
||||
<Compile Include="Extensions.Silverlight.WinRT.cs" />
|
||||
<Compile Include="HyperlinkText.cs" />
|
||||
<Compile Include="ImageTileSource.Silverlight.WinRT.cs" />
|
||||
<Compile Include="IMapElement.cs" />
|
||||
|
|
@ -74,6 +73,7 @@
|
|||
<Compile Include="MapRectangle.cs" />
|
||||
<Compile Include="MapRectangle.Silverlight.WinRT.cs" />
|
||||
<Compile Include="MapTransform.cs" />
|
||||
<Compile Include="MatrixEx.cs" />
|
||||
<Compile Include="MercatorTransform.cs" />
|
||||
<Compile Include="PanelBase.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
|
|
|||
15
MapControl/MapControl.PhoneSilverlight.csproj.user
Normal file
15
MapControl/MapControl.PhoneSilverlight.csproj.user
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{C089C8C0-30E0-4E22-80C0-CE093F111A43}">
|
||||
<SilverlightMobileCSProjectFlavor>
|
||||
<FullDeploy>True</FullDeploy>
|
||||
<DebuggerType>Managed</DebuggerType>
|
||||
<DebuggerAgentType>Managed</DebuggerAgentType>
|
||||
<Tombstone>False</Tombstone>
|
||||
</SilverlightMobileCSProjectFlavor>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
|
|
@ -71,11 +71,8 @@
|
|||
<Compile Include="BingMapsTileLayer.cs" />
|
||||
<Compile Include="BingMapsTileSource.cs" />
|
||||
<Compile Include="Extensions.Silverlight.cs" />
|
||||
<Compile Include="Extensions.Silverlight.WinRT.cs" />
|
||||
<Compile Include="HyperlinkText.cs" />
|
||||
<Compile Include="ImageTileSource.Silverlight.WinRT.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ImageTileSource.Silverlight.WinRT.cs" />
|
||||
<Compile Include="IMapElement.cs" />
|
||||
<Compile Include="Int32Rect.cs" />
|
||||
<Compile Include="Location.cs" />
|
||||
|
|
@ -103,6 +100,7 @@
|
|||
<Compile Include="MapRectangle.cs" />
|
||||
<Compile Include="MapRectangle.Silverlight.WinRT.cs" />
|
||||
<Compile Include="MapTransform.cs" />
|
||||
<Compile Include="MatrixEx.cs" />
|
||||
<Compile Include="MercatorTransform.cs" />
|
||||
<Compile Include="PanelBase.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ using System.Windows.Media;
|
|||
|
||||
namespace MapControl
|
||||
{
|
||||
internal static partial class Extensions
|
||||
internal static class MatrixEx
|
||||
{
|
||||
public static Matrix Translate(this Matrix matrix, double offsetX, double offsetY)
|
||||
{
|
||||
|
|
@ -25,8 +25,8 @@ namespace MapControl
|
|||
|
||||
private void UpdateViewportTransform(double scale, Point mapOrigin)
|
||||
{
|
||||
ViewportTransform.Matrix =
|
||||
new Matrix(1d, 0d, 0d, 1d, -mapOrigin.X, -mapOrigin.Y)
|
||||
ViewportTransform.Matrix = Matrix.Identity
|
||||
.Translate(-mapOrigin.X, -mapOrigin.Y)
|
||||
.Scale(scale, -scale)
|
||||
.Rotate(rotation)
|
||||
.Translate(viewportOrigin.X, viewportOrigin.Y);
|
||||
|
|
@ -39,8 +39,8 @@ namespace MapControl
|
|||
{
|
||||
var scale = Math.Pow(2d, zoomLevel - tileZoomLevel);
|
||||
|
||||
((MatrixTransform)RenderTransform).Matrix =
|
||||
new Matrix(1d, 0d, 0d, 1d, tileGrid.X * TileSource.TileSize, tileGrid.Y * TileSource.TileSize)
|
||||
((MatrixTransform)RenderTransform).Matrix = Matrix.Identity
|
||||
.Translate(tileGrid.X * TileSource.TileSize, tileGrid.Y * TileSource.TileSize)
|
||||
.Scale(scale, scale)
|
||||
.Translate(tileLayerOffset.X, tileLayerOffset.Y)
|
||||
.RotateAt(rotation, viewportOrigin.X, viewportOrigin.Y);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ namespace MapControl
|
|||
|
||||
private void UpdateViewportTransform(double scale, Point mapOrigin)
|
||||
{
|
||||
var transform = new Matrix(1d, 0d, 0d, 1d, -mapOrigin.X, -mapOrigin.Y);
|
||||
var transform = Matrix.Identity;
|
||||
transform.Translate(-mapOrigin.X, -mapOrigin.Y);
|
||||
transform.Scale(scale, -scale);
|
||||
transform.Rotate(rotation);
|
||||
transform.Translate(viewportOrigin.X, viewportOrigin.Y);
|
||||
|
|
@ -36,7 +37,8 @@ namespace MapControl
|
|||
private void UpdateRenderTransform()
|
||||
{
|
||||
var scale = Math.Pow(2d, zoomLevel - tileZoomLevel);
|
||||
var transform = new Matrix(1d, 0d, 0d, 1d, tileGrid.X * TileSource.TileSize, tileGrid.Y * TileSource.TileSize);
|
||||
var transform = Matrix.Identity;
|
||||
transform.Translate(tileGrid.X * TileSource.TileSize, tileGrid.Y * TileSource.TileSize);
|
||||
transform.Scale(scale, scale);
|
||||
transform.Translate(tileLayerOffset.X, tileLayerOffset.Y);
|
||||
transform.RotateAt(rotation, viewportOrigin.X, viewportOrigin.Y);
|
||||
|
|
|
|||
|
|
@ -42,9 +42,6 @@
|
|||
<Compile Include="..\BingMapsTileSource.cs">
|
||||
<Link>BingMapsTileSource.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Extensions.Silverlight.WinRT.cs">
|
||||
<Link>Extensions.Silverlight.WinRT.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Extensions.WinRT.cs">
|
||||
<Link>Extensions.WinRT.cs</Link>
|
||||
</Compile>
|
||||
|
|
@ -135,6 +132,9 @@
|
|||
<Compile Include="..\MapTransform.cs">
|
||||
<Link>MapTransform.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MatrixEx.cs">
|
||||
<Link>MatrixEx.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MercatorTransform.cs">
|
||||
<Link>MercatorTransform.cs</Link>
|
||||
</Compile>
|
||||
|
|
|
|||
Loading…
Reference in a new issue