-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed bing maps key from settings
- Loading branch information
Showing
11 changed files
with
171 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// <copyright file="OsmTileSource.cs" company="OpenSky"> | ||
// OpenSky project 2021-2023 | ||
// </copyright> | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
namespace OpenSky.Agent.Controls | ||
{ | ||
using System; | ||
|
||
using Microsoft.Maps.MapControl.WPF; | ||
|
||
/// ------------------------------------------------------------------------------------------------- | ||
/// <summary> | ||
/// OpenStreetMap tile source. | ||
/// </summary> | ||
/// <remarks> | ||
/// sushi.at, 20/12/2023. | ||
/// </remarks> | ||
/// <seealso cref="Microsoft.Maps.MapControl.WPF.TileSource"/> | ||
/// ------------------------------------------------------------------------------------------------- | ||
public class OsmTileSource : TileSource | ||
{ | ||
/// ------------------------------------------------------------------------------------------------- | ||
/// <summary> | ||
/// Retrieves the URI for the tile specified by the given x, y coordinates and zoom level. | ||
/// </summary> | ||
/// <remarks> | ||
/// sushi.at, 20/12/2023. | ||
/// </remarks> | ||
/// <param name="x"> | ||
/// The horizontal position of the tile. | ||
/// </param> | ||
/// <param name="y"> | ||
/// The vertical position of the tile. | ||
/// </param> | ||
/// <param name="zoomLevel"> | ||
/// The zoom level of the tile. | ||
/// </param> | ||
/// <returns> | ||
/// Returns a <see cref="T:System.Uri"></see> for the tile. | ||
/// </returns> | ||
/// <seealso cref="Microsoft.Maps.MapControl.WPF.TileSource.GetUri(int,int,int)"/> | ||
/// ------------------------------------------------------------------------------------------------- | ||
public override Uri GetUri(int x, int y, int zoomLevel) | ||
{ | ||
if (string.IsNullOrEmpty(this.UriFormat)) | ||
{ | ||
return null; | ||
} | ||
|
||
return new Uri( | ||
this.UriFormat.Replace("{x}", x.ToString()).Replace("{y}", y.ToString()).Replace("{z}", zoomLevel.ToString())); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.