mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-07 23:45:05 +00:00
Updated MapsforgeTiles projects
This commit is contained in:
parent
105e812afa
commit
a9f0ccc78b
13 changed files with 196 additions and 138 deletions
17
MapsforgeTiles/WPF/MapsforgeTileSource.WPF.cs
Normal file
17
MapsforgeTiles/WPF/MapsforgeTileSource.WPF.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace MapControl.MapsforgeTiles
|
||||
{
|
||||
public partial class MapsforgeTileSource
|
||||
{
|
||||
private static BitmapSource CreateImage(int[] pixels)
|
||||
{
|
||||
var size = (int)Math.Sqrt(pixels.Length);
|
||||
var image = BitmapSource.Create(size, size, 96d, 96d, PixelFormats.Bgra32, null, pixels, size * 4);
|
||||
image.Freeze();
|
||||
return image;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue