mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Version 4.12. Added MapControl.Images project
This commit is contained in:
parent
f585377c34
commit
05a995c592
|
|
@ -11,8 +11,8 @@
|
|||
<AssemblyName>MBTiles.UWP</AssemblyName>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17134.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
|
||||
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
|
|
|
|||
|
|
@ -29,16 +29,6 @@ namespace MapControl.Images
|
|||
"Path", typeof(string), typeof(WorldFileImage),
|
||||
new PropertyMetadata(null, async (o, e) => (await ReadWorldFileImage((string)e.NewValue)).SetImage((Image)o)));
|
||||
|
||||
public static string GetPath(Image image)
|
||||
{
|
||||
return (string)image.GetValue(PathProperty);
|
||||
}
|
||||
|
||||
public static void SetPath(Image image, string path)
|
||||
{
|
||||
image.SetValue(PathProperty, path);
|
||||
}
|
||||
|
||||
public BitmapSource Bitmap { get; }
|
||||
public Matrix Transform { get; }
|
||||
public MapProjection Projection { get; }
|
||||
|
|
@ -77,6 +67,16 @@ namespace MapControl.Images
|
|||
};
|
||||
}
|
||||
|
||||
public static string GetPath(Image image)
|
||||
{
|
||||
return (string)image.GetValue(PathProperty);
|
||||
}
|
||||
|
||||
public static void SetPath(Image image, string path)
|
||||
{
|
||||
image.SetValue(PathProperty, path);
|
||||
}
|
||||
|
||||
public static async Task<WorldFileImage> ReadWorldFileImage(string imagePath, string worldFilePath, string projFilePath = null)
|
||||
{
|
||||
BitmapSource bitmap;
|
||||
|
|
@ -181,9 +181,6 @@ namespace MapControl.Images
|
|||
return image;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Experimental
|
||||
/// </summary>
|
||||
public static async Task<FrameworkElement> CreateImage(string imagePath)
|
||||
{
|
||||
return (await ReadWorldFileImage(imagePath)).CreateImage();
|
||||
|
|
|
|||
Loading…
Reference in a new issue