mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Version 1.1.4: changed accessibility of classes Tile and TileLayer to allow for derived TileLayers.
This commit is contained in:
parent
2f1020ffc6
commit
452e039349
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: AssemblyVersion("1.1.3")]
|
[assembly: AssemblyVersion("1.1.4")]
|
||||||
[assembly: AssemblyFileVersion("1.1.3")]
|
[assembly: AssemblyFileVersion("1.1.4")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: AssemblyVersion("1.1.3")]
|
[assembly: AssemblyVersion("1.1.4")]
|
||||||
[assembly: AssemblyFileVersion("1.1.3")]
|
[assembly: AssemblyFileVersion("1.1.4")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,6 @@ using System.Windows;
|
||||||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: AssemblyVersion("1.1.3")]
|
[assembly: AssemblyVersion("1.1.4")]
|
||||||
[assembly: AssemblyFileVersion("1.1.3")]
|
[assembly: AssemblyFileVersion("1.1.4")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -17,28 +17,27 @@ using System.Windows.Media.Imaging;
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
internal partial class Tile
|
public partial class Tile
|
||||||
{
|
{
|
||||||
public readonly Image Image = new Image { Stretch = Stretch.Uniform, Opacity = 0d };
|
public readonly Image Image = new Image { Stretch = Stretch.Uniform, Opacity = 0d };
|
||||||
|
|
||||||
public ImageSource ImageSource
|
public ImageSource ImageSource
|
||||||
{
|
{
|
||||||
get { return Image.Source; }
|
get { return Image.Source; }
|
||||||
private set { Image.Source = value; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetImageSource(ImageSource source, bool animateOpacity)
|
public void SetImageSource(ImageSource image, bool animateOpacity)
|
||||||
{
|
{
|
||||||
if (ImageSource == null)
|
if (Image.Source == null)
|
||||||
{
|
{
|
||||||
if (animateOpacity)
|
if (animateOpacity)
|
||||||
{
|
{
|
||||||
var bitmap = source as BitmapImage;
|
var bitmapImage = image as BitmapImage;
|
||||||
|
|
||||||
if (bitmap != null) // TODO Check if bitmap is downloading somehow, maybe PixelWidth == 0?
|
if (bitmapImage != null)
|
||||||
{
|
{
|
||||||
bitmap.ImageOpened += BitmapImageOpened;
|
bitmapImage.ImageOpened += BitmapImageOpened;
|
||||||
bitmap.ImageFailed += BitmapImageFailed;
|
bitmapImage.ImageFailed += BitmapImageFailed;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -51,7 +50,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageSource = source;
|
Image.Source = image;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BitmapImageOpened(object sender, RoutedEventArgs e)
|
private void BitmapImageOpened(object sender, RoutedEventArgs e)
|
||||||
|
|
@ -65,7 +64,7 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
((BitmapImage)sender).ImageOpened -= BitmapImageOpened;
|
((BitmapImage)sender).ImageOpened -= BitmapImageOpened;
|
||||||
((BitmapImage)sender).ImageFailed -= BitmapImageFailed;
|
((BitmapImage)sender).ImageFailed -= BitmapImageFailed;
|
||||||
ImageSource = null;
|
Image.Source = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,31 +5,31 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Threading;
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
internal partial class Tile
|
public partial class Tile
|
||||||
{
|
{
|
||||||
public readonly ImageBrush Brush = new ImageBrush { Opacity = 0d };
|
public readonly ImageBrush Brush = new ImageBrush { Opacity = 0d };
|
||||||
|
|
||||||
public ImageSource ImageSource
|
public ImageSource ImageSource
|
||||||
{
|
{
|
||||||
get { return Brush.ImageSource; }
|
get { return Brush.ImageSource; }
|
||||||
private set { Brush.ImageSource = value; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetImageSource(ImageSource source, bool animateOpacity)
|
public void SetImageSource(ImageSource image, bool animateOpacity)
|
||||||
{
|
{
|
||||||
if (ImageSource == null)
|
if (Brush.ImageSource == null)
|
||||||
{
|
{
|
||||||
if (animateOpacity)
|
if (animateOpacity)
|
||||||
{
|
{
|
||||||
var bitmap = source as BitmapImage;
|
var bitmapImage = image as BitmapImage;
|
||||||
|
|
||||||
if (bitmap != null && bitmap.IsDownloading)
|
if (bitmapImage != null && bitmapImage.IsDownloading)
|
||||||
{
|
{
|
||||||
bitmap.DownloadCompleted += BitmapDownloadCompleted;
|
bitmapImage.DownloadCompleted += BitmapDownloadCompleted;
|
||||||
bitmap.DownloadFailed += BitmapDownloadFailed;
|
bitmapImage.DownloadFailed += BitmapDownloadFailed;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -42,7 +42,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageSource = source;
|
Brush.ImageSource = image;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BitmapDownloadCompleted(object sender, EventArgs e)
|
private void BitmapDownloadCompleted(object sender, EventArgs e)
|
||||||
|
|
@ -56,7 +56,7 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
((BitmapImage)sender).DownloadCompleted -= BitmapDownloadCompleted;
|
((BitmapImage)sender).DownloadCompleted -= BitmapDownloadCompleted;
|
||||||
((BitmapImage)sender).DownloadFailed -= BitmapDownloadFailed;
|
((BitmapImage)sender).DownloadFailed -= BitmapDownloadFailed;
|
||||||
ImageSource = null;
|
Brush.ImageSource = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ using System.Windows.Media.Animation;
|
||||||
|
|
||||||
namespace MapControl
|
namespace MapControl
|
||||||
{
|
{
|
||||||
internal partial class Tile
|
public partial class Tile
|
||||||
{
|
{
|
||||||
public readonly int ZoomLevel;
|
public readonly int ZoomLevel;
|
||||||
public readonly int X;
|
public readonly int X;
|
||||||
|
|
@ -35,7 +35,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DoubleAnimation OpacityAnimation
|
public DoubleAnimation OpacityAnimation
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
tileLayer.TransformMatrix = tileLayerTransform;
|
tileLayer.SetTransformMatrix(tileLayerTransform);
|
||||||
tileLayer.UpdateTiles(tileZoomLevel, tileGrid);
|
tileLayer.UpdateTiles(tileZoomLevel, tileGrid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -98,15 +98,15 @@ namespace MapControl
|
||||||
|
|
||||||
ViewportTransform.Matrix = GetTransformMatrix(new Matrix(1d, 0d, 0d, -1d, 180d, 180d), scale);
|
ViewportTransform.Matrix = GetTransformMatrix(new Matrix(1d, 0d, 0d, -1d, 180d, 180d), scale);
|
||||||
|
|
||||||
|
if (Math.Sign(mapOrigin.X) == Math.Sign(oldMapOriginX))
|
||||||
|
{
|
||||||
var tileLayerTransform = GetTileLayerTransformMatrix();
|
var tileLayerTransform = GetTileLayerTransformMatrix();
|
||||||
|
|
||||||
foreach (TileLayer tileLayer in Children)
|
foreach (TileLayer tileLayer in Children)
|
||||||
{
|
{
|
||||||
tileLayer.TransformMatrix = tileLayerTransform;
|
tileLayer.SetTransformMatrix(tileLayerTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.Sign(mapOrigin.X) == Math.Sign(oldMapOriginX))
|
|
||||||
{
|
|
||||||
updateTimer.Start();
|
updateTimer.Start();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -162,7 +162,7 @@ namespace MapControl
|
||||||
|
|
||||||
foreach (TileLayer tileLayer in Children)
|
foreach (TileLayer tileLayer in Children)
|
||||||
{
|
{
|
||||||
tileLayer.TransformMatrix = tileLayerTransform;
|
tileLayer.SetTransformMatrix(tileLayerTransform);
|
||||||
tileLayer.UpdateTiles(tileZoomLevel, tileGrid);
|
tileLayer.UpdateTiles(tileZoomLevel, tileGrid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,16 +87,31 @@ namespace MapControl
|
||||||
var newTiles = (List<Tile>)newTilesList;
|
var newTiles = (List<Tile>)newTilesList;
|
||||||
var imageTileSource = tileLayer.TileSource as ImageTileSource;
|
var imageTileSource = tileLayer.TileSource as ImageTileSource;
|
||||||
|
|
||||||
if (imageTileSource == null)
|
if (imageTileSource != null)
|
||||||
{
|
{
|
||||||
if (Cache == null || string.IsNullOrWhiteSpace(tileLayer.SourceName))
|
if (imageTileSource.CanLoadAsync)
|
||||||
{
|
{
|
||||||
foreach (var tile in newTiles)
|
foreach (var tile in newTiles)
|
||||||
{
|
{
|
||||||
pendingTiles.Enqueue(tile);
|
tileLayer.Dispatcher.BeginInvoke(
|
||||||
|
(Action<Tile, ImageSource>)((t, i) => t.SetImageSource(i, true)),
|
||||||
|
DispatcherPriority.Background, tile,
|
||||||
|
imageTileSource.LoadImage(tile.XIndex, tile.Y, tile.ZoomLevel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
foreach (var tile in newTiles)
|
||||||
|
{
|
||||||
|
tileLayer.Dispatcher.BeginInvoke(
|
||||||
|
(Action<Tile, ImageTileSource>)((t, i) => t.SetImageSource(i.LoadImage(t.XIndex, t.Y, t.ZoomLevel), true)),
|
||||||
|
DispatcherPriority.Background, tile, imageTileSource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Cache != null && !string.IsNullOrWhiteSpace(tileLayer.SourceName))
|
||||||
{
|
{
|
||||||
var outdatedTiles = new List<Tile>(newTiles.Count);
|
var outdatedTiles = new List<Tile>(newTiles.Count);
|
||||||
|
|
||||||
|
|
@ -127,6 +142,13 @@ namespace MapControl
|
||||||
pendingTiles.Enqueue(tile);
|
pendingTiles.Enqueue(tile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (var tile in newTiles)
|
||||||
|
{
|
||||||
|
pendingTiles.Enqueue(tile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while (downloadThreadCount < Math.Min(pendingTiles.Count, tileLayer.MaxParallelDownloads))
|
while (downloadThreadCount < Math.Min(pendingTiles.Count, tileLayer.MaxParallelDownloads))
|
||||||
{
|
{
|
||||||
|
|
@ -135,26 +157,6 @@ namespace MapControl
|
||||||
ThreadPool.QueueUserWorkItem(DownloadTiles);
|
ThreadPool.QueueUserWorkItem(DownloadTiles);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (imageTileSource.CanLoadAsync)
|
|
||||||
{
|
|
||||||
foreach (var tile in newTiles)
|
|
||||||
{
|
|
||||||
tileLayer.Dispatcher.BeginInvoke(
|
|
||||||
(Action<Tile, ImageSource>)((t, s) => t.SetImageSource(s, true)),
|
|
||||||
DispatcherPriority.Background,
|
|
||||||
tile, imageTileSource.LoadImage(tile.XIndex, tile.Y, tile.ZoomLevel));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (var tile in newTiles)
|
|
||||||
{
|
|
||||||
tileLayer.Dispatcher.BeginInvoke(
|
|
||||||
(Action<Tile>)(t => t.SetImageSource(imageTileSource.LoadImage(t.XIndex, t.Y, t.ZoomLevel), true)),
|
|
||||||
DispatcherPriority.Background,
|
|
||||||
tile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DownloadTiles(object o)
|
private void DownloadTiles(object o)
|
||||||
|
|
@ -181,17 +183,17 @@ namespace MapControl
|
||||||
|
|
||||||
private bool CreateTileImage(Tile tile, byte[] buffer)
|
private bool CreateTileImage(Tile tile, byte[] buffer)
|
||||||
{
|
{
|
||||||
var bitmap = new BitmapImage();
|
var image = new BitmapImage();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var stream = new MemoryStream(buffer, 8, buffer.Length - 8, false))
|
using (var stream = new MemoryStream(buffer, 8, buffer.Length - 8, false))
|
||||||
{
|
{
|
||||||
bitmap.BeginInit();
|
image.BeginInit();
|
||||||
bitmap.CacheOption = BitmapCacheOption.OnLoad;
|
image.CacheOption = BitmapCacheOption.OnLoad;
|
||||||
bitmap.StreamSource = stream;
|
image.StreamSource = stream;
|
||||||
bitmap.EndInit();
|
image.EndInit();
|
||||||
bitmap.Freeze();
|
image.Freeze();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
@ -201,9 +203,8 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
|
|
||||||
tileLayer.Dispatcher.BeginInvoke(
|
tileLayer.Dispatcher.BeginInvoke(
|
||||||
(Action<Tile>)(t => t.SetImageSource(bitmap, true)),
|
(Action<Tile, ImageSource>)((t, i) => t.SetImageSource(i, true)),
|
||||||
DispatcherPriority.Background,
|
DispatcherPriority.Background, tile, image);
|
||||||
tile);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,12 @@ namespace MapControl
|
||||||
RenderTransform = transform;
|
RenderTransform = transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Panel TileContainer
|
protected Panel TileContainer
|
||||||
{
|
{
|
||||||
get { return Parent as Panel; }
|
get { return Parent as Panel; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RenderTiles()
|
protected void RenderTiles()
|
||||||
{
|
{
|
||||||
Children.Clear();
|
Children.Clear();
|
||||||
foreach (var tile in tiles)
|
foreach (var tile in tiles)
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,12 @@ namespace MapControl
|
||||||
VisualEdgeMode = EdgeMode.Aliased;
|
VisualEdgeMode = EdgeMode.Aliased;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ContainerVisual TileContainer
|
protected ContainerVisual TileContainer
|
||||||
{
|
{
|
||||||
get { return Parent as ContainerVisual; }
|
get { return Parent as ContainerVisual; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RenderTiles()
|
protected void RenderTiles()
|
||||||
{
|
{
|
||||||
//System.Diagnostics.Trace.TraceInformation("{0} Tiles: {1}", tiles.Count, string.Join(", ", tiles.Select(t => t.ZoomLevel.ToString())));
|
//System.Diagnostics.Trace.TraceInformation("{0} Tiles: {1}", tiles.Count, string.Join(", ", tiles.Select(t => t.ZoomLevel.ToString())));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,13 +76,12 @@ namespace MapControl
|
||||||
set { TileSource = new TileSource(value); }
|
set { TileSource = new TileSource(value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal Matrix TransformMatrix
|
internal void SetTransformMatrix(Matrix transformMatrix)
|
||||||
{
|
{
|
||||||
get { return transform.Matrix; }
|
transform.Matrix = transformMatrix;
|
||||||
set { transform.Matrix = value; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void UpdateTiles(int zoomLevel, Int32Rect grid)
|
protected internal virtual void UpdateTiles(int zoomLevel, Int32Rect grid)
|
||||||
{
|
{
|
||||||
this.grid = grid;
|
this.grid = grid;
|
||||||
this.zoomLevel = zoomLevel;
|
this.zoomLevel = zoomLevel;
|
||||||
|
|
@ -97,14 +96,14 @@ namespace MapControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void ClearTiles()
|
protected internal virtual void ClearTiles()
|
||||||
{
|
{
|
||||||
tileImageLoader.CancelGetTiles();
|
tileImageLoader.CancelGetTiles();
|
||||||
tiles.Clear();
|
tiles.Clear();
|
||||||
RenderTiles();
|
RenderTiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SelectTiles()
|
protected void SelectTiles()
|
||||||
{
|
{
|
||||||
var maxZoomLevel = Math.Min(zoomLevel, MaxZoomLevel);
|
var maxZoomLevel = Math.Min(zoomLevel, MaxZoomLevel);
|
||||||
var minZoomLevel = maxZoomLevel;
|
var minZoomLevel = maxZoomLevel;
|
||||||
|
|
@ -151,6 +150,5 @@ namespace MapControl
|
||||||
|
|
||||||
tiles = newTiles;
|
tiles = newTiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: AssemblyVersion("1.1.3")]
|
[assembly: AssemblyVersion("1.1.4")]
|
||||||
[assembly: AssemblyFileVersion("1.1.3")]
|
[assembly: AssemblyFileVersion("1.1.4")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: AssemblyVersion("1.1.3")]
|
[assembly: AssemblyVersion("1.1.4")]
|
||||||
[assembly: AssemblyFileVersion("1.1.3")]
|
[assembly: AssemblyFileVersion("1.1.4")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: AssemblyVersion("1.1.3")]
|
[assembly: AssemblyVersion("1.1.4")]
|
||||||
[assembly: AssemblyFileVersion("1.1.3")]
|
[assembly: AssemblyFileVersion("1.1.4")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: AssemblyVersion("1.1.3")]
|
[assembly: AssemblyVersion("1.1.4")]
|
||||||
[assembly: AssemblyFileVersion("1.1.3")]
|
[assembly: AssemblyFileVersion("1.1.4")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ using System.Windows;
|
||||||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: AssemblyVersion("1.1.3")]
|
[assembly: AssemblyVersion("1.1.4")]
|
||||||
[assembly: AssemblyFileVersion("1.1.3")]
|
[assembly: AssemblyFileVersion("1.1.4")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<section name="SampleApplication.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
<section name="WpfApplication.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
</configSections>
|
</configSections>
|
||||||
<applicationSettings>
|
<applicationSettings>
|
||||||
<SampleApplication.Properties.Settings>
|
<WpfApplication.Properties.Settings>
|
||||||
<setting name="TileCache" serializeAs="String">
|
<setting name="TileCache" serializeAs="String">
|
||||||
<value/>
|
<value />
|
||||||
</setting>
|
</setting>
|
||||||
</SampleApplication.Properties.Settings>
|
</WpfApplication.Properties.Settings>
|
||||||
</applicationSettings>
|
</applicationSettings>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<!--<map:TileLayer SourceName="Google Maps" Description="Google Maps - © {y} Google"
|
<!--<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"/>
|
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"
|
<map:TileLayer SourceName="Google Images" Description="Google Maps - © {y} Google"
|
||||||
TileSource="http://khm{i}.google.com/kh/v=119&x={x}&y={y}&z={z}" MaxZoomLevel="20" HasDarkBackground="True"/>
|
TileSource="http://khm{i}.google.com/kh/v=123&x={x}&y={y}&z={z}" MaxZoomLevel="20" HasDarkBackground="True"/>
|
||||||
<map:TileLayer SourceName="Bing Maps" Description="Bing Maps - © {y} Microsoft Corporation"
|
<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"/>
|
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"
|
<map:TileLayer SourceName="Bing Images" Description="Bing Maps - © {y} Microsoft Corporation"
|
||||||
|
|
@ -35,9 +35,7 @@
|
||||||
<!-- The TileLayer below uses an ImageTileSource, which bypasses caching of map tile images -->
|
<!-- 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">
|
<!--<map:TileLayer SourceName="OSM Uncached" Description="© {y} OpenStreetMap Contributors, CC-BY-SA">
|
||||||
<map:TileLayer.TileSource>
|
|
||||||
<map:ImageTileSource UriFormat="http://{c}.tile.openstreetmap.org/{z}/{x}/{y}.png"/>
|
<map:ImageTileSource UriFormat="http://{c}.tile.openstreetmap.org/{z}/{x}/{y}.png"/>
|
||||||
</map:TileLayer.TileSource>
|
|
||||||
</map:TileLayer>-->
|
</map:TileLayer>-->
|
||||||
</map:TileLayerCollection>
|
</map:TileLayerCollection>
|
||||||
<CollectionViewSource x:Key="TileLayersView" Source="{StaticResource TileLayers}"/>
|
<CollectionViewSource x:Key="TileLayersView" Source="{StaticResource TileLayers}"/>
|
||||||
|
|
@ -149,7 +147,7 @@
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<map:Map Name="map" IsManipulationEnabled="True" Margin="2"
|
<map:Map Name="map" IsManipulationEnabled="True" Margin="2"
|
||||||
LightForeground="Black" LightBackground="White" DarkForeground="White" DarkBackground="#FF3F3F3F"
|
LightForeground="Black" LightBackground="White" DarkForeground="White" DarkBackground="#FF3F3F3F"
|
||||||
Center="53.5,8.2" ZoomLevel="11"
|
Center="53.5,8.2" ZoomLevel="11" MaxZoomLevel="20"
|
||||||
TileLayer="{Binding Source={StaticResource TileLayersView}, Path=CurrentItem}"
|
TileLayer="{Binding Source={StaticResource TileLayersView}, Path=CurrentItem}"
|
||||||
MouseLeftButtonDown="MapMouseLeftButtonDown" MouseRightButtonDown="MapMouseRightButtonDown"
|
MouseLeftButtonDown="MapMouseLeftButtonDown" MouseRightButtonDown="MapMouseRightButtonDown"
|
||||||
MouseMove="MapMouseMove" MouseLeave="MapMouseLeave"
|
MouseMove="MapMouseMove" MouseLeave="MapMouseLeave"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ using System.Windows;
|
||||||
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
[assembly: AssemblyCopyright("Copyright © 2012 Clemens Fischer")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: AssemblyVersion("1.1.3")]
|
[assembly: AssemblyVersion("1.1.4")]
|
||||||
[assembly: AssemblyFileVersion("1.1.3")]
|
[assembly: AssemblyFileVersion("1.1.4")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="SampleApplication.Properties" GeneratedClassName="Settings">
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="WpfApplication.Properties" GeneratedClassName="Settings">
|
||||||
<Profiles />
|
<Profiles />
|
||||||
<Settings>
|
<Settings>
|
||||||
<Setting Name="TileCache" Type="System.String" Scope="Application">
|
<Setting Name="TileCache" Type="System.String" Scope="Application">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue