mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-09 08:25:10 +00:00
Added MapsforgeTiles projects
This commit is contained in:
parent
db7f22d093
commit
215ea1428f
10 changed files with 358 additions and 0 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
29
MapsforgeTiles/WPF/MapsforgeTiles.WPF.csproj
Normal file
29
MapsforgeTiles/WPF/MapsforgeTiles.WPF.csproj
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0-windows</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<DefineConstants>WPF</DefineConstants>
|
||||
<RootNamespace>MapControl.MapsforgeTiles</RootNamespace>
|
||||
<AssemblyTitle>XAML Map Control Mapsforge Library for WPF</AssemblyTitle>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Shared\*.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\MapControl\WPF\MapControl.WPF.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="IKVM" Version="8.15.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<IkvmReference Include="..\target\mapsforge-tilerenderer-0.1.0-jar-with-dependencies.jar" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="cd ..
mvn package" />
|
||||
</Target>
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue