Update TileSource.cs

This commit is contained in:
ClemensF 2020-10-24 10:23:00 +02:00
parent 947488a567
commit 6bbb5fa5a4

View file

@ -32,9 +32,9 @@ namespace MapControl
get { return uriFormat; } get { return uriFormat; }
set set
{ {
uriFormat = value; uriFormat = value?.Replace("{c}", "{s}"); // for backwards compatibility since 5.4.0
if (Subdomains == null && uriFormat.Contains("{s}")) if (Subdomains == null && uriFormat != null && uriFormat.Contains("{s}"))
{ {
Subdomains = new string[] { "a", "b", "c" }; // default OpenStreetMap subdomains Subdomains = new string[] { "a", "b", "c" }; // default OpenStreetMap subdomains
} }