mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 22:18:56 +00:00
GeoImage implementation
This commit is contained in:
parent
1f5e82518a
commit
07849eb1d8
4 changed files with 86 additions and 54 deletions
|
|
@ -6,13 +6,20 @@ using System;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
public partial class GeoImage
|
||||
public partial class GeoImage : Image
|
||||
{
|
||||
private void SetImage(ImageSource image)
|
||||
{
|
||||
Source = image;
|
||||
Stretch = Stretch.Fill;
|
||||
}
|
||||
|
||||
private static Task<GeoBitmap> ReadGeoTiffAsync(string sourcePath)
|
||||
{
|
||||
return Task.Run(() =>
|
||||
|
|
@ -47,7 +54,7 @@ namespace MapControl
|
|||
|
||||
if (metadata.GetQuery(QueryString(GeoKeyDirectoryTag)) is short[] geoKeyDirectory)
|
||||
{
|
||||
geoBitmap.SetProjection(geoKeyDirectory);
|
||||
geoBitmap.Projection = GetProjection(geoKeyDirectory);
|
||||
}
|
||||
|
||||
if (metadata.GetQuery(QueryString(NoDataTag)) is string noData &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue