mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Version 1.3.8: Fixed NuGet package for WinRT, plus minor changes.
This commit is contained in:
parent
8e917e9397
commit
c427345896
|
|
@ -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.7")]
|
||||
[assembly: AssemblyFileVersion("1.3.7")]
|
||||
[assembly: AssemblyVersion("1.3.8")]
|
||||
[assembly: AssemblyFileVersion("1.3.8")]
|
||||
[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.7")]
|
||||
[assembly: AssemblyFileVersion("1.3.7")]
|
||||
[assembly: AssemblyVersion("1.3.8")]
|
||||
[assembly: AssemblyFileVersion("1.3.8")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ using System.Windows;
|
|||
[assembly: AssemblyCompany("Clemens Fischer")]
|
||||
[assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyVersion("1.3.7")]
|
||||
[assembly: AssemblyFileVersion("1.3.7")]
|
||||
[assembly: AssemblyVersion("1.3.8")]
|
||||
[assembly: AssemblyFileVersion("1.3.8")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -91,13 +91,14 @@ namespace MapControl
|
|||
{
|
||||
var newTiles = (List<Tile>)newTilesList;
|
||||
var imageTileSource = tileLayer.TileSource as ImageTileSource;
|
||||
var animateOpacity = tileLayer.AnimateTileOpacity;
|
||||
|
||||
if (imageTileSource != null && !imageTileSource.CanLoadAsync)
|
||||
{
|
||||
foreach (var tile in newTiles)
|
||||
{
|
||||
tileLayer.Dispatcher.BeginInvoke(
|
||||
(Action<Tile, ImageTileSource>)((t, ts) => t.SetImageSource(ts.LoadImage(t.XIndex, t.Y, t.ZoomLevel), true)),
|
||||
(Action<Tile, ImageTileSource>)((t, ts) => t.SetImageSource(ts.LoadImage(t.XIndex, t.Y, t.ZoomLevel), animateOpacity)),
|
||||
DispatcherPriority.Background, tile, imageTileSource);
|
||||
}
|
||||
}
|
||||
|
|
@ -118,7 +119,7 @@ namespace MapControl
|
|||
if (image != null)
|
||||
{
|
||||
tileLayer.Dispatcher.BeginInvoke(
|
||||
(Action<Tile, ImageSource>)((t, i) => t.SetImageSource(i, true)),
|
||||
(Action<Tile, ImageSource>)((t, i) => t.SetImageSource(i, animateOpacity)),
|
||||
DispatcherPriority.Background, tile, image);
|
||||
|
||||
long creationTime = BitConverter.ToInt64(buffer, 0);
|
||||
|
|
@ -147,14 +148,13 @@ namespace MapControl
|
|||
{
|
||||
Interlocked.Increment(ref downloadThreadCount);
|
||||
|
||||
ThreadPool.QueueUserWorkItem(LoadTiles, imageTileSource);
|
||||
ThreadPool.QueueUserWorkItem(o => LoadTiles(imageTileSource, animateOpacity));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadTiles(object tileSource)
|
||||
private void LoadTiles(ImageTileSource imageTileSource, bool animateOpacity)
|
||||
{
|
||||
var imageTileSource = (ImageTileSource)tileSource;
|
||||
Tile tile;
|
||||
|
||||
while (pendingTiles.TryDequeue(out tile))
|
||||
|
|
@ -194,7 +194,7 @@ namespace MapControl
|
|||
if (image != null)
|
||||
{
|
||||
tileLayer.Dispatcher.BeginInvoke(
|
||||
(Action<Tile, ImageSource>)((t, i) => t.SetImageSource(i, true)),
|
||||
(Action<Tile, ImageSource>)((t, i) => t.SetImageSource(i, animateOpacity)),
|
||||
DispatcherPriority.Background, tile, image);
|
||||
|
||||
if (buffer != null && Cache != null)
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ namespace MapControl
|
|||
MaxZoomLevel = 18;
|
||||
MaxParallelDownloads = 8;
|
||||
LoadLowerZoomLevels = true;
|
||||
AnimateTileOpacity = true;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
|
|
@ -64,6 +65,7 @@ namespace MapControl
|
|||
public int MaxZoomLevel { get; set; }
|
||||
public int MaxParallelDownloads { get; set; }
|
||||
public bool LoadLowerZoomLevels { get; set; }
|
||||
public bool AnimateTileOpacity { get; set; }
|
||||
public Brush Foreground { get; set; }
|
||||
|
||||
public string Description
|
||||
|
|
|
|||
|
|
@ -27,17 +27,16 @@ namespace MapControl
|
|||
|
||||
public TileSource()
|
||||
{
|
||||
MetersPerDegree = EarthRadius * Math.PI / 180d;
|
||||
}
|
||||
|
||||
public TileSource(string uriFormat)
|
||||
: this()
|
||||
{
|
||||
UriFormat = uriFormat;
|
||||
}
|
||||
|
||||
public virtual double MetersPerDegree
|
||||
{
|
||||
get { return EarthRadius * Math.PI / 180d; }
|
||||
}
|
||||
public double MetersPerDegree { get; protected set; }
|
||||
|
||||
public string UriFormat
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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.7")]
|
||||
[assembly: AssemblyFileVersion("1.3.7")]
|
||||
[assembly: AssemblyVersion("1.3.8")]
|
||||
[assembly: AssemblyFileVersion("1.3.8")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:map="using:MapControl">
|
||||
<Style TargetType="map:MapItemsControl">
|
||||
<Setter Property="Template">
|
||||
|
|
|
|||
|
|
@ -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.7")]
|
||||
[assembly: AssemblyFileVersion("1.3.7")]
|
||||
[assembly: AssemblyVersion("1.3.8")]
|
||||
[assembly: AssemblyFileVersion("1.3.8")]
|
||||
[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.7")]
|
||||
[assembly: AssemblyFileVersion("1.3.7")]
|
||||
[assembly: AssemblyVersion("1.3.8")]
|
||||
[assembly: AssemblyFileVersion("1.3.8")]
|
||||
[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.7")]
|
||||
[assembly: AssemblyFileVersion("1.3.7")]
|
||||
[assembly: AssemblyVersion("1.3.8")]
|
||||
[assembly: AssemblyFileVersion("1.3.8")]
|
||||
[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.7")]
|
||||
[assembly: AssemblyFileVersion("1.3.7")]
|
||||
[assembly: AssemblyVersion("1.3.8")]
|
||||
[assembly: AssemblyFileVersion("1.3.8")]
|
||||
[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.7")]
|
||||
[assembly: AssemblyFileVersion("1.3.7")]
|
||||
[assembly: AssemblyVersion("1.3.8")]
|
||||
[assembly: AssemblyFileVersion("1.3.8")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue