mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Version 1.2.2: Added AnimateOpacity property to MapImage, TMS support to TileSource, Background and Foreground properties to TileLayer.
This commit is contained in:
parent
050f1acb38
commit
c37149aafb
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2013 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.2.1")]
|
||||
[assembly: AssemblyFileVersion("1.2.1")]
|
||||
[assembly: AssemblyVersion("1.2.2")]
|
||||
[assembly: AssemblyFileVersion("1.2.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2013 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.2.1")]
|
||||
[assembly: AssemblyFileVersion("1.2.1")]
|
||||
[assembly: AssemblyVersion("1.2.2")]
|
||||
[assembly: AssemblyFileVersion("1.2.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#if NETFX_CORE
|
||||
using Windows.Foundation;
|
||||
using Windows.UI;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Media.Animation;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ using System.Collections.Specialized;
|
|||
using System.Linq;
|
||||
#if NETFX_CORE
|
||||
using Windows.Foundation;
|
||||
using Windows.UI;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Media.Animation;
|
||||
|
|
@ -31,18 +30,6 @@ namespace MapControl
|
|||
public static TimeSpan AnimationDuration = TimeSpan.FromSeconds(0.5);
|
||||
public static EasingFunctionBase AnimationEasingFunction = new QuadraticEase { EasingMode = EasingMode.EaseOut };
|
||||
|
||||
public static readonly DependencyProperty LightForegroundProperty = DependencyProperty.Register(
|
||||
"LightForeground", typeof(Brush), typeof(MapBase), null);
|
||||
|
||||
public static readonly DependencyProperty DarkForegroundProperty = DependencyProperty.Register(
|
||||
"DarkForeground", typeof(Brush), typeof(MapBase), null);
|
||||
|
||||
public static readonly DependencyProperty LightBackgroundProperty = DependencyProperty.Register(
|
||||
"LightBackground", typeof(Brush), typeof(MapBase), new PropertyMetadata(new SolidColorBrush(Colors.Transparent), null));
|
||||
|
||||
public static readonly DependencyProperty DarkBackgroundProperty = DependencyProperty.Register(
|
||||
"DarkBackground", typeof(Brush), typeof(MapBase), new PropertyMetadata(new SolidColorBrush(Colors.Transparent), null));
|
||||
|
||||
public static readonly DependencyProperty TileLayersProperty = DependencyProperty.Register(
|
||||
"TileLayers", typeof(TileLayerCollection), typeof(MapBase), new PropertyMetadata(null,
|
||||
(o, e) => ((MapBase)o).TileLayersPropertyChanged((TileLayerCollection)e.OldValue, (TileLayerCollection)e.NewValue)));
|
||||
|
|
@ -104,13 +91,14 @@ namespace MapControl
|
|||
private PointAnimation centerAnimation;
|
||||
private DoubleAnimation zoomLevelAnimation;
|
||||
private DoubleAnimation headingAnimation;
|
||||
private Brush previousBackground;
|
||||
private Brush previousForeground;
|
||||
private bool internalPropertyChange;
|
||||
|
||||
public MapBase()
|
||||
{
|
||||
SetParentMap();
|
||||
|
||||
Background = LightBackground;
|
||||
TileLayers = new TileLayerCollection();
|
||||
Initialize();
|
||||
|
||||
|
|
@ -133,46 +121,6 @@ namespace MapControl
|
|||
set { SetValue(ForegroundProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a Brush that (when not null) is used as value of the
|
||||
/// Foreground property when TileLayer.HasDarkBackground is false.
|
||||
/// </summary>
|
||||
public Brush LightForeground
|
||||
{
|
||||
get { return (Brush)GetValue(LightForegroundProperty); }
|
||||
set { SetValue(LightForegroundProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a Brush that (when not null) is used as value of the
|
||||
/// Foreground property when TileLayer.HasDarkBackground is true.
|
||||
/// </summary>
|
||||
public Brush DarkForeground
|
||||
{
|
||||
get { return (Brush)GetValue(DarkForegroundProperty); }
|
||||
set { SetValue(DarkForegroundProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a Brush that (when not null) is used as value of the
|
||||
/// Background property when TileLayer.HasDarkBackground is false.
|
||||
/// </summary>
|
||||
public Brush LightBackground
|
||||
{
|
||||
get { return (Brush)GetValue(LightBackgroundProperty); }
|
||||
set { SetValue(LightBackgroundProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a Brush that (when not null) is used as value of the
|
||||
/// Background property when TileLayer.HasDarkBackground is true.
|
||||
/// </summary>
|
||||
public Brush DarkBackground
|
||||
{
|
||||
get { return (Brush)GetValue(DarkBackgroundProperty); }
|
||||
set { SetValue(DarkBackgroundProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the TileLayers used by this Map.
|
||||
/// </summary>
|
||||
|
|
@ -536,29 +484,34 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
|
||||
if (tileLayer != null && tileLayer.HasDarkBackground)
|
||||
if (tileLayer != null && tileLayer.Background != null)
|
||||
{
|
||||
if (DarkForeground != null)
|
||||
if (previousBackground == null)
|
||||
{
|
||||
Foreground = DarkForeground;
|
||||
previousBackground = Background;
|
||||
}
|
||||
|
||||
if (DarkBackground != null)
|
||||
{
|
||||
Background = DarkBackground;
|
||||
Background = tileLayer.Background;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (previousBackground != null)
|
||||
{
|
||||
if (LightForeground != null)
|
||||
{
|
||||
Foreground = LightForeground;
|
||||
Background = previousBackground;
|
||||
previousBackground = null;
|
||||
}
|
||||
|
||||
if (LightBackground != null)
|
||||
if (tileLayer != null && tileLayer.Foreground != null)
|
||||
{
|
||||
Background = LightBackground;
|
||||
if (previousForeground == null)
|
||||
{
|
||||
previousForeground = Foreground;
|
||||
}
|
||||
|
||||
Foreground = tileLayer.Foreground;
|
||||
}
|
||||
else if (previousForeground != null)
|
||||
{
|
||||
Foreground = previousForeground;
|
||||
previousForeground = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@
|
|||
<Compile Include="MapGraticule.cs" />
|
||||
<Compile Include="MapGraticule.Silverlight.WinRT.cs" />
|
||||
<Compile Include="MapImage.cs" />
|
||||
<Compile Include="MapImage.Silverlight.WinRT.cs" />
|
||||
<Compile Include="MapItem.Silverlight.WinRT.cs" />
|
||||
<Compile Include="MapItemsControl.cs" />
|
||||
<Compile Include="MapItemsControl.Silverlight.WinRT.cs" />
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MapBase.WPF.cs" />
|
||||
<Compile Include="MapImage.WPF.cs" />
|
||||
<Compile Include="MapItem.WPF.cs" />
|
||||
<Compile Include="MapItemsControl.cs" />
|
||||
<Compile Include="MapItemsControl.WPF.cs" />
|
||||
|
|
|
|||
49
MapControl/MapImage.Silverlight.WinRT.cs
Normal file
49
MapControl/MapImage.Silverlight.WinRT.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
// XAML Map Control - http://xamlmapcontrol.codeplex.com/
|
||||
// Copyright © 2013 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
#if NETFX_CORE
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Media.Imaging;
|
||||
#else
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
#endif
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
public partial class MapImage
|
||||
{
|
||||
private void BeginOpacityAnimation(ImageSource image)
|
||||
{
|
||||
var bitmapImage = image as BitmapImage;
|
||||
|
||||
if (bitmapImage != null)
|
||||
{
|
||||
bitmapImage.ImageOpened += BitmapImageOpened;
|
||||
bitmapImage.ImageFailed += BitmapImageFailed;
|
||||
}
|
||||
else
|
||||
{
|
||||
BeginOpacityAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
private void BitmapImageOpened(object sender, RoutedEventArgs e)
|
||||
{
|
||||
((BitmapImage)sender).ImageOpened -= BitmapImageOpened;
|
||||
((BitmapImage)sender).ImageFailed -= BitmapImageFailed;
|
||||
BeginOpacityAnimation();
|
||||
}
|
||||
|
||||
private void BitmapImageFailed(object sender, ExceptionRoutedEventArgs e)
|
||||
{
|
||||
((BitmapImage)sender).ImageOpened -= BitmapImageOpened;
|
||||
((BitmapImage)sender).ImageFailed -= BitmapImageFailed;
|
||||
((ImageBrush)Fill).ImageSource = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
42
MapControl/MapImage.WPF.cs
Normal file
42
MapControl/MapImage.WPF.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
// XAML Map Control - http://xamlmapcontrol.codeplex.com/
|
||||
// Copyright © 2013 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
public partial class MapImage
|
||||
{
|
||||
private void BeginOpacityAnimation(ImageSource image)
|
||||
{
|
||||
var bitmapImage = image as BitmapImage;
|
||||
|
||||
if (bitmapImage != null && bitmapImage.IsDownloading)
|
||||
{
|
||||
bitmapImage.DownloadCompleted += BitmapDownloadCompleted;
|
||||
bitmapImage.DownloadFailed += BitmapDownloadFailed;
|
||||
}
|
||||
else
|
||||
{
|
||||
BeginOpacityAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
private void BitmapDownloadCompleted(object sender, EventArgs e)
|
||||
{
|
||||
((BitmapImage)sender).DownloadCompleted -= BitmapDownloadCompleted;
|
||||
((BitmapImage)sender).DownloadFailed -= BitmapDownloadFailed;
|
||||
BeginOpacityAnimation();
|
||||
}
|
||||
|
||||
private void BitmapDownloadFailed(object sender, ExceptionEventArgs e)
|
||||
{
|
||||
((BitmapImage)sender).DownloadCompleted -= BitmapDownloadCompleted;
|
||||
((BitmapImage)sender).DownloadFailed -= BitmapDownloadFailed;
|
||||
((ImageBrush)Fill).ImageSource = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,14 +5,16 @@
|
|||
#if NETFX_CORE
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Media.Animation;
|
||||
#else
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
#endif
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
public class MapImage : MapRectangle
|
||||
public partial class MapImage : MapRectangle
|
||||
{
|
||||
private static readonly Transform imageTransform = new MatrixTransform
|
||||
{
|
||||
|
|
@ -29,13 +31,36 @@ namespace MapControl
|
|||
set { SetValue(SourceProperty, value); }
|
||||
}
|
||||
|
||||
private void SourceChanged(ImageSource source)
|
||||
public bool AnimateOpacity { get; set; }
|
||||
|
||||
private void SourceChanged(ImageSource image)
|
||||
{
|
||||
Fill = new ImageBrush
|
||||
{
|
||||
ImageSource = source,
|
||||
RelativeTransform = imageTransform
|
||||
ImageSource = image,
|
||||
RelativeTransform = imageTransform,
|
||||
Opacity = 0d
|
||||
};
|
||||
|
||||
if (AnimateOpacity)
|
||||
{
|
||||
BeginOpacityAnimation(image);
|
||||
}
|
||||
else
|
||||
{
|
||||
Fill.Opacity = 1d;
|
||||
}
|
||||
}
|
||||
|
||||
private void BeginOpacityAnimation()
|
||||
{
|
||||
Fill.BeginAnimation(Brush.OpacityProperty,
|
||||
new DoubleAnimation
|
||||
{
|
||||
To = 1d,
|
||||
Duration = Tile.AnimationDuration,
|
||||
FillBehavior = FillBehavior.HoldEnd
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ using System.Windows;
|
|||
[assembly: AssemblyCopyright("Copyright © 2013 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.2.1")]
|
||||
[assembly: AssemblyFileVersion("1.2.1")]
|
||||
[assembly: AssemblyVersion("1.2.2")]
|
||||
[assembly: AssemblyFileVersion("1.2.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@
|
|||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Media.Animation;
|
||||
using Windows.UI.Xaml.Media.Imaging;
|
||||
#else
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Imaging;
|
||||
#endif
|
||||
|
||||
|
|
@ -18,7 +20,7 @@ namespace MapControl
|
|||
{
|
||||
public partial class Tile
|
||||
{
|
||||
public readonly Image Image = new Image { IsHitTestVisible = false, Opacity = 0d };
|
||||
public readonly Image Image = new Image { Opacity = 0d };
|
||||
|
||||
public ImageSource ImageSource
|
||||
{
|
||||
|
|
@ -40,7 +42,7 @@ namespace MapControl
|
|||
}
|
||||
else
|
||||
{
|
||||
Image.BeginAnimation(Image.OpacityProperty, OpacityAnimation);
|
||||
BeginOpacityAnimation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -57,7 +59,7 @@ namespace MapControl
|
|||
{
|
||||
((BitmapImage)sender).ImageOpened -= BitmapImageOpened;
|
||||
((BitmapImage)sender).ImageFailed -= BitmapImageFailed;
|
||||
Image.BeginAnimation(Image.OpacityProperty, OpacityAnimation);
|
||||
BeginOpacityAnimation();
|
||||
}
|
||||
|
||||
private void BitmapImageFailed(object sender, ExceptionRoutedEventArgs e)
|
||||
|
|
@ -66,5 +68,16 @@ namespace MapControl
|
|||
((BitmapImage)sender).ImageFailed -= BitmapImageFailed;
|
||||
Image.Source = null;
|
||||
}
|
||||
|
||||
private void BeginOpacityAnimation()
|
||||
{
|
||||
Image.BeginAnimation(Image.OpacityProperty,
|
||||
new DoubleAnimation
|
||||
{
|
||||
To = 1d,
|
||||
Duration = AnimationDuration,
|
||||
FillBehavior = FillBehavior.HoldEnd
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
using System;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Threading;
|
||||
|
||||
|
|
@ -33,7 +34,7 @@ namespace MapControl
|
|||
}
|
||||
else
|
||||
{
|
||||
Brush.BeginAnimation(ImageBrush.OpacityProperty, OpacityAnimation);
|
||||
BeginOpacityAnimation();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -50,7 +51,7 @@ namespace MapControl
|
|||
{
|
||||
((BitmapImage)sender).DownloadCompleted -= BitmapDownloadCompleted;
|
||||
((BitmapImage)sender).DownloadFailed -= BitmapDownloadFailed;
|
||||
Brush.BeginAnimation(ImageBrush.OpacityProperty, OpacityAnimation);
|
||||
BeginOpacityAnimation();
|
||||
}
|
||||
|
||||
private void BitmapDownloadFailed(object sender, ExceptionEventArgs e)
|
||||
|
|
@ -59,5 +60,16 @@ namespace MapControl
|
|||
((BitmapImage)sender).DownloadFailed -= BitmapDownloadFailed;
|
||||
Brush.ImageSource = null;
|
||||
}
|
||||
|
||||
private void BeginOpacityAnimation()
|
||||
{
|
||||
Brush.BeginAnimation(ImageBrush.OpacityProperty,
|
||||
new DoubleAnimation
|
||||
{
|
||||
To = 1d,
|
||||
Duration = AnimationDuration,
|
||||
FillBehavior = FillBehavior.HoldEnd
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,6 @@
|
|||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System;
|
||||
#if NETFX_CORE
|
||||
using Windows.UI.Xaml.Media.Animation;
|
||||
#else
|
||||
using System.Windows.Media.Animation;
|
||||
#endif
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
|
|
@ -36,18 +31,5 @@ namespace MapControl
|
|||
return ((X % numTiles) + numTiles) % numTiles;
|
||||
}
|
||||
}
|
||||
|
||||
public DoubleAnimation OpacityAnimation
|
||||
{
|
||||
get
|
||||
{
|
||||
return new DoubleAnimation
|
||||
{
|
||||
To = 1d,
|
||||
Duration = AnimationDuration,
|
||||
FillBehavior = FillBehavior.HoldEnd,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ namespace MapControl
|
|||
public int MaxZoomLevel { get; set; }
|
||||
public int MaxParallelDownloads { get; set; }
|
||||
public bool LoadLowerZoomLevels { get; set; }
|
||||
public bool HasDarkBackground { get; set; }
|
||||
public Brush Background { get; set; }
|
||||
public Brush Foreground { get; set; }
|
||||
|
||||
public string Description
|
||||
{
|
||||
|
|
@ -122,9 +123,12 @@ namespace MapControl
|
|||
{
|
||||
var tileSize = 1 << (zoomLevel - z);
|
||||
var x1 = grid.X / tileSize;
|
||||
var y1 = grid.Y / tileSize;
|
||||
var x2 = (grid.X + grid.Width - 1) / tileSize;
|
||||
var y1 = Math.Max(0, grid.Y / tileSize);
|
||||
var y2 = Math.Min((1 << z) - 1, (grid.Y + grid.Height - 1) / tileSize);
|
||||
var y2 = (grid.Y + grid.Height - 1) / tileSize;
|
||||
|
||||
y1 = Math.Max(y1, 0);
|
||||
y2 = Math.Min(y2, (1 << z) - 1);
|
||||
|
||||
for (var y = y1; y <= y2; y++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -68,6 +68,10 @@ namespace MapControl
|
|||
{
|
||||
getUri = GetBoundingBoxUri;
|
||||
}
|
||||
else if (uriFormat.Contains("{x}") && uriFormat.Contains("{v}") && uriFormat.Contains("{z}"))
|
||||
{
|
||||
getUri = GetTmsUri;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -117,6 +121,16 @@ namespace MapControl
|
|||
Replace("{z}", zoomLevel.ToString()));
|
||||
}
|
||||
|
||||
private Uri GetTmsUri(int x, int y, int zoomLevel)
|
||||
{
|
||||
y = (1 << zoomLevel) - 1 - y;
|
||||
|
||||
return new Uri(UriFormat.
|
||||
Replace("{x}", x.ToString()).
|
||||
Replace("{v}", y.ToString()).
|
||||
Replace("{z}", zoomLevel.ToString()));
|
||||
}
|
||||
|
||||
private Uri GetQuadKeyUri(int x, int y, int zoomLevel)
|
||||
{
|
||||
var key = new StringBuilder { Length = zoomLevel };
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@
|
|||
<Compile Include="..\MapImage.cs">
|
||||
<Link>MapImage.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MapImage.Silverlight.WinRT.cs">
|
||||
<Link>MapImage.Silverlight.WinRT.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MapItem.Silverlight.WinRT.cs">
|
||||
<Link>MapItem.Silverlight.WinRT.cs</Link>
|
||||
</Compile>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2013 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.2.1")]
|
||||
[assembly: AssemblyFileVersion("1.2.1")]
|
||||
[assembly: AssemblyVersion("1.2.2")]
|
||||
[assembly: AssemblyFileVersion("1.2.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2013 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.2.1")]
|
||||
[assembly: AssemblyFileVersion("1.2.1")]
|
||||
[assembly: AssemblyVersion("1.2.2")]
|
||||
[assembly: AssemblyFileVersion("1.2.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
<map:Map x:Name="map" Center="53.5,8.2" MinZoomLevel="2" MaxZoomLevel="18" ZoomLevel="11"
|
||||
MouseMove="MapMouseMove" MouseLeave="MapMouseLeave">
|
||||
<map:MapImage x:Name="mapImage" South="53.54031" North="53.74871" West="8.08594" East="8.43750"
|
||||
Source="10_535_330.jpg" Opacity=".5"/>
|
||||
Source="10_535_330.jpg" Opacity="0.5"/>
|
||||
<map:MapGraticule Opacity="0.6"/>
|
||||
|
||||
<!-- use ItemTemplate or ItemContainerStyle alternatively -->
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="mouseLocation" Margin="4" VerticalAlignment="Bottom" FontFamily="Consolas"/>
|
||||
<TextBlock Name="mouseLocation" Margin="4" VerticalAlignment="Bottom" FontFamily="Segoe UI Mono"/>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<StackPanel Margin="5">
|
||||
<TextBlock Text="Zoom Level" Margin="0,0,0,2" HorizontalAlignment="Center" Foreground="Gray" FontSize="10"/>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2013 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.2.1")]
|
||||
[assembly: AssemblyFileVersion("1.2.1")]
|
||||
[assembly: AssemblyVersion("1.2.2")]
|
||||
[assembly: AssemblyFileVersion("1.2.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
<map:Location Latitude="53.5" Longitude="8.2"/>
|
||||
</map:MapBase.Center>
|
||||
<map:MapImage x:Name="mapImage" South="53.54031" North="53.74871" West="8.08594" East="8.43750"
|
||||
Source="10_535_330.jpg" Opacity=".5"/>
|
||||
Source="10_535_330.jpg" Opacity="0.5"/>
|
||||
<map:MapGraticule Foreground="Black" Opacity="0.6"/>
|
||||
|
||||
<!-- use ItemTemplate or ItemContainerStyle alternatively -->
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyCopyright("Copyright © 2013 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.2.1")]
|
||||
[assembly: AssemblyFileVersion("1.2.1")]
|
||||
[assembly: AssemblyVersion("1.2.2")]
|
||||
[assembly: AssemblyFileVersion("1.2.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
Title="SurfaceApplication" WindowStyle="None" WindowState="Maximized">
|
||||
<Grid>
|
||||
<m:Map Center="53.5,8.2" ZoomLevel="11"
|
||||
LightForeground="Black" LightBackground="LightGray"
|
||||
IsManipulationEnabled="True" TouchDown="MapTouchDown">
|
||||
<m:MapGraticule Opacity="0.5" MinLineSpacing="200"/>
|
||||
</m:Map>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using System.Windows;
|
|||
[assembly: AssemblyCopyright("Copyright © 2013 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.2.1")]
|
||||
[assembly: AssemblyFileVersion("1.2.1")]
|
||||
[assembly: AssemblyVersion("1.2.2")]
|
||||
[assembly: AssemblyFileVersion("1.2.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
||||
|
|
|
|||
|
|
@ -23,14 +23,14 @@
|
|||
|
||||
<!--<map:TileLayer SourceName="Google Maps" Description="Google Maps - © {y} Google"
|
||||
TileSource="http://mt{i}.google.com/vt/x={x}&y={y}&z={z}" MaxZoomLevel="20"/>
|
||||
<map:TileLayer SourceName="Google Images" Description="Google Maps - © {y} Google"
|
||||
TileSource="http://khm{i}.google.com/kh/v=123&x={x}&y={y}&z={z}" MaxZoomLevel="20" HasDarkBackground="True"/>
|
||||
<map:TileLayer SourceName="Google Images" Description="Google Maps - © {y} Google" Background="#FF3F3F3F" Foreground="White"
|
||||
TileSource="http://khm{i}.google.com/kh/v=123&x={x}&y={y}&z={z}" MaxZoomLevel="20"/>
|
||||
<map:TileLayer SourceName="Bing Maps" Description="Bing Maps - © {y} Microsoft Corporation"
|
||||
TileSource="http://ecn.t{i}.tiles.virtualearth.net/tiles/r{q}.png?g=0&stl=h" MaxZoomLevel="20"/>
|
||||
<map:TileLayer SourceName="Bing Images" Description="Bing Maps - © {y} Microsoft Corporation"
|
||||
TileSource="http://ecn.t{i}.tiles.virtualearth.net/tiles/a{q}.jpeg?g=0" MaxZoomLevel="20" HasDarkBackground="True"/>
|
||||
<map:TileLayer SourceName="Bing Hybrid" Description="Bing Maps - © {y} Microsoft Corporation"
|
||||
TileSource="http://ecn.t{i}.tiles.virtualearth.net/tiles/h{q}.jpeg?g=0&stl=h" MaxZoomLevel="20" HasDarkBackground="True"/>-->
|
||||
<map:TileLayer SourceName="Bing Images" Description="Bing Maps - © {y} Microsoft Corporation" Background="#FF3F3F3F" Foreground="White"
|
||||
TileSource="http://ecn.t{i}.tiles.virtualearth.net/tiles/a{q}.jpeg?g=0" MaxZoomLevel="20"/>
|
||||
<map:TileLayer SourceName="Bing Hybrid" Description="Bing Maps - © {y} Microsoft Corporation" Background="#FF3F3F3F" Foreground="White"
|
||||
TileSource="http://ecn.t{i}.tiles.virtualearth.net/tiles/h{q}.jpeg?g=0&stl=h" MaxZoomLevel="20"/>-->
|
||||
|
||||
<!-- The TileLayer below uses an ImageTileSource, which bypasses caching of map tile images -->
|
||||
<!--<map:TileLayer SourceName="OSM Uncached" Description="© {y} OpenStreetMap Contributors, CC-BY-SA">
|
||||
|
|
@ -149,14 +149,15 @@
|
|||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<map:Map Name="map" IsManipulationEnabled="True" Margin="2"
|
||||
LightForeground="Black" LightBackground="White" DarkForeground="White" DarkBackground="#FF3F3F3F"
|
||||
Center="53.5,8.2" ZoomLevel="11" MaxZoomLevel="20"
|
||||
TileLayer="{Binding Source={StaticResource TileLayersView}, Path=CurrentItem}"
|
||||
MouseLeftButtonDown="MapMouseLeftButtonDown" MouseRightButtonDown="MapMouseRightButtonDown"
|
||||
MouseMove="MapMouseMove" MouseLeave="MapMouseLeave"
|
||||
ManipulationInertiaStarting="MapManipulationInertiaStarting">
|
||||
|
||||
<map:MapImage x:Name="mapImage" South="53.54031" North="53.74871" West="8.08594" East="8.43750"
|
||||
Source="10_535_330.jpg" Opacity=".5"/>
|
||||
Source="10_535_330.jpg" Opacity="0.5"/>
|
||||
|
||||
<map:MapGraticule Opacity="0.6"/>
|
||||
<map:MapScale Margin="4" Opacity="0.8"/>
|
||||
|
||||
|
|
@ -198,7 +199,7 @@
|
|||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="mouseLocation" Margin="5" VerticalAlignment="Bottom" FontFamily="Consolas"/>
|
||||
<TextBlock Name="mouseLocation" Margin="5" VerticalAlignment="Bottom" FontFamily="Segoe UI Mono"/>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<StackPanel Margin="5">
|
||||
<TextBlock Text="Zoom Level" Margin="0,0,0,2" HorizontalAlignment="Center" Foreground="Gray" FontSize="10"/>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using System.Windows;
|
|||
[assembly: AssemblyCopyright("Copyright © 2013 Clemens Fischer")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyVersion("1.2.1")]
|
||||
[assembly: AssemblyFileVersion("1.2.1")]
|
||||
[assembly: AssemblyVersion("1.2.2")]
|
||||
[assembly: AssemblyFileVersion("1.2.2")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue