mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Check TileSource.GetUri arguments
This commit is contained in:
parent
c9316bee74
commit
4b4eecf810
|
|
@ -12,7 +12,8 @@ namespace MapControl
|
|||
{
|
||||
Uri uri = null;
|
||||
|
||||
if (UriFormat != null && Subdomains != null && Subdomains.Length > 0 && zoomLevel > 0)
|
||||
if (UriFormat != null && Subdomains != null && Subdomains.Length > 0 &&
|
||||
x >= 0 && y >= 0 && zoomLevel > 0)
|
||||
{
|
||||
var subdomain = Subdomains[(x + y) % Subdomains.Length];
|
||||
var quadkey = new char[zoomLevel];
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace MapControl
|
|||
get => uriFormat;
|
||||
set
|
||||
{
|
||||
uriFormat = value?.Replace("{c}", "{s}"); // for backwards compatibility since 5.4.0
|
||||
uriFormat = value;
|
||||
|
||||
if (Subdomains == null && uriFormat != null && uriFormat.Contains("{s}"))
|
||||
{
|
||||
|
|
@ -53,7 +53,7 @@ namespace MapControl
|
|||
{
|
||||
Uri uri = null;
|
||||
|
||||
if (UriFormat != null)
|
||||
if (UriFormat != null && x >= 0 && y >= 0 && zoomLevel >= 0)
|
||||
{
|
||||
var uriString = UriFormat
|
||||
.Replace("{x}", x.ToString())
|
||||
|
|
|
|||
|
|
@ -15,9 +15,8 @@ namespace MapControl
|
|||
Uri uri = null;
|
||||
|
||||
if (UriFormat != null &&
|
||||
TileMatrixSet != null &&
|
||||
zoomLevel >= 0 &&
|
||||
zoomLevel < TileMatrixSet.TileMatrixes.Count)
|
||||
TileMatrixSet != null && TileMatrixSet.TileMatrixes.Count > zoomLevel &&
|
||||
x >= 0 && y >= 0 && zoomLevel >= 0)
|
||||
{
|
||||
uri = new Uri(UriFormat
|
||||
.Replace("{TileMatrixSet}", TileMatrixSet.Identifier)
|
||||
|
|
|
|||
Loading…
Reference in a new issue