mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Replace Path.GetFullPath
This commit is contained in:
parent
7b69215a30
commit
a342f98334
|
|
@ -131,7 +131,8 @@ namespace MapControl
|
|||
{
|
||||
using (var archive = await Task.Run(() => ZipFile.OpenRead(archiveFilePath)))
|
||||
{
|
||||
var docEntry = await Task.Run(() => archive.GetEntry("doc.kml") ?? archive.Entries.FirstOrDefault(e => e.Name.EndsWith(".kml")));
|
||||
var docEntry = await Task.Run(() => archive.GetEntry("doc.kml")
|
||||
?? archive.Entries.FirstOrDefault(e => e.Name.EndsWith(".kml")));
|
||||
|
||||
if (docEntry == null)
|
||||
{
|
||||
|
|
@ -173,7 +174,8 @@ namespace MapControl
|
|||
|
||||
private static async Task<IEnumerable<ImageOverlay>> ReadGroundOverlaysFromFileAsync(string docFilePath)
|
||||
{
|
||||
docFilePath = Path.GetFullPath(docFilePath);
|
||||
docFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, docFilePath);
|
||||
|
||||
var docUri = new Uri(docFilePath);
|
||||
|
||||
var imageOverlays = await Task.Run(() =>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ namespace MapControl
|
|||
{
|
||||
public static async Task<Tuple<BitmapSource, Matrix>> ReadGeoTiff(string sourcePath)
|
||||
{
|
||||
var file = await StorageFile.GetFileFromPathAsync(Path.GetFullPath(sourcePath));
|
||||
var file = await StorageFile.GetFileFromPathAsync(
|
||||
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, sourcePath));
|
||||
|
||||
using (var stream = await file.OpenReadAsync())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,9 +50,11 @@ namespace MapControl
|
|||
{
|
||||
ImageSource image = null;
|
||||
|
||||
path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, path);
|
||||
|
||||
if (File.Exists(path))
|
||||
{
|
||||
var file = await StorageFile.GetFileFromPathAsync(Path.GetFullPath(path));
|
||||
var file = await StorageFile.GetFileFromPathAsync(path);
|
||||
|
||||
using (var stream = await file.OpenReadAsync())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue