mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Added TileImageLoader.WinUI
This commit is contained in:
parent
d4bc137408
commit
e096f97e85
11 changed files with 110 additions and 42 deletions
|
|
@ -19,11 +19,14 @@ namespace WinUiApp
|
|||
{
|
||||
ImageLoader.HttpClient.DefaultRequestHeaders.Add("User-Agent", "XAML Map Control Test Application");
|
||||
|
||||
var appData = Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MapControl");
|
||||
var bingMapsApiKeyFile = Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MapControl", "BingMapsApiKey.txt");
|
||||
|
||||
TileImageLoader.Cache = new ImageFileCache(Path.Combine(appData, "TileCache"));
|
||||
BingMapsTileLayer.ApiKey = File.ReadAllText(Path.Combine(appData, "BingMapsApiKey.txt"))?.Trim();
|
||||
BingMapsTileLayer.ApiKey = File.ReadAllText(bingMapsApiKeyFile)?.Trim();
|
||||
|
||||
TileImageLoader.Cache = new ImageFileCache(TileImageLoader.DefaultCacheFolder);
|
||||
//TileImageLoader.Cache = new FileDbCache(TileImageLoader.DefaultCacheFolder);
|
||||
//TileImageLoader.Cache = new SQLiteCache(TileImageLoader.DefaultCacheFolder);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue